List Tenants

 
MethodURIDescription
GET/v2.0/tenants​{?marker,​limit}

Lists tenants to which the specified token has access.

GET /v2.0/tenants HTTP/1.1
Host: identity.api.openstack.org
Content-Type: application/json
X-Auth-Token: fa8426a0-8eaf-4d22-8e13-7c1b16a9370c
Accept: application/json

Normal response codes: 200, 203

Error response codes: identityFault (400, 500, ), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)

 Request

This table shows the header parameters for the list tenants request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token for an administrative user.

This operation does not require a request body.

 Response

 

Example 3.15. Get tenants: JSON response

{
    "tenants":[{
            "id":"1234",
            "name":"ACME Corp",
            "description":"A description ...",
            "enabled":true
        },
        {
            "id":"3456",
            "name":"Iron Works",
            "description":"A description ...",
            "enabled":true
        }
    ],
    "tenants_links":[]
}

 

Example 3.16. Get tenants: XML response

<?xml version="1.0" encoding="UTF-8"?>
<tenants xmlns="http://docs.openstack.org/identity/api/v2.0">
    <tenant enabled="true" id="1234" name="ACME Corp">
        <description>A description...</description>
    </tenant>
    <tenant enabled="true" id="3645" name="Iron Works">
        <description>A description...</description>
    </tenant>
</tenants>

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page

loading table of contents...