Excluding media while exporting form submissions

I'm trying to use API to Export Form Submissions with media and $filter parameters in R. $filter parameter is working but I could not exclude media.

This is the R code:


server <- MY_SERVER
un <- MY_USER
pw <- MY_PASS

media <- 'false'
filter <- '__system/submissionDate%20lt%202021-04-02T08:42:32.521Z'

# Testing with filter. This is working
# url_csv <- glue("{server}/v1/projects/{pid}/forms/{formid}/submissions.csv.zip?$filter={filter}")

# Testing API excluding media, but not working. I'm getting zip file with media folder
url_csv <- glue("{server}/v1/projects/{pid}/forms/{formid}/submissions.csv.zip?media={media}")

dwnl <- httr::GET(url_csv, httr::authenticate(un, pw),
                  write_disk(stables, overwrite = TRUE) )
res <- httr::http_status(dwnl)

Any thoughts on what I'm doing wrong?

I think I remember this one!
See the code of ruODK:: submission_export - it's attachments not media, I believe the docs are incorrect.

1 Like