Get an API key from its uid or key field.

GET /keys/{uid_or_key}

Get an API Key

Path parameters

  • uidOrKey string Required

    The uid or the key field value of the API Key.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • uid string

      A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.

    • key string

      The derived key to use in the Authorization header to authorize requests. Generated by Meilisearch with an HMAC, using an SHA-256 hash, of the uid and the master key.

    • actions array[string] Required

      A list of actions permitted for the key. [""] for all actions. The * character can be used as a wildcard when located at the last position. e.g. `documents.` to authorize access on all documents endpoints.

      Values are search, documents.add, documents.get, documents.delete, indexes.create, indexes.get, indexes.update, indexes.delete, indexes.swap, tasks.get, tasks.cancel, tasks.delete, settings.get, settings.update, stats.get, metrics.get, dumps.create, snapshots.create, version, keys.get, keys.create, keys.update, keys.delete, experimental.get, or experimental.update.

    • indexes array[string] Required

      A list of accesible indexes permitted for the key. [""] for all indexes. The * character can be used as a wildcard when located at the last position. e.g. "products_"" to allow access to all indexes whose names start with "products_".

    • name string | null

      A human-readable name for the key. null if empty.

    • description string | null

      A description for the key. null if empty.

    • expiresAt string | null Required

      Represent the expiration date and time as RFC 3339 format. null equals to no expiration time.

    • Represent the date and time as RFC 3339 format when the API key has been created. Generated by Meilisearch.

    • updatedAt string | null

      Represent the date and time as RFC 3339 format when the API key has been updated. Generated by Meilisearch.

GET /keys/{uid_or_key}
curl \
 -X GET https://example.meilisearch.com:7700/keys/{uid_or_key} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "uid": "01b4bc42-eb33-4041-b481-254d00cce834",
  "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4",
  "name": "Indexing Products API key",
  "description": null,
  "actions": [
    "documents.add"
  ],
  "indexes": [
    "products"
  ],
  "expiresAt": "2021-11-13T00:00:00Z",
  "createdAt": "2021-11-12T10:00:00Z",
  "updatedAt": "2021-11-12T10:00:00Z"
}