Tenant management API
The Tenant Management API (version v1).
Download the OpenAPI definition (YAML)
Security schemes
BasicAuth: HTTP basic
OAuth2: oauth2
authorizationCode flow, token URL https://localhost:9443/oauth2/token, authorization URL https://localhost:9443/oauth2/authorize
Tenants
Retrieve all tenants
GET /tenants
Retrieve all tenants in the system.
Scope(Permission) required:internal_list_tenants
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer (int32) | Maximum number of records to return. | |
offset | query | integer (int32) | Number of records to skip for pagination. | |
sortOrder | query | string | Define the order in which the retrieved tenants should be sorted. Allowed values: | |
sortBy | query | string | Attribute by which the retrieved records should be sorted. Currently sorting through domainName only supported. | |
filter | query | string | Condition to filter the retrieval of records. Supports 'sw', 'co', 'ew' and 'eq' operations. Currently, filtering is supported only by the domainName. E.g. /tenants?filter=domainName+sw+wso2. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | TenantsListResponse |
400 | Invalid Input Request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Add tenant
POST /tenants
This API provides the capability to create new tenants.
Scope(Permission) required: internal_list_tenants
Request body (required): application/json
This represents the tenant to be created.
Schema: TenantModel
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Name of the tenant. | |
domain | string | Yes | Tenant domain of the tenant. |
owners | array of Owner | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Item Created | |
206 | Partial Content | Error |
400 | Invalid Input Request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
409 | Element Already Exists | Error |
500 | Internal Server Error | Error |
Add channel verified tenant
POST /channel-verified-tenants
This API provides the capability to create new channel verified tenants.
Scope(Permission) required: internal_list_tenants
Request body (required): application/json
This represents the tenant to be created.
Schema: ChannelVerifiedTenantModel
5 properties
Responses
| Code | Description | Schema |
|---|---|---|
201 | Item Created | |
400 | Invalid Input Request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
409 | Element Already Exists | Error |
500 | Internal Server Error | Error |
Retrieve tenant by tenant ID
GET /tenants/{tenant-id}
Retrieve tenant using the tenant ID.
Scope(Permission) required: internal_list_tenants
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-id | path | string | Yes | tenant id |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | TenantResponseModel |
400 | Invalid Input Request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Get tenant by domain
GET /tenants/domain/{tenant-domain}
Get the tenant using domain.
Scope(Permission) required: internal_list_tenants
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-domain | path | string | Yes | tenant domain |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | TenantResponseModel |
400 | Invalid Input Request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Check domain existence
HEAD /tenants/domain/{tenant-domain}
Check the tenant existence using domain.
Scope(Permission) required: internal_list_tenants
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-domain | path | string | Yes | tenant domain |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Requested Resource Exists | |
400 | Invalid Input Request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Activate or deactivate tenant
PUT /tenants/{tenant-id}/lifecycle-status
This API activates/deactivates the specified tenant.
Scope(Permission) required: internal_modify_tenants
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-id | path | string | Yes | tenant id |
Request body (required): application/json
This represents the tenant to be updated.
Schema: TenantPutModel
1 property
| Name | Type | Required | Description |
|---|---|---|---|
activated | boolean | Active status of the tenant. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successfully updated | |
400 | Invalid Input Request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
409 | Element Already Exists | Error |
500 | Internal Server Error | Error |
Retrieve tenant's owners
GET /tenants/{tenant-id}/owners
Retrieve owners of the tenant which are identified by the provided tenant id.
Scope(Permission) required: internal_list_tenants
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-id | path | string | Yes | tenant id |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | array of OwnerResponse |
400 | Invalid Input Request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Retrieve tenant owner.
GET /tenants/{tenant-id}/owners/{owner-id}
Retrieve the tenant owner identified by the provided tenant id and owner id.
Scope(Permission) required: internal_list_tenants
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-id | path | string | Yes | tenant id |
owner-id | path | string | Yes | owner id |
additionalClaims | query | string | Define set of additional user claims (as comma separated) to be returned. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | OwnerInfoResponse |
400 | Invalid Input Request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Update tenant owner.
PUT /tenants/{tenant-id}/owners/{owner-id}
This API provides the capability to update the tenant owner.
Scope(Permission) required: internal_modify_tenants
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-id | path | string | Yes | tenant id |
owner-id | path | string | Yes | owner id |
Request body (required): application/json
This represents the tenant owner to be updated.
Schema: OwnerPutModel
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address of the owner. |
password | string | Password of the owner. | |
firstname | string | Yes | First name of the owner. |
lastname | string | Yes | Last name of the owner. |
additionalClaims | array of AdditionalClaims |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successful | |
206 | Partial Content | Error |
400 | Invalid Input Request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Delete tenant's metadata by ID
DEL /tenants/{tenant-id}/metadata
This API provides the capability to delete the tenant meta data(tenant specific data like tenant domain,
tenant owner details).
Scope(Permission) required: internal_modify_tenants
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-id | path | string | Yes | tenant id |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Successfully Deleted | |
400 | Bad Request | Error |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found | Error |
500 | Server Error | Error |
Schemas
TenantModel
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Name of the tenant. | |
domain | string | Yes | Tenant domain of the tenant. |
owners | array of Owner | Yes |
ChannelVerifiedTenantModel
Type: object
TenantListItem
Type: object
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | tenant id of the tenant owner. | |
name | string | Name of the tenant. | |
domain | string | Tenant domain of the tenant. | |
owners | array of OwnerResponse | ||
createdDate | string | Tenant created time. | |
lifecycleStatus | LifeCycleStatus | ||
region | string | Region of the tenant. |
TenantsListResponse
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | ||
startIndex | integer | ||
count | integer | ||
links | array of Link | ||
tenants | array of TenantListItem |
TenantResponseModel
Type: object
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | tenant id of the tenant owner. | |
name | string | Name of the tenant. | |
domain | string | Tenant domain of the tenant. | |
owners | array of OwnerResponse | ||
createdDate | string | Tenant created time in ISO-8601 format. | |
lifecycleStatus | LifeCycleStatus | ||
region | string | Region of the tenant. |
TenantPutModel
Type: object
1 property
| Name | Type | Required | Description |
|---|---|---|---|
activated | boolean | Active status of the tenant. |
Owner
Type: object
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Username for the tenant owner. |
password | string | Password of the owner. | |
email | string | Yes | Email address of the owner. |
firstname | string | First name of the owner. | |
lastname | string | Last name of the owner. | |
provisioningMethod | string | Yes | If the provisioning method is inline-password then a valid password should be sent in the request body, if the provisioning method is invite-via-email then password doesn't need to be send through request body, instead an emai link will be sent to the given email address to set the password. |
additionalClaims | array of AdditionalClaims |
OwnerPutModel
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address of the owner. |
password | string | Password of the owner. | |
firstname | string | Yes | First name of the owner. |
lastname | string | Yes | Last name of the owner. |
additionalClaims | array of AdditionalClaims |
OwnerInfoResponse
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | id of the tenant owner. | |
username | string | Username for the tenant owner. | |
email | string | Email address of the owner. | |
firstname | string | First name of the owner. | |
lastname | string | Last name of the owner. | |
additionalClaims | array of AdditionalClaims |
OwnerResponse
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | id of the tenant owner. | |
username | string | user name of the tenant owner. |
AdditionalClaims
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
claim | string | Claim uri. | |
value | string | Mobile number of the tenant owner. |
Attribute
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Name of the organization. | |
value | string | Name of the organization. |
Purpose
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
attributes | array of Attribute |
LifeCycleStatus
Type: object
1 property
| Name | Type | Required | Description |
|---|---|---|---|
activated | boolean | Status of the tenant life cycle |
Link
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
href | string | Path to the target resource. | |
rel | string | Describes how the current context is related to the target resource |
Error
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string | Yes | |
description | string | ||
traceId | string |
Was this page helpful?