You can get details of the tenants in Private PaaS using the CLI tool or REST API as shown below:
Getting details of tenants via the CLI
Overview
CLI command |
|
Description | Retrieving details of all tenants. |
Example
Retrieve details of all the available tenants.
list-tenants
Sample output
Tenants: +-----------+-----------+-------------+-----------+------------------------------+ | Domain | Tenant ID | Email | State | Created Date | +-----------+-----------+-------------+-----------+------------------------------+ | frank.com | 1 | [email protected] | De-active | Wed Oct 14 11:39:14 IST 2015 | +-----------+-----------+-------------+-----------+------------------------------+ | myers.com | 2 | [email protected] | Active | Wed Oct 14 12:10:11 IST 2015 | +-----------+-----------+-------------+-----------+------------------------------+
Getting details of tenants via the REST API
Overview
Description | Retrieving details of all the tenants. |
Resource Path | /tenants |
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
|
Example
Retrieve details of all the available tenants.
curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/tenants
Sample output
The createdDate
is given in the Epoch time format.
> GET /api/tenants 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 04:49:31 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Server: WSO2 Carbon Server < * Connection #0 to host localhost left intact [{"active":false,"createdDate":1444802954640,"email":"[email protected]","tenantDomain":"frank.com","tenantId":1},{"active":true,"createdDate":1444804811968,"email":"[email protected]","tenantDomain":"myers.com","tenantId":2}
You will come across the following HTTP status codes while getting the details of tenants in Private PaaS:
HTTP status code | 200, 500 See the descriptions of the HTTP status codes here. |
Overview
Content Tools
Activity