List Tenants


This request returns a list of tenant objects.

Resource

GET /tenants[?parameters]

Parameters

Name Type Description

name

String

Select tenants whose name matches this string.

reseller_name

String

Select tenants whose resellerName field matches this string.

limit

Integer

The maximum number of objects to return. Default: 15.

order

[ascending|decending]

Sort results in descending or ascending order. Default: ascending.

before

[id]

Return tenants with ID smaller than this ID.

after

[id]

Return tenants with ID larger than this ID.

where

[String]

Additional search fields. The fields isTemplate and active are supported:
-where=isTemplate=[true|false]
-where=active=[true|false]

include

[String]
separate by comma if you want to include multiple fields

Include fields to the result. include=[included fields]
-dbUsage → database disk usage of the database
-mohUsage → disk usage of music-on-hold
-monitorUsage → disk usage of the temporary call recordings
-callRecordingUsage → size of the call recordings in the database
-chatAttachmentUsage → size of the chat attachments in the database
-mailAttachmentUsage → size of the mail attachments in the database
-voicemailUsage → size of the voicemails in the database
-totalAttachmentUsage → size of all attachments in the database
-totalUsage → total disk usage
-resellerName → the name of the reseller of this tenant
-licenseCounts → the tenant’s licenses -statistics.whatsAppGateways → the tenant’s WhatsApp gateways -statistics.whatsAppUsage → the tenant’s WhatsApp usage (only use the when really needed)

Payload

None

Response

Context

Authorization

Master

Configuration

Multi-tenant

Errors

HTTP code Xelion code Description

403

10101

Resource not accessable. User is not a master tenant administrator.

404

10060

No multi-tenant configuration.

Example

Request
GET https://xelion.nl/api/v1/master/tenants?after=0&limit=2
Response
{
  "data": [
    {
      "object": {
        "commonName": "pbx1",
        "oid": "1",
        "active": true,
        "subDatabaseName": "pbx1",
        "objectType": "XCCTenant"
      },
      "links": [
        {
          "rel": "self",
          "href": "http://www.xelion.nl/api/v1/master/tenants/1",
          "method": "GET"
        }
      ]
    },
    {
      "object": {
        "commonName": "pbx2",
        "oid": "2",
        "active": true,
        "subDatabaseName": "pbx2",
        "objectType": "XCCTenant"
      },
      "links": [
        {
          "rel": "self",
          "href": "http://www.xelion.nl/api/v1/master/tenants/2",
          "method": "GET"
        }
      ]
    }
  ],
  "meta": {
    "links": [
      {
        "rel": "refresh",
        "href": "http://www.xelion.nl/api/v1/master/tenants",
        "method": "GET"
      },
      {
        "rel": "next",
        "href": "http://www.xelion.nl/api/v1/master/tenants?after=2",
        "method": "GET"
      },
      {
        "rel": "previous",
        "href": "http://www.xelion.nl/api/v1/master/tenants?before=1",
        "method": "GET"
      }
    ],
    "paging": {
      "previousId": "1",
      "nextId": "2"
    }
  }
}