I'm trying to use the Form Stack API to download some submissions onto my computer. I can download all submissions, but I would like to download records where the field is equal to some value (similar to using where
in SQL).
It seems that the search_field_x
and search_value_x
options are used for this purpose but I can't get them to work.
Does anyone have an example on how to specify these parameters? I couldn't quite make sense of the docs here. That is, I did not understand what the values 1-10 represented.
This is the curl
command I've been using. I have also used their online interface to pull the data, but the result is always the full set of submissions rather than a subset, which is what I'm after.
cstr='curl -i -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer secret_number" https://www.formstack.com/api/v2/form/form_id/submission.json?data=true\&page=1\&per_page=10\&search_field_x=School\&search_value_x="St.John" > my_data.json'
Here is a way to get filtered submissions back using the Formstack API:
curl:
or using python and requests: