Creating tenant types
As a platform administrator or a system administrator, create tenant types.
Method
POST.
Resource URI
/ibm/ioc/api/tenant-service/types/
For example,
https://web-server.cn.example.com/ibm/ioc/api/tenant-service/types
Request properties
| Name | Type | Description |
|---|---|---|
| description | Object | Each description object contains a group and a key property, and a resources array for each required locale that specifies the description of the tenant type in that locale. |
| displayName | Object | Each display name object contains a group and a key property, and a resources array for each required locale that specifies the display name of the tenant type in that locale. |
| leafTenant | boolean | Set the leafTenant property to true to ensure that tenants of this type cannot have child tenants, otherwise set the value to false. |
| name | String | The name of the tenant type. |
Sample request content
The following example is to add a tenant type whose
tenants cannot have child tenants, and so the leafTenant property is
set to true.
{
"name": "DEFAULT_CONTRACT",
"description": {
"group": "TenantApp",
"key": "default_contract_type_description",
"resources": [
{
"group": "TenantApp",
"locale": "en",
"key": "default_contract_type_description",
"value": "Default Contract level tenant"
}
]
},
"displayName": {
"group": "TenantApp",
"key": "default_contract_type_display_name",
"resources": [
{
"group": "TenantApp",
"locale": "en",
"key": "default_contract_type_display_name",
"value": "Default Contract"
}
]
},
"leafTenant": true
}
HTTP return codes
The HTTP POST method returns one of the following status codes:
| Code | Description |
|---|---|
| 200 | OK |
| 401 | Unauthorized |
| 404 | Not found |
| 500 | Internal server error |