Create Key
Mint a key. A write key for every index mints search, scoped, write and issuer keys. An issuer key mints scoped keys only, for its own indexes, with an expires_at within its max_ttl, and its own filter added. Any other key gets 403. The secret is in this reply only.
Authentication
A write key, issued by Captain. Server side only. Sent as Authorization: Bearer <key>.
An issuer key, issued by Captain. Server side only. It only mints scoped keys. Sent as Authorization: Bearer <key>.
Request
index names, or [”*”] for every index, now and later. A scoped key names its indexes
search (default): search, typeahead, browse, similar, Get Records, events and analytics on its indexes. scoped: search, typeahead, browse, similar, Get Records and events on its indexes, with an optional filter added to every query and usually an expiry; no analytics. issuer: a server-side key that only mints scoped keys within its indexes, filter and max_ttl; it cannot search, and revoking it revokes every key it minted. write: a server-side key for its indexes: add, update and delete records, change settings (all but acl, tenant_field and audit), synonyms, rules and aliases, list and delete indexes, import from Algolia, and read jobs and usage. It cannot search or read analytics. A write key for every index ([”*”]) also creates and copies indexes, and creates, lists and revokes keys. console: Captain’s own; a write key that asks for one gets 400. An issuer key may only ask for scoped.
scoped keys only: the users, groups or roles this key acts for (record access control)
scoped keys only: a filter expression ANDed into every query
issuer keys: the longest expiry it may give
scoped keys only: ANDed into every query; a request can narrow it, never widen it. Same syntax as the search filters. Query understanding (typo correction, completion) learns only from the records it matches.
browser origins allowed to use the key; empty = any
accepted and ignored: no key is rate limited
Response
created; the key is in this response only
minted by a console key: the person it was minted for, fixed. Its events record it, and a request with it may not send X-Captain-Operator
in a write key’s view: a key Captain issued (a console or support key). Its operator and description are left out, and only Captain revokes it
only in the response to POST /v1/keys