API Reference / API Methods / API keys / List API Keys
Feb. 26, 2019

List API Keys

Required API Key: Admin
Method signature
$client->listApiKeys()

About this method

Get the full list of API Keys.

Examples

List existing keys

1
$client->listApiKeys();

Parameters

No parameters for this method.

Response

In this section we document the JSON response returned by the API. Each language will encapsulate this response inside objects specific to the language and/or the implementation. So the actual type in your language might differ from what is documented.

JSON format

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  "keys": [
    {
      "value": "0eb3e6308abccdf9b67d70ddacb418b4",
      "createdAt": 1513462891,
      "acl": ["search"],
      "validity": 0
    },
    {
      "value": "90dff5755e694f341fe68aaf6e41a6d4"
      "createdAt":1470244596,
      "acl":["search"],
      "validity":0,
      "description": "Search-only API Key"
    },
    {
      "value": "d6a23f212331969e41493051ede9865f",
      "createdAt": 1513610838,
      "acl": ["search"],
      "validity": 0
    }
  ]
}
keys
list of

keys ➔ (api key)

value
string

The api key value

createdAt
string

The date at which the key has been created

acl
list

List of permissions the key contains. The possible acls are:

  • search: Allowed to search.
  • browse: Allowed to retrieve all index contents via the browse API.
  • addObject: Allowed to add/update an object in the index. (Copying/moving indices are also allowed with this permission)
  • deleteObject: Allowed to delete an existing object.
  • deleteIndex: Allowed to delete index content.
  • settings: allows to get index settings.
  • editSettings: Allowed to change index settings.
  • analytics: Allowed to retrieve analytics through the analytics API.
  • listIndexes: Allowed to list all accessible indexes.
  • logs: allows to get the logs
  • seeUnretrievableAttributes: disable unretrievableAttributes feature for all operation returning records
validity
integer

Timestamp of the date at which the key expires. (0 means it will not expire automatically).

description
string

Description of the key.

Did you find this page helpful?