Skip to main content
You're reading Identity & Access Management 7.1.0. The newest release is 7.3.0, and Cloud has the newest features. Go to the newest release

Tenant management API

Download OpenAPI (YAML)Version v1

Base URL: https://localhost:9443/t/carbon.super/api/server/v1

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

NameInTypeRequiredDescription
limitqueryinteger (int32)

Maximum number of records to return.

offsetqueryinteger (int32)

Number of records to skip for pagination.

sortOrderquerystring

Define the order in which the retrieved tenants should be sorted.

Allowed values: asc, desc

sortByquerystring

Attribute by which the retrieved records should be sorted. Currently sorting through domainName only supported.

filterquerystring

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

CodeDescriptionSchema
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

2 properties
NameTypeRequiredDescription
domainstringYes

Tenant domain of the tenant.

ownersarray of OwnerYes

Responses

CodeDescriptionSchema
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

4 properties
NameTypeRequiredDescription
domainstringYes

Tenant domain of the tenant.

codestringYes

Tenant domain of the tenant.

purposePurpose
ownersarray of OwnerYes

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-idpathstringYes

tenant id

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-domainpathstringYes

tenant domain

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-domainpathstringYes

tenant domain

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-idpathstringYes

tenant id

Request body (required): application/json

This represents the tenant to be updated.

Schema: TenantPutModel

1 property
NameTypeRequiredDescription
activatedboolean

Active status of the tenant.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-idpathstringYes

tenant id

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-idpathstringYes

tenant id

owner-idpathstringYes

owner id

additionalClaimsquerystring

Define set of additional user claims (as comma separated) to be returned.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-idpathstringYes

tenant id

owner-idpathstringYes

owner id

Request body (required): application/json

This represents the tenant owner to be updated.

Schema: OwnerPutModel

5 properties
NameTypeRequiredDescription
emailstringYes

Email address of the owner.

passwordstring

Password of the owner.

firstnamestringYes

First name of the owner.

lastnamestringYes

Last name of the owner.

additionalClaimsarray of AdditionalClaims

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-idpathstringYes

tenant id

Responses

CodeDescriptionSchema
204

Successfully Deleted

400

Bad Request

Error
401

Unauthorized

403

Forbidden

404

Not Found

Error
500

Server Error

Error

Schemas​

TenantModel​

Type: object

2 properties
NameTypeRequiredDescription
domainstringYes

Tenant domain of the tenant.

ownersarray of OwnerYes

ChannelVerifiedTenantModel​

Type: object

4 properties
NameTypeRequiredDescription
domainstringYes

Tenant domain of the tenant.

codestringYes

Tenant domain of the tenant.

purposePurpose
ownersarray of OwnerYes

TenantListItem​

Type: object

6 properties
NameTypeRequiredDescription
idstring

tenant id of the tenant owner.

domainstring

Tenant domain of the tenant.

ownersarray of OwnerResponse
createdDatestring

Tenant created time.

lifecycleStatusLifeCycleStatus
regionstring

Region of the tenant.

TenantsListResponse​

Type: object

5 properties
NameTypeRequiredDescription
totalResultsinteger
startIndexinteger
countinteger
linksarray of Link
tenantsarray of TenantListItem

TenantResponseModel​

Type: object

6 properties
NameTypeRequiredDescription
idstring

tenant id of the tenant owner.

domainstring

Tenant domain of the tenant.

ownersarray of OwnerResponse
createdDatestring

Tenant created time in ISO-8601 format.

lifecycleStatusLifeCycleStatus
regionstring

Region of the tenant.

TenantPutModel​

Type: object

1 property
NameTypeRequiredDescription
activatedboolean

Active status of the tenant.

Owner​

Type: object

7 properties
NameTypeRequiredDescription
usernamestringYes

Username for the tenant owner.

passwordstring

Password of the owner.

emailstringYes

Email address of the owner.

firstnamestring

First name of the owner.

lastnamestring

Last name of the owner.

provisioningMethodstringYes

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.

additionalClaimsarray of AdditionalClaims

OwnerPutModel​

Type: object

5 properties
NameTypeRequiredDescription
emailstringYes

Email address of the owner.

passwordstring

Password of the owner.

firstnamestringYes

First name of the owner.

lastnamestringYes

Last name of the owner.

additionalClaimsarray of AdditionalClaims

OwnerInfoResponse​

Type: object

6 properties
NameTypeRequiredDescription
idstring

id of the tenant owner.

usernamestring

Username for the tenant owner.

emailstring

Email address of the owner.

firstnamestring

First name of the owner.

lastnamestring

Last name of the owner.

additionalClaimsarray of AdditionalClaims

OwnerResponse​

Type: object

2 properties
NameTypeRequiredDescription
idstring

id of the tenant owner.

usernamestring

user name of the tenant owner.

AdditionalClaims​

Type: object

2 properties
NameTypeRequiredDescription
claimstring

Claim uri.

valuestring

Mobile number of the tenant owner.

Attribute​

Type: object

2 properties
NameTypeRequiredDescription
keystring

Name of the organization.

valuestring

Name of the organization.

Purpose​

Type: object

2 properties
NameTypeRequiredDescription
namestringYes
attributesarray of Attribute

LifeCycleStatus​

Type: object

1 property
NameTypeRequiredDescription
activatedboolean

Status of the tenant life cycle

Type: object

2 properties
NameTypeRequiredDescription
hrefstring

Path to the target resource.

relstring

Describes how the current context is related to the target resource

Error​

Type: object

4 properties
NameTypeRequiredDescription
codestringYes
messagestringYes
descriptionstring
traceIdstring

Was this page helpful?