Using
Creates a new relational domain (isolated table/view namespace, separate from KV and JSON domains).
applies to v0.5.1POST
/store-api/rel/domains
const url = 'https://example.com/store-api/rel/domains';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"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/rel/domains \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
Domain name (max 50 chars, [a-zA-Z0-9_-]; "domains" is reserved).
string
Example generated
{ "name": "example"}Responses
Section titled “Responses”Relational domain created
Media typeapplication/json
object
created_at
required
Creation timestamp (Unix seconds).
integer format: int64
name
required
string
state
required
Lifecycle state: “active” or “deleting” (background purge running).
Always present — so a later list_domains visibility change
(surfacing Deleting domains too) needs no REST-contract change.
string
Example generated
{ "created_at": 1, "name": "example", "state": "example"}Invalid domain name
Media typetext/plain
string
Domain already exists
Media typetext/plain
string
Relational 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