Skip to content

Commit 93c1c75

Browse files
Jeny SadadiaJenySadadia
authored andcommitted
doc/api-details: document date range queries
Describe API support for querying the same field with multiple operators e.g. date range queries. Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
1 parent e82bcfe commit 93c1c75

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

doc/api-details.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,16 @@ $ curl 'http://localhost:8001/latest/nodes?kind=kbuild&name__re=x86'
371371

372372
returns all Kbuild nodes with the string "x86" in the node name.
373373

374+
API also supports multiple operator queries for the same field name.
375+
For example, date range queries can be triggered as below:
376+
377+
```
378+
$ curl 'https://localhost:8001/nodes?created__gt=2024-02-26T13:21:55.301000&created__lt=2024-11-01&kind=checkout'
379+
```
380+
The above query will return all the checkout nodes in the specific
381+
date range provided, i.e., nodes created between `2024-02-26T13:21:55.301000` and `2024-11-01` date-time range.
382+
383+
374384
Nodes with `null` fields can also be retrieved using the endpoint.
375385
For example, the below command will get all the nodes with `parent` field set to `null`:
376386

0 commit comments

Comments
 (0)