batch

Delete objects in batch

Removes multiple data objects based on a filter specified in the request body.

Deletion occurs based on the filter criteria provided in the where clause. There is a configurable limit (default 10,000, set via QUERY_MAXIMUM_RESULTS) on how many objects can be deleted in a single batch request to prevent excessive resource usage. Objects are deleted in the order they match the filter. To delete more objects than the limit allows, repeat the request until no more matching objects are found.

delete/batch/objects

Request

  • Base URL: https://localhost:8080/v1
  • URL: https://localhost:8080/v1/batch/objects
  • Auth: one of:
    • none
    • OAuth 2 (implicit, authorization URL http://to-be-configured-in-the-application-config)

Query parameters

consistency_levelstring

Determines how many replicas must acknowledge a request before it is considered successful.

tenantstring

Specifies the tenant in a request targeting a multi-tenant collection (class).

Request body

outputstring

Controls the verbosity of the output, possible values are: minimal, verbose. Defaults to minimal.

deletionTimeUnixMilliinteger nullable

Timestamp of deletion in milliseconds since epoch UTC.

dryRunboolean

If true, the call reports what the filter matches and deletes nothing.

Depending on the configured verbosity, you will either receive a count of matched objects, or a list of IDs. With a positive QUERY_MAXIMUM_RESULTS the count stops one above it, and the list holds at most QUERY_MAXIMUM_RESULTS IDs. Repeating the dry run reports the same count; for an exact total use an aggregate count, which resolves no objects.

Example request

{
  "match": {
    "class": "City",
    "where": {
      "operator": "GreaterThanEqual",
      "path": [
        "inCity",
        "city",
        "name"
      ],
      "valueInt": 2000,
      "valueNumber": 3.14,
      "valueString": "my search term",
      "valueText": "my search term",
      "valueDate": "TODO",
      "valueNumberArray": [
        3.14
      ],
      "valueBooleanArray": [
        true,
        false
      ],
      "valueStringArray": [
        "my search term"
      ],
      "valueTextArray": [
        "my search term"
      ]
    }
  }
}

Response

Request processed successfully. See response body for matching objects and deletion results.

outputstring

Controls the verbosity of the output, possible values are: minimal, verbose. Defaults to minimal.

deletionTimeUnixMilliinteger nullable

Timestamp of deletion in milliseconds since epoch UTC.

dryRunboolean

If true, the call reported what the filter matched and deleted nothing. The list holds at most QUERY_MAXIMUM_RESULTS IDs. Defaults to false.

Example response

{
  "match": {
    "class": "City",
    "where": {
      "operator": "GreaterThanEqual",
      "path": [
        "inCity",
        "city",
        "name"
      ],
      "valueInt": 2000,
      "valueNumber": 3.14,
      "valueString": "my search term",
      "valueText": "my search term",
      "valueDate": "TODO",
      "valueNumberArray": [
        3.14
      ],
      "valueBooleanArray": [
        true,
        false
      ],
      "valueStringArray": [
        "my search term"
      ],
      "valueTextArray": [
        "my search term"
      ]
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.