Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions guides/Getting-Started/filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,36 @@ An incorrectly formatted filter or an unsupported operator returns a `400` respo
}
```

:::note
When a query with a filter returns no matching results, the API will respond with the following: HTTP Status Code: 200 OK
This indicates that the request was successful, even if no records match the filter criteria.
- Response Body:
```json
{
"meta": {
"page": {
"limit": 25,
"offset": 0,
"current": 1,
"total": 0
},
"results": {
"total": 0
}
},
"data": [],
"links": {
"current": "{base_url}/example/?filter=eq(name,Elastic)&page[offset]=0&page[limit]=25",
"first": "{base_url}/example/?filter=eq(name,Elastic)&page[offset]=0&page[limit]=25",
"last": "{base_url}/example/?filter=eq(name,Elastic)&page[offset]=0&page[limit]=25",
"next": "null",
"prev": "null"
}
}
```
The empty data array signifies that no records were found.
:::

### Performance

Filtered queries may be less performant than non-filtered queries, especially at scale (either with high
Expand Down