Download filtered data kobo automatically

Hi, so I am using SAS programming to download kobo form with this method:
filename target “D:\module_anc.xlsx”;
proc http method=“get”
url=“https://kobo.sid-indonesia.org/api/v2/assets/aXEh6Dpi9KasrGUtP4cbTK/export-settings/es99cZn68SEtQSwZzaBQAEE/data.xlsx”
out=target;
run;

Where I get this link (https://kobo.sid-indonesia.org/api/v2/assets/aXEh6Dpi9KasrGUtP4cbTK/export-settings/es99cZn68SEtQSwZzaBQAEE/data.xlsx) from export-settings, and I want to filter so I only need for example to pull last 7 days data entered. Because when we pull it all full, it gets timeout because the data are too big.

I checked this post, and tried to copy the setting at raw data tab but it gets HTTP 400 Bad Request: Is there a way to export specific data from the KOBO instead of having to export all of the data at once?

Can someone please help how to create dynamic setting on kobo export so we only pull last 7 days, and I can pull it automatically on SAS?
Thank You

Welcome back to the community, @febyinka! It seems like you are on a self-hosted KoboToolbox server. You may need to reach out to your admin to have a look at the issue for quicker troubleshooting.

I thought the logic used to parse new reciords only would be the same, no?

Hi @febyinka,

As far as i know, it is not possible to filter the data though saved export settings, but if you are familiar with the JSON format and SAS allow you to import data from from web. You can use JSON format to filter and import your data to SAS direct. The formula below will filter the submission after 25/09 and allow you to view it JSON format.

https://kobo.sid-indonesia.org/api/v2/assets/{assetid}/data.json?query={“_submission_time”:%20{“$gt”:%20"2025-09-03T00:00:00"}}

I believe you have more than 30.000 submission in your form as you get time-out error. I suggest you to check the topic below as well.