Get a tenant
Use this operation to retrieve a tenant.
HTTP method and URI path
GET /zosmf/resource-mgmt/rest/<version>/tenants/<object-id>
- <version>
- Is the URI path variable that identifies the version of the z/OSMF software services template service. The following value is valid: 1.0.
- <object-id>
- Identifies the tenant to be retrieved.
Query parameters
None.
Description
This operation retrieves a tenant.
On successful completion, HTTP status code 200 (OK) is returned, indicating that the request resulted in a tenant being retrieved, and a response body is returned. See Response content.
Request content
None.
Authorization requirements
The user must be a domain administrator, or a consumer in the tenant.
For more information, see Resource management services.
HTTP status codes
On successful completion, HTTP status code 200 (OK) is returned.
Otherwise, the following HTTP status codes are returned for the indicated errors. The response body is a standard error response body that provides the reason code that is indicated and associated error message.
HTTP error status code | Description |
---|---|
HTTP 400 Bad request | The request body is missing a field. |
HTTP 404 Not found | The requested tenant does not exist. |
HTTP 500 Internal server error | The server encountered an error. See the response body for a JSON object with information about the error. |
Response content
On successful completion, the service returns a response body, which contains a JSON object with details about the tenant. See Table 2.
Field | Type | Description |
---|---|---|
tenant-id | String | The generated ID for the tenant. |
tenant-name | String | Descriptive name for the tenant. |
tenant-domain-id | String | The generated ID for the domain to which the tenant belongs. |
tenant-domain-name | String | Descriptive name of the domain to which the tenant belongs. |
tenant-templates | Array | Describes the templates for the tenant. See Table 3. |
tenant-consumer-list | Array | Consumer user IDs for the tenant. |
object-uri | String | URI of the newly created object. |
tenant-description | String | Description of the tenant. |
Field | Type | Description |
---|---|---|
rdp-id | String | Identifier of the resource deployment pool. |
template-available | String | Indicates if the template is available (true or false). |
template-id | String | Identifier of the template. |
template-name | String | Name of the template. |
Example HTTP interaction
GET https://localhost:4444/zosmf/resource-mgmt/rest/1.0/tenants/<object-id>
The following is the response body for the example get tenant request.
{
"tenant-id": "izu$000",
"tenant-name": "default",
"tenant-domain-id": "izu$0",
"tenant-domain-name": "default",
"tenant-templates": [
{
"rdp-id": "000",
"template-available": false,
"template-id": "template-id0",
"template-name": "tem0 name"
}, ...
],
"tenant-consumer-list": [
"ZOSMFAD",
"ZOSMFT2"
],
"object-uri": "\/zosmf\/resource-mgmt\/rest\/1.0\/tenants\/izu$000",
"tenant-description": "default tenant",
}