algolia apikeys
Manage your Algolia API keys.
algolia apikeys create
algolia apikeys create [flags]
Create a new API key.
Examples
1
2
3
4
5
6
# Create a new API key targeting the index "foo", with the "search" and "browse" ACL and a description
$ algolia apikeys create --indices foo --acl search,browse --description "Search & Browse API Key"
# Create a new API key targeting the indices "foo" and "bar", with the "http://foo.com" referer, with a validity of 1 hour and a description
$ algolia apikeys create -i foo,bar --acl search -r "http://foo.com" --u 1h -d "Search-only API Key for foo & bar"
Flags
-
--acl
-
ACL of the API Key.
search
: allowed to perform search operations.
browse
: allowed to retrieve all index data with the browse endpoint.
addObject
: allowed to add or update a records in the index.
deleteObject
: allowed to delete an existing record.
listIndexes
: allowed to get a list of all existing indices.
deleteIndex
: allowed to delete an index.
settings
: allowed to read all index settings.
editSettings
: allowed to update all index settings.
analytics
: allowed to retrieve data with the Analytics API.
recommendation
: allowed to interact with the Recommendation API.
usage
: allowed to retrieve data with the Usage API.
logs
: allowed to query the logs.
seeUnretrievableAttributes
: allowed to retrieve unretrievableAttributes for all operations that return records.
. -
-d
,--description
-
Specify a description of the API key.
Used for informative purposes only. It has impact on the functionality of the API key. -
-i
,--indices
-
Specify the list of targeted indices.
You can target all indices starting with a prefix or ending with a suffix using the*
character.
For example,dev_*
matches all indices starting withdev_
and*_dev
matches all indices ending with_dev
.
. -
-r
,--referers
-
Specify the list of referrers that can perform an operation.
You can use the*
(asterisk) character as a wildcard to match subdomains, or all pages of a website.
. -
-u
,--validity
-
How long this API key is valid, in seconds.
A value of 0 means the API key doesn’t expire.
algolia apikeys delete
algolia apikeys delete <api-key> [flags]
Delete API key.
Flags
-
-y
,--confirm
-
skip confirmation prompt.
algolia apikeys list
algolia apikeys list [flags]
List API keys.
Output formatting flags
-
--allow-missing-template-keys
-
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
-
-o
,--output
-
Output format. One of: (json, jsonpath, jsonpath-as-json, jsonpath-file).
-
--template
-
Template string or path to template file to use when –output=jsonpath, –output=jsonpath-file.