API Keys

List API keys

Lists the API keys the caller can access. The response shows the corpora each key can access and with what permissions.

Callers with the corpus_administrator, administrator, or owner role list every API key in the account. Users holding only other roles must set api_key_role to personal and receive only their own personal key; machine credentials — API keys, app clients, and service accounts — without one of those three roles cannot list keys at all.

get/v2/api_keys

Query parameters

limitinteger

The maximum number of API keys to return at one time.

page_keystring

The opaque cursor returned in metadata.page_key of the previous response. Omit it to fetch the first page.

corpus_keystring

A user-provided key for a corpus.

Example:my-corpus

Filters the API keys to only those with permissions on the specified corpus key.

api_key_role'serving' | 'serving_and_indexing' | 'personal'

The role of the API key. A personal key has the same permissions as its owner. A serving API key can only perform query type requests on its corpora, and a serving_and_indexing key can perform both indexing and query type requests; these two roles are deprecated for creation — assign roles with api_roles instead.

Filters API keys by their role. Callers that hold none of the corpus_administrator, administrator, or owner roles must set this parameter to personal; omitting it or setting any other value returns a 403 error.

Headers

Request-Timeoutinteger

The platform makes a best effort to complete the request in the specified seconds, or it times out.

Request-Timeout-Millisinteger

The platform makes a best effort to complete the request in the specified milliseconds, or it times out.

Response

The response includes an api_keys array with the API keys, and a metadata field with the pagination key.

Example response

{
  "metadata": {
    "page_key": "eyJvZmZzZXQiOjF9"
  }
}

Changes

Changed in 2 of the 7 revisions of this API.115

    • the // response's property type changed from string to no type for status

      response-property-type-changed

    • added to the // response property allOf list for the response status

      response-property-all-of-added

    • removed the personal enum value from the // response property for the response status

      response-property-enum-value-removed

    • removed the serving enum value from the // response property for the response status

      response-property-enum-value-removed

    • removed the serving_and_indexing enum value from the // response property for the response status

      response-property-enum-value-removed

    • response property api_keys/items/api_key_role reactivated

      response-property-reactivated

    • added the new agent_end_user enum value to the //// response property for the response status

      response-property-enum-value-added