Tenants
Contributors
Download PDF of this page
Use the methods listed in the following table to retrieve, create, modify, and delete tenants.
HTTP Method | Path | Description |
---|---|---|
|
|
Retrieve a list of all tenants. |
|
|
Retrieve a tenant by the tenant ID. |
|
|
Create a new tenant. |
|
|
Modify the details of a tenant. |
|
|
Delete a tenant. |
Tenant attributes
The following table lists the tenant attributes.
Attribute | Type | Description |
---|---|---|
|
String |
The unique identifier of the tenant. |
|
String |
A customer-specified (or default) code that represents the tenant. This attribute can contain lowercase letters, numbers, and underscores. |
|
String |
The tenant name. |
|
String |
The billing account name: the name of the subscription in Zuora. |
|
String |
The billing account number: the subscription number in Zuora. |
|
String |
The description of the tenant. |
|
– |
The services and service details applicable to the tenant. For each service level, this attribute displays the following: |
Retrieve all tenants
Use the method listed in the following table to retrieve all tenants or a subset of all tenants.
HTTP Method | Path | Description | Parameters |
---|---|---|---|
|
|
Retrieve all tenants. |
|
Required request body attributes: none
Request body example:
none
Response body example:
{ "status": { "user_message": "Okay. Returned 2 records.", "verbose_message": "", "code": 200 }, "result": { "returned_records": 2, "total_records": 23, "sort_by": "created", "order_by": "desc", "offset": 0, "limit": 2, "records": [ { "id": "5e7c3af7aab46c00014ce877", "name": "MyTenant", "zuora_account_name": "MyAccount", "zuora_account_number": "A00000415", "description": "", "code": "mytenantcode", "usage": { "A-S00003875": [ { "service_level": "extreme", "consumed": 0, "committed": 10, "burst": 0 }, { "service_level": "standard", "consumed": 1.94, "committed": 30, "burst": 0 } ], "A-S00004566": [ { "service_level": "object", "consumed": 3.31, "committed": 300, "burst": 0 } ] } }, { "id": "5d914499869caefed0f39eee", "name": "MyOrg", "zuora_account_name": "MyOrg Inc", "zuora_account_number": "A00000415", "description": "", "code": "myorg", "usage": { "A-S00003875": [ { "service_level": "standard", "consumed": 12.33, "committed": 30, "burst": 0 }, { "service_level": "object", "consumed": 0, "committed": 40, "burst": 0 } ], "A-S00003969": [ { "service_level": "extreme", "consumed": 0, "committed": 5, "burst": 0 } ] } } ] } }
Retrieve a tenant by ID
Use the method listed in the following table to retrieve a tenant by ID.
HTTP Method | Path | Description | Parameters |
---|---|---|---|
|
|
Retrieve the tenant specified by the ID. |
|
Required request body attributes: none
Request body example:
none
Response body example:
{ "status": { "user_message": "Okay. Returned 1 record.", "verbose_message": "", "code": 200 }, "result": { "returned_records": 1, "records": [ { "id": "5e7c3af7aab46c00014ce877", "name": "MyTenant", "zuora_account_name": "MyAccount", "zuora_account_number": "A00000415", "description": "", "code": "mytenantcode", "usage": { "A-S00003875": [ { "service_level": "extreme", "consumed": 0, "committed": 10, "burst": 0 }, { "service_level": "premium", "consumed": 2.4, "committed": 20, "burst": 0 }, { "service_level": "standard", "consumed": 1.94, "committed": 30, "burst": 0 }, { "service_level": "object", "consumed": 0, "committed": 40, "burst": 0 } ], "A-S00003969": [ { "service_level": "extreme", "consumed": 0, "committed": 5, "burst": 0 }, { "service_level": "standard", "consumed": 0, "committed": 30, "burst": 0 } ], "A-S00004566": [ { "service_level": "object", "consumed": 3.31, "committed": 300, "burst": 0 } ] } } ] } }
Create a tenant
Use the method listed in the following table to create a tenant.
HTTP Method | Path | Description | Parameters |
---|---|---|---|
|
|
Create a new tenant. |
None |
Required request body attributes: code
, name
, zuora_account_name
, zuora_account_number
Request body example:
{ "name": "MyNewTenant", "code": "mytenant", "zuora_account_name": "string", "zuora_account_number": "A00000415", "description": "DescriptionOfMyTenant" }
Response body example:
{ "status": { "user_message": "Okay. New resource created.", "verbose_message": "", "code": 201 }, "result": { "returned_records": 1, "records": [ { "id": "5ed5ac802c356a0001a735af", "name": "MyNewTenant", "zuora_account_name": "string", "zuora_account_number": "A00000415", "description": "DescriptionOfMyTenant", "code": "mytenant", "usage": null } ] } }
Modify the tenant
Use the method listed in the following table to modify the tenant.
HTTP Method | Path | Description | Parameters |
---|---|---|---|
|
|
Modify the tenant specified by the ID. You can change the name, the Zuora subscription details (account name or subscription number), and the description of the tenant. |
|
Required request body attributes: code
Request body example:
{ "name": "MyNewTenant", "code": "mytenant", "zuora_account_name": "string", "zuora_account_number": "A00000415", "description": "New description of my tenant" }
Response body example:
{ "status": { "user_message": "Okay. Returned 1 record.", "verbose_message": "", "code": 200 }, "result": { "returned_records": 1, "records": [ { "id": "5ed5ac802c356a0001a735af", "name": "MyNewTenant", "zuora_account_name": "string", "zuora_account_number": "A00000415", "description": "New description of my tenant", "code": "mytenant", "usage": null } ] } }
Delete the tenant
Use the method listed in the following table to delete the tenant.
HTTP Method | Path | Description | Parameters |
---|---|---|---|
|
|
Delete the tenant specified by the ID. |
|
Required request body attributes: none
Request body example:
none
Response body example:
No content for successful delete