Link Search Menu Expand Document Documentation Menu

Get Tenants API

Introduced 1.0

Retrieves tenants. Specify a tenant name to retrieve one tenant, or omit the tenant name to retrieve all tenants.

Endpoints

GET /_plugins/_security/api/tenants
GET /_plugins/_security/api/tenants/{tenant}

Path parameters

The following table lists the available path parameters.

Parameter Data type Required Description
tenant String No The name of the tenant to retrieve. If omitted, all tenants are returned.

Example request

The following request retrieves all tenants:

GET _plugins/_security/api/tenants

The following request retrieves the human_resources tenant:

GET _plugins/_security/api/tenants/human_resources

Example response

The response to a request for all tenants contains the default tenants along with any that you created:

{
  "global_tenant": {
    "description": "Global tenant",
    "hidden": false,
    "reserved": true,
    "static": true
  },
  "admin_tenant": {
    "description": "Demo tenant for admin user",
    "hidden": false,
    "reserved": false,
    "static": false
  },
  "test-tenant": {
    "description": "A tenant for the test team.",
    "hidden": false,
    "reserved": false,
    "static": false
  },
  "human_resources": {
    "description": "A tenant for the human resources team.",
    "hidden": false,
    "reserved": false,
    "static": false
  }
}

When you retrieve one tenant, the response contains only that tenant:

{
  "human_resources": {
    "description": "A tenant for the human resources team.",
    "hidden": false,
    "reserved": false,
    "static": false
  }
}
350 characters left

Have a question? .

Want to contribute? or .