English

Tenants

Contributors ciarm dmp-netapp Download PDF of this page

Use the methods listed in the following table to retrieve, create, modify, and delete tenants.

HTTP Method Path Description

GET

/v2.1/tenants

Retrieve a list of all tenants.

GET

/v2.1/tenants/{id}

Retrieve a tenant by the tenant ID.

POST

/v2.1/tenants

Create a new tenant.

PUT

/v2.1/tenants/{id}

Modify the details of a tenant.

DELETE

/v2.1/tenants/{id}

Delete a tenant.

Tenant attributes

The following table lists the tenant attributes.

Attribute Type Description

id

String

The unique identifier of the tenant.

code

String

A customer-specified (or default) code that represents the tenant. This attribute can contain lowercase letters, numbers, and underscores.

name

String

The tenant name.

zuora_account_name

String

The billing account name: the name of the subscription in Zuora.

zuora_account_number

String

The billing account number: the subscription number in Zuora.

description

String

The description of the tenant.

usage

The services and service details applicable to the tenant. For each service level, this attribute displays the following:
name: Service level name
used_size_gb: Service level name
role_name: User role (user, admin, read, partner, or root)

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

GET

/v2.1/tenants

Retrieve all tenants.

offset and limit – see Common Pagination

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

GET

/v2.1/tenants/{id}

Retrieve the tenant specified by the ID.

id (string): The unique identifier of the tenant.

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

POST

/v2.1/tenants

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

PUT

/v2.1/tenants/{id}

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.

id (string): The unique identifier 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

/v2.1/tenants/{id}

Delete the tenant specified by the ID.

id (string): The unique identifier of the tenant.

Required request body attributes: none

Request body example:

none

Response body example:

No content for successful delete