v1

latestOpenAPI 3.1.0MIT2026-07-17116965.4 KB
Index

Delete a document in a table

Delete one or several documents. The method has 2 ways of deleting: either by id, in case only one document is deleted or by using a match query, in which case multiple documents can be delete . Example of input to delete by id:

{'table':'movies','id':100}

Example of input to delete using a query:

{
  'table':'movies',
  'query':
  {
    'bool':
    {
      'must':
      [
        {'query_string':'new movie'}
      ]
    }
  }
}

The match query has same syntax as in for searching. Responds with an object telling how many documents got deleted:

{'table':'products','updated':1}
post/delete

Request body

tablestring required

Table name

clusterstring

Cluster name

idinteger

The ID of document for deletion

queryobject

Defines the criteria to match documents for deletion

Example request

{
  "table": "test",
  "id": 1
}

Response

item updated

tablestring

The name of the table from which the document was deleted

deletedinteger

Number of documents deleted

idinteger

The ID of the deleted document. If multiple documents are deleted, the ID of the first deleted document is returned

foundboolean

Indicates whether any documents to be deleted were found

resultstring

Result of the delete operation, typically 'deleted'

Example response

{
  "table": "test",
  "deleted": 29
}