Authentication
Most of the API endpoints for Searchcraft Cloud require authentication. For self-hosted instances of Searchcraft, authentication is optional and may be configured in the CLI options.
These endpoints are only available to self-hosted instances of Searchcraft, Searhcraft Cloud customers only interact with these via the Vektron application. Requires an admin level authentication key to access. See the CLI documentation for more information.
API Endpoints
Section titled “API Endpoints”-
GET /auth/application/:application_idReturns a list of all keys for the application. -
GET /auth/federation/:federation_nameReturns a list of all keys associated with a federation entity. -
GET /auth/index/:index_nameReturns a list of all keys associated with a specific index. -
GET /auth/organization/:organization_idReturns a list of all keys for the organization. -
GET /auth/keyReturns a list of all keys on the cluster. -
GET /auth/key/check/:permissionChecks whether the provided key has the specified permission. The:permissionpath parameter is the numeric value of the permission bit(s) to check (e.g.1forSEARCH,32forMODIFY_AUTH). Returns200with"Key has sufficient permissions."when the key holds all requested bits, or403with"Key has insufficient permissions."otherwise. Unlike other auth endpoints, this route always requires a validAuthorizationheader even when the server runs without auth enabled. -
POST /auth/keyCreate a key.-
Payload format:
{"allowed_indexes": ["index_name_1", "index_name_2"], // may contain one to several index names"permissions": 1, // 1 = read, 15 = ingest, 511 = admin. See Permissions below."name": "Name Of This Key","organization_id": 0,"organization_name": "My Org Name","application_id": 1,"application_name": "My App Name","status": "active | inactive","federation_name": "1_rest_name", // * optional and only needed for read keys associated with a federation}
-
-
DELETE /auth/keyDelete all keys. -
GET /auth/key/:keyGet an individual key. -
DELETE /auth/key/:keyDelete an individual key. -
POST /auth/key/:keyUpdate an individual key.
Permissions
Section titled “Permissions”A key’s permissions value is the sum of the permissions it holds. For example, 15 is SEARCH, MODIFY_SYNONYMS, MODIFY_STOP_WORDS and MODIFY_DOCUMENTS. If a key has allowed_indexes, its index permissions only apply to those indexes. Without allowed_indexes, they apply to every index.
| Value | Permission | Allows |
|---|---|---|
1 | SEARCH | Search, facets, and reading index and federation configuration. |
2 | MODIFY_SYNONYMS | Adding and removing synonyms. |
4 | MODIFY_STOP_WORDS | Adding and removing stop words. |
8 | MODIFY_DOCUMENTS | Adding and deleting documents, and updating an existing index with PUT or PATCH /index/:index_name, except its AI settings. |
16 | MODIFY_INDEX | Deleting indexes, changing index AI settings (ai_enabled and ai), and reading ai.llm_api_key. |
32 | MODIFY_AUTH | Managing access keys. |
64 | LLM_RAG_SUMMARIES | Search result summaries and semantic search. |
128 | RESERVED | Not currently used. |
256 | READ_ANALYTICS | Measure analytics dashboards. |
Creating an index requires a key that holds every permission (511). See Index Management for the full index rules.
Agent and MCP Authentication
Section titled “Agent and MCP Authentication”AI agents connecting through the MCP endpoint authenticate with the same access keys described above. When an OAuth authorization server issues tokens for your instance, Searchcraft also advertises it to agents using OAuth 2.0 Protected Resource Metadata (RFC 9728), so spec-conformant MCP clients can discover where to obtain a token without manual configuration. See OAuth authorization server discovery for setup.
- Organization and application IDs are used within Searchcraft cloud but are available for use in self-hosted instances at the customer’s discretion.
- The permissions identifiers may change in future releases of Searchcraft as more capabilities are added to the API.