> 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/credentials.md).

# Credentials

Credential management operations

## List credentials

> Lists all credentials, optionally filtered by user\_id or type

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Identity API v3","version":"3.14"},"tags":[{"name":"Credentials","description":"Credential 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":{"CredentialsResponse":{"required":["credentials","links"],"type":"object","properties":{"credentials":{"type":"array","items":{"$ref":"#/components/schemas/Credential"}},"links":{"$ref":"#/components/schemas/Links"}}},"Credential":{"required":["id","user_id","type","blob"],"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"project_id":{"type":"string"},"type":{"type":"string"},"blob":{"type":"string"},"links":{"$ref":"#/components/schemas/Links"}}},"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":{"/credentials":{"get":{"tags":["Credentials"],"parameters":[{"$ref":"#/components/parameters/X-Auth-Token"},{"name":"user_id","description":"Filter by user ID","schema":{"type":"string"},"in":"query","required":false},{"name":"type","description":"Filter by credential type","schema":{"type":"string"},"in":"query","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialsResponse"}}},"description":"Credentials listed successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"summary":"List credentials","description":"Lists all credentials, optionally filtered by user_id or type"}}}}
```

## Create credential

> Creates a credential

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Identity API v3","version":"3.14"},"tags":[{"name":"Credentials","description":"Credential 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":{"CredentialRequest":{"required":["credential"],"type":"object","properties":{"credential":{"required":["user_id","type","blob"],"type":"object","properties":{"user_id":{"type":"string"},"project_id":{"type":"string"},"type":{"type":"string"},"blob":{"type":"string"}}}}},"CredentialResponse":{"required":["credential"],"type":"object","properties":{"credential":{"$ref":"#/components/schemas/Credential"}}},"Credential":{"required":["id","user_id","type","blob"],"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"project_id":{"type":"string"},"type":{"type":"string"},"blob":{"type":"string"},"links":{"$ref":"#/components/schemas/Links"}}},"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":{"/credentials":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialRequest"}}},"required":true},"tags":["Credentials"],"parameters":[{"$ref":"#/components/parameters/X-Auth-Token"}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}},"description":"Credential created 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":"Create credential","description":"Creates a credential"}}}}
```

## Show credential details

> Shows details for a credential

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Identity API v3","version":"3.14"},"tags":[{"name":"Credentials","description":"Credential 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":{"CredentialResponse":{"required":["credential"],"type":"object","properties":{"credential":{"$ref":"#/components/schemas/Credential"}}},"Credential":{"required":["id","user_id","type","blob"],"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"project_id":{"type":"string"},"type":{"type":"string"},"blob":{"type":"string"},"links":{"$ref":"#/components/schemas/Links"}}},"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":{"/credentials/{credential_id}":{"get":{"tags":["Credentials"],"parameters":[{"$ref":"#/components/parameters/X-Auth-Token"},{"name":"credential_id","description":"The credential ID","schema":{"type":"string"},"in":"path","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}},"description":"Credential 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 credential details","description":"Shows details for a credential"}}}}
```

## Delete credential

> Deletes a credential

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Identity API v3","version":"3.14"},"tags":[{"name":"Credentials","description":"Credential 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"},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"This operation conflicted with another operation on this resource"}},"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":{"/credentials/{credential_id}":{"delete":{"tags":["Credentials"],"parameters":[{"$ref":"#/components/parameters/X-Auth-Token"},{"name":"credential_id","description":"The credential ID","schema":{"type":"string"},"in":"path","required":true}],"responses":{"204":{"description":"Credential deleted 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":"Delete credential","description":"Deletes a credential"}}}}
```

## Update credential

> Updates a credential

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Identity API v3","version":"3.14"},"tags":[{"name":"Credentials","description":"Credential 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":{"CredentialRequest":{"required":["credential"],"type":"object","properties":{"credential":{"required":["user_id","type","blob"],"type":"object","properties":{"user_id":{"type":"string"},"project_id":{"type":"string"},"type":{"type":"string"},"blob":{"type":"string"}}}}},"CredentialResponse":{"required":["credential"],"type":"object","properties":{"credential":{"$ref":"#/components/schemas/Credential"}}},"Credential":{"required":["id","user_id","type","blob"],"type":"object","properties":{"id":{"type":"string"},"user_id":{"type":"string"},"project_id":{"type":"string"},"type":{"type":"string"},"blob":{"type":"string"},"links":{"$ref":"#/components/schemas/Links"}}},"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":{"/credentials/{credential_id}":{"patch":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialRequest"}}},"required":true},"tags":["Credentials"],"parameters":[{"$ref":"#/components/parameters/X-Auth-Token"},{"name":"credential_id","description":"The credential ID","schema":{"type":"string"},"in":"path","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}},"description":"Credential 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 credential","description":"Updates a credential"}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
