> For the complete documentation index, see [llms.txt](https://docs.platform9.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.platform9.com/api-docs/identity-service/tenants.md).

# Tenants

Tenant management operations

## List tenants

> Lists tenants

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Identity API v3","version":"3.14"},"tags":[{"name":"Tenants","description":"Tenant management operations"}],"servers":[{"url":"https://{host}/keystone/v3","description":"PCD Identity API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","description":"Authentication token obtained from the authentication service","name":"X-Auth-Token","in":"header"}},"parameters":{"X-Auth-Token":{"name":"X-Auth-Token","description":"A valid authentication token","schema":{"type":"string"},"in":"header","required":true},"limit":{"name":"limit","description":"Requests a page size of items","schema":{"minimum":1,"type":"integer"},"in":"query","required":false},"marker":{"name":"marker","description":"The ID of the last-seen item for pagination","schema":{"type":"string"},"in":"query","required":false}},"schemas":{"ProjectsResponse":{"required":["projects","links"],"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"links":{"$ref":"#/components/schemas/Links"}}},"Project":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"domain_id":{"type":"string"},"domain":{"$ref":"#/components/schemas/Domain"},"parent_id":{"type":"string"},"is_domain":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"options":{"type":"object"},"links":{"$ref":"#/components/schemas/Links"}}},"Domain":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"links":{"$ref":"#/components/schemas/Links"},"options":{"type":"object"}}},"Links":{"required":["self"],"type":"object","properties":{"self":{"type":"string"},"previous":{"nullable":true,"type":"string"},"next":{"nullable":true,"type":"string"}}},"Error":{"required":["error"],"type":"object","properties":{"error":{"required":["code","message","title"],"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"title":{"type":"string"}}}}}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Some content in the request was invalid"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"User must authenticate before making a request"},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Policy does not allow current user to do this operation"}}},"paths":{"/projects":{"get":{"tags":["Tenants"],"parameters":[{"$ref":"#/components/parameters/X-Auth-Token"},{"name":"domain_id","description":"Filter by domain ID","schema":{"type":"string"},"in":"query","required":false},{"name":"enabled","description":"Filter by enabled status","schema":{"type":"boolean"},"in":"query","required":false},{"name":"is_domain","description":"Filter by is_domain flag","schema":{"type":"boolean"},"in":"query","required":false},{"name":"name","description":"Filter by tenant name","schema":{"type":"string"},"in":"query","required":false},{"name":"parent_id","description":"Filter by parent tenant ID","schema":{"type":"string"},"in":"query","required":false},{"name":"tags","description":"Filter by tags","schema":{"type":"string"},"in":"query","required":false},{"name":"tags-any","description":"Filter by any of the specified tags","schema":{"type":"string"},"in":"query","required":false},{"name":"not-tags","description":"Filter by not having any of the specified tags","schema":{"type":"string"},"in":"query","required":false},{"name":"not-tags-any","description":"Filter by not having all of the specified tags","schema":{"type":"string"},"in":"query","required":false},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/marker"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}},"description":"Tenants listed successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"summary":"List tenants","description":"Lists tenants"}}}}
```

## Create tenant

> Creates a tenant

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Identity API v3","version":"3.14"},"tags":[{"name":"Tenants","description":"Tenant management operations"}],"servers":[{"url":"https://{host}/keystone/v3","description":"PCD Identity API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","description":"Authentication token obtained from the authentication service","name":"X-Auth-Token","in":"header"}},"schemas":{"ProjectRequest":{"required":["project"],"type":"object","properties":{"project":{"required":["name"],"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"domain_id":{"type":"string"},"parent_id":{"type":"string"},"is_domain":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"options":{"type":"object"}}}}},"ProjectResponse":{"required":["project"],"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}}},"Project":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"domain_id":{"type":"string"},"domain":{"$ref":"#/components/schemas/Domain"},"parent_id":{"type":"string"},"is_domain":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"options":{"type":"object"},"links":{"$ref":"#/components/schemas/Links"}}},"Domain":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"links":{"$ref":"#/components/schemas/Links"},"options":{"type":"object"}}},"Links":{"required":["self"],"type":"object","properties":{"self":{"type":"string"},"previous":{"nullable":true,"type":"string"},"next":{"nullable":true,"type":"string"}}},"Error":{"required":["error"],"type":"object","properties":{"error":{"required":["code","message","title"],"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"title":{"type":"string"}}}}}},"parameters":{"X-Auth-Token":{"name":"X-Auth-Token","description":"A valid authentication token","schema":{"type":"string"},"in":"header","required":true}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Some content in the request was invalid"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"User must authenticate before making a request"},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Policy does not allow current user to do this operation"},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"This operation conflicted with another operation on this resource"}}},"paths":{"/projects":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRequest"}}},"required":true},"tags":["Tenants"],"parameters":[{"$ref":"#/components/parameters/X-Auth-Token"}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}},"description":"Tenant created successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"}},"summary":"Create tenant","description":"Creates a tenant"}}}}
```

## Show tenant details

> Shows details for a tenant

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Identity API v3","version":"3.14"},"tags":[{"name":"Tenants","description":"Tenant management operations"}],"servers":[{"url":"https://{host}/keystone/v3","description":"PCD Identity API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","description":"Authentication token obtained from the authentication service","name":"X-Auth-Token","in":"header"}},"parameters":{"X-Auth-Token":{"name":"X-Auth-Token","description":"A valid authentication token","schema":{"type":"string"},"in":"header","required":true}},"schemas":{"ProjectResponse":{"required":["project"],"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}}},"Project":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"domain_id":{"type":"string"},"domain":{"$ref":"#/components/schemas/Domain"},"parent_id":{"type":"string"},"is_domain":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"options":{"type":"object"},"links":{"$ref":"#/components/schemas/Links"}}},"Domain":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"links":{"$ref":"#/components/schemas/Links"},"options":{"type":"object"}}},"Links":{"required":["self"],"type":"object","properties":{"self":{"type":"string"},"previous":{"nullable":true,"type":"string"},"next":{"nullable":true,"type":"string"}}},"Error":{"required":["error"],"type":"object","properties":{"error":{"required":["code","message","title"],"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"title":{"type":"string"}}}}}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Some content in the request was invalid"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"User must authenticate before making a request"},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Policy does not allow current user to do this operation"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource could not be found"}}},"paths":{"/projects/{project_id}":{"get":{"tags":["Tenants"],"parameters":[{"$ref":"#/components/parameters/X-Auth-Token"},{"name":"project_id","description":"The tenant ID","schema":{"type":"string"},"in":"path","required":true},{"name":"include_limits","description":"Include tenant limits in response","schema":{"type":"boolean"},"in":"query","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}},"description":"Tenant details retrieved successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Show tenant details","description":"Shows details for a tenant"}}}}
```

## Delete tenant

> Deletes a tenant

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Identity API v3","version":"3.14"},"tags":[{"name":"Tenants","description":"Tenant management operations"}],"servers":[{"url":"https://{host}/keystone/v3","description":"PCD Identity API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","description":"Authentication token obtained from the authentication service","name":"X-Auth-Token","in":"header"}},"parameters":{"X-Auth-Token":{"name":"X-Auth-Token","description":"A valid authentication token","schema":{"type":"string"},"in":"header","required":true}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Some content in the request was invalid"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"User must authenticate before making a request"},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Policy does not allow current user to do this operation"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource could not be found"}},"schemas":{"Error":{"required":["error"],"type":"object","properties":{"error":{"required":["code","message","title"],"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"title":{"type":"string"}}}}}}},"paths":{"/projects/{project_id}":{"delete":{"tags":["Tenants"],"parameters":[{"$ref":"#/components/parameters/X-Auth-Token"},{"name":"project_id","description":"The tenant ID","schema":{"type":"string"},"in":"path","required":true}],"responses":{"204":{"description":"Tenant deleted successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Delete tenant","description":"Deletes a tenant"}}}}
```

## Update tenant

> Updates a tenant

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Identity API v3","version":"3.14"},"tags":[{"name":"Tenants","description":"Tenant management operations"}],"servers":[{"url":"https://{host}/keystone/v3","description":"PCD Identity API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","description":"Authentication token obtained from the authentication service","name":"X-Auth-Token","in":"header"}},"schemas":{"ProjectRequest":{"required":["project"],"type":"object","properties":{"project":{"required":["name"],"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"domain_id":{"type":"string"},"parent_id":{"type":"string"},"is_domain":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"options":{"type":"object"}}}}},"ProjectResponse":{"required":["project"],"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}}},"Project":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"domain_id":{"type":"string"},"domain":{"$ref":"#/components/schemas/Domain"},"parent_id":{"type":"string"},"is_domain":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"options":{"type":"object"},"links":{"$ref":"#/components/schemas/Links"}}},"Domain":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"links":{"$ref":"#/components/schemas/Links"},"options":{"type":"object"}}},"Links":{"required":["self"],"type":"object","properties":{"self":{"type":"string"},"previous":{"nullable":true,"type":"string"},"next":{"nullable":true,"type":"string"}}},"Error":{"required":["error"],"type":"object","properties":{"error":{"required":["code","message","title"],"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"title":{"type":"string"}}}}}},"parameters":{"X-Auth-Token":{"name":"X-Auth-Token","description":"A valid authentication token","schema":{"type":"string"},"in":"header","required":true}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Some content in the request was invalid"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"User must authenticate before making a request"},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Policy does not allow current user to do this operation"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource could not be found"},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"This operation conflicted with another operation on this resource"}}},"paths":{"/projects/{project_id}":{"patch":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRequest"}}},"required":true},"tags":["Tenants"],"parameters":[{"$ref":"#/components/parameters/X-Auth-Token"},{"name":"project_id","description":"The tenant ID","schema":{"type":"string"},"in":"path","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}},"description":"Tenant updated successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}},"summary":"Update tenant","description":"Updates a tenant"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.platform9.com/api-docs/identity-service/tenants.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
