Good day, colleagues!
I want to take last 900 submissions but using the following endpoint I got the first 900. Could you help me with the sort or something like that?
https://kobo.humanitarianresponse.info/api/v2/assets/ID/data/?start=0&limit=900
Good day, colleagues!
I want to take last 900 submissions but using the following endpoint I got the first 900. Could you help me with the sort or something like that?
https://kobo.humanitarianresponse.info/api/v2/assets/ID/data/?start=0&limit=900
@slovak82, you could use sort={"<field name>": <order>}
at the end of the URL, where <field name>
is the question name as it appears in the API output, and <order>
is 1
for ascending and -1
for descending. For example:
https://kf.kobotoolbox.org/api/v2/assets/abcdef@@@@@@ghijkl7890/data.json?sort={"_id": 1}
https://kf.kobotoolbox.org/api/v2/assets/abcdef@@@@@@ghijkl7890/data.json?sort={"_id": -1}
thank you so much!
Hello @Kal_Lam,
How does it look like for multiple fields/columns?
I’ve tried both cases below but they don’t work:
sort=[{“_id”: 1},{“other_column”: 1}]
and
sort={“_id”: 1,“other_column”,1}
Please consider full-field-name which includes the group-name (groupName/fieldName
).
Thank you in advance.
Ibrahim