Write Tenant


This request overwrites tenant attributes.

Resource

PUT /tenants/<OID>

Where OID is the database ID of the tenant (the databaseId field).

Parameters

None

Payload

Response

The tenant object. Created sub-objects are updated with their object ID.

Context

Authorization

Master

Configuration

Multi-tenant

Errors

HTTP code Xelion code Description

400

10063

Not the master tenant.

10200

No tenant object specified

10202

Failed to decode the tenant object

10203

The tenant ID mismatches the tenant the resource specifies

403

10101

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

404

10060

No multi-tenant configuration.

10100

No tenant with the specified ID exists.

Example

Request
PUT https://xelion.nl/api/v1/master/tenants/11
Payload
{
    "databaseId": 11,
    "subDatabaseName": "pbx11",
    "licenseCounts": [
    {
      "maxLicenses": 10,
      "objectType": "X1LicenseCount",
      "changeType": "Created",
      "license": {
        "commonName": "license.phone",
        "oid": "1585938",
        "objectType": "X1License",
        "changeType": "Unmodified"
      }
    }],
    "commonName": "pbx11",
    "objectType": "XCCTenant",
    "changeType": "Modified"
}
Response
{
  "object": {
    "databaseId": 11,
    "subDatabaseName": "pbx11",
    "licenseCounts": [
      {
        "license": {
          "commonName": "license.phone",
          "oid": "1585938",
          "objectType": "X1License",
          "changeType": "Unmodified"
        },
        "maxLicenses": 10,
        "oid": "1596023",
        "objectType": "X1LicenseCount",
        "changeType": "Unmodified"
      }
    ],
    "commonName": "pbx11",
    "objectType": "XCCTenant",
    "changeType": "Unmodified"
  },
  "links": [
    {
      "rel": "self",
      "href": "http://www.xelion.nl/api/v1/master/tenants/11",
      "method": "GET"
    }
  ]
}