github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/design/queryprocessor/request.md (about) 1 # Motivation 2 Support [Parse API](https://docs.parseplatform.org/rest/guide/#queries) request syntax 3 4 # Request example 5 ```bash 6 curl -X GET \ 7 -H "AccessToken: ${ACCESS_TOKEN}" 8 --data-urlencode 'order=name' 9 --data-urlencode 'limit=10' 10 --data-urlencode 'skip=30' 11 --data-urlencode 'include=department.group' #include both department and group 12 --data-urlencode 'keys=id,name,department.name,department.group.name' #select only some fields 13 --data-urlencode 'where={"id_department":123456,"number":{"$gte": 100, "$lte": 200}}' 14 15 https://air.untill.com/api/rest/untill/airs-bp/140737488486431/untill.articles 16 ``` 17 18 19 Parameters: 20 - order (string) - order by field 21 - limit (int) - limit number of records 22 - skip (int) skip number of records 23 - include (string) - include referenced objects 24 - keys (string) - select only some field(s) 25 - where (object) - filter records 26 27 # Response 28 ```json 29 { 30 "results": [ 31 { 32 "id": 123, 33 "name": "Coca-Cola 0.5l", 34 "department": { 35 "name": "Fresh Drinks", 36 "group": { 37 "name": "Drinks" 38 } 39 } 40 }, 41 { 42 "id": 124, 43 "name": "Fant 0.5l", 44 "department": { 45 "name": "Fresh Drinks", 46 "group": { 47 "name": "Drinks" 48 } 49 } 50 } 51 ] 52 53 } 54 ``` 55 56 # Links 57 - [Parse API](https://docs.parseplatform.org/rest/guide/#queries) 58 - [Parse API: select only some fields](http://parseplatform.org/Parse-SDK-JS/api/3.4.2/Parse.Query.html#select) 59 - [see also: Stack overflow](https://stackoverflow.com/questions/61100282/parse-server-select-a-few-fields-from-included-object) 60 - [Launchpad: Schemas: Describe Heeus Functions with OpenAPI Standard](https://dev.heeus.io/launchpad/#!19069) 61 - [Launchpad: API v2](https://dev.heeus.io/launchpad/#!23905) 62 63 64 # Misc 65 66 Parse API [multi-level inclding](https://docs.parseplatform.org/rest/guide/#relational-queries): 67 ```bash 68 curl -X GET \ 69 -H "X-Parse-Application-Id: ${APPLICATION_ID}" \ 70 -H "X-Parse-REST-API-Key: ${REST_API_KEY}" \ 71 -G \ 72 --data-urlencode 'order=-createdAt' \ 73 --data-urlencode 'limit=10' \ 74 --data-urlencode 'include=post.author' \ 75 https://YOUR.PARSE-SERVER.HERE/parse/classes/Comment 76 ``````