v1

latestOpenAPI 3.0.02026-07-141,4077,1665.2 MB
Key Management

Get all API keys

List all API keys available for your account.

get/api/v2/api_keys

Query parameters

page[size]integer
Example:10

Size for a given page. The maximum allowed value is 100.

page[number]integer

Specific page number to return.

sort'created_at' | '-created_at' | 'last4' | '-last4' | 'modified_at' | '-modified_at' | 'name' | '-name'

Sorting options

API key attribute used to sort results. Sort order is ascending by default. In order to specify a descending sort, prefix the attribute with a minus sign.

filterstring

Filter API keys by the specified string.

filter[created_at][start]string
Example:2020-11-24T18:46:21+00:00

Only include API keys created on or after the specified date.

filter[created_at][end]string
Example:2020-11-24T18:46:21+00:00

Only include API keys created on or before the specified date.

filter[modified_at][start]string
Example:2020-11-24T18:46:21+00:00

Only include API keys modified on or after the specified date.

filter[modified_at][end]string
Example:2020-11-24T18:46:21+00:00

Only include API keys modified on or before the specified date.

includestring
Example:created_by,modified_by

Comma separated list of resource paths for related resources to include in the response. Supported resource paths are created_by and modified_by.

filter[remote_config_read_enabled]boolean

Filter API keys by remote config read enabled status.

filter[category]string

Filter API keys by category.

Response

OK

Example response

{
  "data": [
    {
      "attributes": {
        "created_at": "2020-11-23T10:00:00.000Z",
        "date_last_used": "2020-11-27T10:00:00.000Z",
        "last4": "abcd",
        "modified_at": "2020-11-23T10:00:00.000Z",
        "name": "API Key for submitting metrics"
      },
      "relationships": {
        "created_by": {
          "data": {
            "id": "00000000-0000-0000-2345-000000000000",
            "type": "users"
          }
        },
        "modified_by": {
          "data": {
            "id": "00000000-0000-0000-0000-000000000000",
            "type": "users"
          }
        }
      },
      "type": "api_keys"
    }
  ],
  "included": [
    {
      "relationships": {
        "org": {
          "data": {
            "id": "00000000-0000-beef-0000-000000000000",
            "type": "orgs"
          }
        },
        "other_orgs": {
          "data": []
        },
        "other_users": {
          "data": []
        },
        "roles": {
          "data": [
            {
              "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
              "type": "roles"
            }
          ]
        }
      },
      "type": "users"
    }
  ]
}