v12

OpenAPI 3.1.0raw.githubusercontent.com2026-07-150065.4 KB
Index

Create a new document in a table

Insert a document. Expects an object like:

{
  'table':'movies',
  'id':701,
  'doc':
  {
    'title':'This is an old movie',
    'plot':'A secret team goes to North Pole',
    'year':1950,
    'rating':9.5,
    'lat':60.4,
    'lon':51.99,
    'advise':'PG-13',
    'meta':'{"keywords":{"travel","ice"},"genre":{"adventure"}}',
    'language':[2,3]
  }
}

The document id can also be missing, in which case an autogenerated one will be used:

{
  'table':'movies',
  'doc':
  {
    'title':'This is a new movie',
    'plot':'A secret team goes to North Pole',
    'year':2020,
    'rating':9.5,
    'lat':60.4,
    'lon':51.99,
    'advise':'PG-13',
    'meta':'{"keywords":{"travel","ice"},"genre":{"adventure"}}',
    'language':[2,3]
  }
}

It responds with an object in format:

{'table':'products','id':701,'created':true,'result':'created','status':201}
post/insert

Request body

tablestring required

Name of the table to insert the document into

clusterstring

Name of the cluster to insert the document into

idinteger

Document ID. If not provided, an ID will be auto-generated

docobject required

Object containing document data

Example request

{
  "table": "test",
  "doc": {
    "title": "This is some title",
    "gid": 100
  }
}

Response

OK

tablestring

Name of the document table

idinteger

ID of the document affected by the request operation

createdboolean

Indicates whether the document was created as a result of the operation

resultstring

Result of the operation, typically 'created', 'updated', or 'deleted'

foundboolean

Indicates whether the document was found in the table

statusinteger

HTTP status code representing the result of the operation

Example response

{
  "table": "test",
  "id": 1,
  "result": "created",
  "created": true,
  "status": 201
}