Skip to main content

API Keys

Operations for viewing and generating API keys used to authenticate Infrahub API requests.

Endpoint NameURLDescription
Generate API KeyGET /api-key/generateGenerates a new API key that can be used to authenticate requests.
List API KeysGET /api-keyRetrieves a list of your API keys.
Update API keyPUT /api-key/{api_key_id}Modifies the name and optional description of an existing API key.
Delete API keyDELETE /api-key/{api_key_id}Deletes an API key.

The API key object

API keys endpoints return the api_keys object, offering comprehensive details about your API keys used for authentication. This includes the name, ID, API key value, creation timestamp, and a description if provided.


Attributes of the api_keys object


created_at date-time

The timestamp when the API key was created, presented in ISO 8601 format.


key string

The API key value used to authenticate API requests.


description string

An optional description of the API key.


id string

The API key ID.


name string

The name of the API key.


Response
{
"created_at": "2024-06-14T13:29:50",
"key": "********-****-****-****-********11bb",
"description": "This is an example API key.",
"id": 58,
"name": "example-api-key"
}

Back to top