This documentation is for WSO2 Private PaaS 4.1.0. View documentation for the latest release.
Getting Details of a Tenant - WSO2 Private PaaS 4.1.0 - WSO2 Documentation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
||
Skip to end of metadata
Go to start of metadata

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

describe-tenant

DescriptionRetrieve 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
DescriptionRetrieve 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 MethodGET
Request/Response Formatapplication/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}
  • By default, <USERNAME>:<PASSWORD> is admin:admin.
  • By default, <PRIVATE_PAAS_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified.
  • By default, <PRIVATE_PAAS_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n, the default port value needs to be incremented by n.
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.

 


 

 

  • No labels