Get First Available Tenant
This request returns the information of the first avilable (database loaded, but empty) tenant that can be used in a multi tenants system.
Resource
GET /tenants/first_available
Parameters
None
Payload
None
Response
Context
Authorization |
Master |
Configuration |
Multi-tenant |
Errors
HTTP code | Xelion code | Description |
---|---|---|
400 |
10063 |
Not the master tenant. |
403 |
10101 |
Resource not accessable. User is not a master tenant administrator. |
404 |
10060 |
No multi-tenant configuration. |
10100 |
No available tenant found. |
Example
Request
GET https://xelion.nl/api/v1/master/tenants/first_available
Response
{
"object": {
"databaseId": 14,
"subDatabaseName": "pbx14",
"active": false,
"statusEnum": "AVAILABLE",
"licenseCounts": [],
"dbUsage": 0,
"mohUsage": 0,
"monitorUsage": 0,
"totalUsage": 0,
"permissions": "ReadWriteRemove",
"commonName": "pbx14",
"oid": "14",
"objectType": "XCCTenant"
},
"links": [
{
"rel": "self",
"href": "http://localhost:8080/api/v1/master/tenants/14",
"method": "GET"
}
]
}