Bulk Selection of Observations to Add to a Project

here’s a way to accomplish this using the Windows command prompt:

set request_parameters="user_id=pisum&per_page=200&page=1"
set request_url_base=https://api.inaturalist.org/v1/observations
set request_url="%request_url_base%?only_id=true&%request_parameters:"=%"
for /f "delims=" %r in ('curl %request_url%') do (set response_json=%r)
set observation_id=%response_json%
set observation_id=%observation_id:*[=%
set observation_id=%observation_id:]=%
set observation_id=%observation_id:{"id":=%
set observation_id=%observation_id:}=%
set observation_id=%observation_id:,= %
echo %observation_id%
pause

just replace the value in line 1 with the parameters appropriate for your use case, and this will return a space-separated list of observation ids from that result set. (if you want a comma-separated list instead, eliminate line 10.)

you could also use this code in place of the set observation_id= line in the Windows batch example(s) that i posted above, if you wanted to take all the observations from the result set automatically.

if you use the code above in a Windows batch file, replace the fourth line above with this:

for /f "delims=" %%r in ('curl %request_url%') do (set response_json=%%r)