You can get the details of a tenant using the CLI tool or REST API as shown below:
Getting details of a tenant via the CLI
Overview
CLI command |
|
Description | Retrieve details of a specific tenant. |
Command format | describe-tenant <TENANT_DOMAIN_NAME> |
Example
Retrieve details of the tenant with the domain name: frank.com.
describe-tenant frank.com
Sample output
------------------------------------- Tenant Information: ------------------------------------- Tenant domain: frank.com ID: 1 Email: [email protected] Active: true Created date: Wed Oct 14 11:39:14 IST 2015
Getting details of a tenant via the REST API
Overview
Description | Retrieve details of a tenant. Based on the response it will be possible to decide whether a certain domain name is available or not. |
Resource Path | /tenants/{tenantDomain} |
HTTP Method | GET |
Request/Response Format | application/json |
Command format | curl -X GET -H "Content-Type: application/json" -k -v -u <USERNAME>:<PASSWORD> https://<PRIVATE_PAAS_HOST>:<PRIVATE_PAAS_HTTPS_PORT>/api/tenants/{tenantDomain}
|
Example
Retrieve details of the tenant with the domain name: frank.com.
curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/tenants/frank.com
Sample output
The createdDate
is given in the Epoch time format.
> GET /api/tenants/frank.com HTTP/1.1 > Host: localhost:9443 > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.43.0 > Accept: */* > Content-Type: application/json > < HTTP/1.1 200 OK < Date: Thu, 15 Oct 2015 05:15:43 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Server: WSO2 Carbon Server < {"active":true,"admin":"admin","createdDate":1444802954640,"email":"[email protected]","firstName":"Frank","lastName":"Myers","tenantDomain":"frank.com","tenantId":1}
You will come across the following HTTP status codes while getting the details of a tenant:
HTTP status code | 200, 404, 500 See the descriptions of the HTTP status codes here. |
Overview
Content Tools
Activity