You can deactivate a tenant using the CLI tool, REST API or the PPaaS Console as shown below:
Deactivating a tenant via the CLI
Overview
CLI command | deactivate-tenant |
Description | Deactivate a currently active tenant. |
Command format | deactivate-tenant <TENANT_DOMAIN> |
Parameter definition
Short option | Long option | Description | Required | Example value |
---|---|---|---|---|
N/A | N/A | Tenant domain | Yes | frank.com |
Example
Deactivate the tenant with the domain: frank.com.
deactivate-tenant frank.com
Sample output
You have successfully deactivated the tenant: frank.com
Deactivating a tenant via the REST API
Overview
Description | Deactivate a currently activate tenant. |
Resource Path | /tenants/deactivate/{tenantDomain} |
HTTP Method | POST |
Request/Response Format | application/json |
Command format | curl -X POST -H "Content-Type: application/json" -k -v -u <USERNAME>:<PASSWORD> https://<PRIVATE_PAAS_HOST>:<PRIVATE_PAAS_HTTPS_PORT>/api/tenants/deactivate/{tenantDomain}
|
Example
Deactivate the tenant with the domain: frank.com.
curl -X PUT -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/tenants/deactivate/frank.com
Sample output
> PUT /api/tenants/deactivate/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: Wed, 14 Oct 2015 13:07:30 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Server: WSO2 Carbon Server < * Connection #0 to host localhost left intact {"status":"success","message":"Tenant deactivated successfully: [tenant] frank.com"}
You will come across the following HTTP status codes while deactivating a tenant:
HTTP status code | 200, 404, 500 See the descriptions of the HTTP status codes here. |
Deactivating a tenant via the PPaaS Console
Follow the instructions below to deactivate a tenant:
- Click Users on the home page.
- Click Manage Tenants.
- Click Deactivate to deactivate the selected tenant.
- Click Yes to deactivate the tenant.
Overview
Content Tools
Activity