GET /search/indexes
List search indexes
List the search indexes of this project. Use when choosing an index to search or fill. Before: nothing. Returns data: the indexes with name, language, fields and document count. Scope: search:query.
API key (Bearer), on the public API endpoint.
Responses
| Status | Description | Body |
|---|---|---|
2XX | Success: the JSON body the route returns (see the description for its fields). | object |
401 | Key missing or invalid | Error |
4XX | Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account). | Error |
Examples
curl
curl -X GET "$GALON_API_BASE/search/indexes" \
-H "Authorization: Bearer $GALON_API_KEY"POST /search/indexes
Create a search index
Create a search index from typed fields, or from a first batch of documents (schema inferred). Use when the app needs search over its own records (products, articles, tickets). Before: search_list_indexes (needs search query access), to reuse an existing index. Returns the index with its idx_ id (replayed with the same idempotency_key and fields). Scope: search:write. Reuse the same idempotency_key on retry.
API key (Bearer), on the public API endpoint.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string · required |
Request body
application/json
| Field | Type | Description |
|---|---|---|
name | string · required | Index name: 1-63 chars, a-z 0-9 _ -, unique in the project. |
language | "en" | "fr" | "simple" | Text language: en, fr, or simple (no stemming). Default en. |
typo_tolerance | boolean | Match small typos by default. Default true. |
fields | array<object> | The fields: at least one searchable. Every document field must be declared here. Required unless `documents` is given. |
documents | array<object> | A first batch of documents, without `fields`: the schema is inferred from them and the batch is written in the same call, all or nothing. |
Responses
| Status | Description | Body |
|---|---|---|
2XX | Success: the JSON body the route returns (see the description for its fields). | object |
401 | Key missing or invalid | Error |
4XX | Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account). | Error |
Examples
curl
curl -X POST "$GALON_API_BASE/search/indexes" \
-H "Authorization: Bearer $GALON_API_KEY" \
-H "Idempotency-Key: <unique-key>" \
-H "Content-Type: application/json" \
-d '{"name": "string"}'