POST /1/indexes/{indexName}/deleteByQuery

This operation doesn't accept empty filters.

This operation is resource-intensive. You should only use it if you can't get the object IDs of the records you want to delete. It's more efficient to get a list of object IDs with the browse operation, and then delete the records using the batch operation.

This operation is subject to indexing rate limits.

Servers

Path parameters

Name Type Required Description
indexName String Yes

Name of the index on which to perform the operation.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
filters String No

Filter expression to only include items that match the filter criteria in the response.

You can use these filter expressions:

  • Numeric filters. <facet> <op> <number>, where <op> is one of <, <=, =, !=, >, >=.
  • Ranges. <facet>:<lower> TO <upper> where <lower> and <upper> are the lower and upper limits of the range (inclusive).
  • Facet filters. <facet>:<value> where <facet> is a facet attribute (case-sensitive) and <value> a facet value.
  • Tag filters. _tags:<value> or just <value> (case-sensitive).
  • Boolean filters. <facet>: true | false.

You can combine filters with AND, OR, and NOT operators with the following restrictions:

  • You can only combine filters of the same type with OR. Not supported: facet:value OR num > 3.
  • You can't use NOT with combinations of filters. Not supported: NOT(facet:value OR facet:value)
  • You can't combine conjunctions (AND) with OR. Not supported: facet:value OR (facet:value AND facet:value)

Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (OR, AND, NOT), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array.

For more information, see Filters.

tagFilters Object No

Filter the search by values of the special _tags attribute.

Prefer using the filters parameter, which supports all filter types and combinations with boolean operators.

Different from regular facets, _tags can only be used for filtering (including or excluding records). You won't get a facet count. The same combination and escaping rules apply as for facetFilters.

numericFilters Object No

Filter by numeric facets.

Prefer using the filters parameter, which supports all filter types and combinations with boolean operators.

You can use numeric comparison operators: <, <=, =, !=, >, >=. Comparisons are precise up to 3 decimals. You can also provide ranges: facet:<lower> TO <upper>. The range includes the lower and upper boundaries. The same combination rules apply as for facetFilters.

insidePolygon[] Array No

Coordinates of a polygon in which to search.

Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see filtering inside polygons. This parameter is ignored if you also specify insideBoundingBox.

insideBoundingBox Object No
aroundLatLng String No

Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.

Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the aroundRadius and minimumAroundRadius settings. This parameter is ignored if you also specify insidePolygon or insideBoundingBox.

aroundRadius Object No

Maximum radius for a search around a central location.

This parameter works in combination with the aroundLatLng and aroundLatLngViaIP parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates.

facetFilters Object No

Filter the search by facet values, so that only records with the same facet values are retrieved.

Prefer using the filters parameter, which supports all filter types and combinations with boolean operators.

  • [filter1, filter2] is interpreted as filter1 AND filter2.
  • [[filter1, filter2], filter3] is interpreted as filter1 OR filter2 AND filter3.
  • facet:-value is interpreted as NOT facet:value.

While it's best to avoid attributes that start with a -, you can still filter them by escaping with a backslash: facet:\-value.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.