From b02272fc832b31d3f45f905b28b68f01238af29d Mon Sep 17 00:00:00 2001 From: Davis Raymond Muro Date: Mon, 13 Jan 2020 14:56:41 +0300 Subject: [PATCH] Update the data endpoint documentation - Add information about the 'or' and 'ornull' filter options --- docs/data.rst | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/docs/data.rst b/docs/data.rst index de75818087..0aeaff5b92 100644 --- a/docs/data.rst +++ b/docs/data.rst @@ -431,18 +431,35 @@ Query submissions with case insensitive and partial search curl -X GET https://api.ona.io/api/v1/data/22845?query={"name":{"$i":"hosee"}} +Example V +^^^^^^^ +Query submissions where age is 21 or name is hosee + +:: + + curl -X GET https://api.ona.io/api/v1/data/22845?query={"$or": [{"age": "21", "name": "hosee"}]} + +Example VI +^^^^^^^ +Query submissions where car is honda or is null + +:: + + curl -X GET https://api.ona.io/api/v1/data/22845?query={"$ornull": [{"car": "honda"}]} All Filters Options -======== =================================== -Filter Description -======== =================================== -**$gt** Greater than -**$gte** Greater than or Equal to -**$lt** Less than -**$lte** Less or Equal to -**$i** Case insensitive or partial search -======== =================================== +=========== =================================== +Filter Description +=========== =================================== +**$gt** Greater than +**$gte** Greater than or Equal to +**$lt** Less than +**$lte** Less or Equal to +**$i** Case insensitive or partial search +**$or** Or +**$ornull** Or is null +=========== =================================== Query submitted data of a specific form using date_created ----------------------------------------------------------