Curl with filter returns '400 Bad Request'

When i try to download data in json with parameter filter:

curl --compressed -g -X GET ‘{"_submission_time":{"$gt": “2022-01-17T17:14:45:30”}}’

I have the error 400 Bad Request

But this same request work last week. Are the a update on koboToolBox plateforme?

Thanks for reply

I have a problem downloading the JSON database with CURL.
The same script curl market several days ago, but since yesterday it shows me this error in the downloaded file:

<head><title>400 Bad Request</title></head>
<center><h1>400 Bad Request</h1></center>

curl -X GET ‘{"_submission_time":{"$gt": “2022-01-17T17:14:45:30”}}’ -H …

Thanks for your helps!

@momou28, have you checked your data to see if it’s public?

@Kal_Lam , I use my administrator account which hosts the form and I am the owner. When I remove the query filter, there is no problem. But with the filter it generates the error. Last week no problem.
Where do I check if the data is public?
For information, I use the administrator account in the command for downloading.

Thanks a lot KAL

This post discussed previously should help you make your data public:

Hi @momou28, it looks like the issue is with the type of quotes surrouding the date in your query. If I replace “2022-01-17T17:14:45:30” with "2022-01-17T17:14:45:30" then it works :+1:

1 Like

Thank a lot

1 Like