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,8forMODIFY_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, 63 = admin."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.
- 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.