Using
Creates an index definition. Existing documents are NOT back-indexed — trigger a re-index for that.
applies to v0.5.1POST
/store-api/json/{domain}/indexes
const url = 'https://example.com/store-api/json/example/indexes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"field":"example","type":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/store-api/json/example/indexes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "field": "example", "type": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”domain
required
string
JSON domain
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
field
required
JSON field path, dot notation for nested fields (e.g. “address.city”).
string
type
required
Value type: “string” | “number” | “boolean”.
string
Example generated
{ "field": "example", "type": "example"}Responses
Section titled “Responses”Index definition created
Media typeapplication/json
object
created_at
required
integer format: int64
field
required
string
type
required
string
Example generated
{ "created_at": 1, "field": "example", "type": "example"}Invalid field or type
Media typetext/plain
string
Index already exists
Media typetext/plain
string
Domain is being deleted
Media typetext/plain
string
JSON engine disabled
Media typetext/plain
string
Insufficient Storage — disk space or memory runs short; the write was not applied. Reads go on; retry after the seconds in Retry-After.
Media typetext/plain
string
Headers
Section titled “Headers”Retry-After
integer