Get API Key Permissions | Ruby API Client V1 (Deprecated)
This version of the Ruby API client has been deprecated in favor of the latest version of the Ruby API client.
client.get_api_key(apiKey)
About this method# A
Get the permissions of an API key. When initializing the client using the Admin API key, you can request information on any of your application’s API keys. When using a non-admin API key, you can only retrieve information on this specific API key.
Examples# A
To get the permissions of a given key:
1
2
// Get the rights of a key
$res = $client->getApiKey('90dfaaf5755e694f341fe68f6e41a6d4');
Parameters# A
apiKey
# |
type: string
default: no default
Required
API Key to retrieve permissions for |
Response# A
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
{
"value":"d6386f212331969e41493051ede9a25f",
"createdAt":1513610838,
"acl":["search"],
"validity":0,
"description": "my key description"
}
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:
|
validity
# |
integer
Timestamp of the date at which the key expires. (0 means it will not expire automatically). |
indexes
# |
list
The list of targeted indices, if any. |
description
# |
string
Description of the key, if set. |