How can I download all submitted form, from server with the help of Briefcase CLI(Command Line Interface)?

Hi there, was just wondering if there currently exists functionality in the ODK Briefcase CLI to allow me to pull and export all forms from my Aggregate instance (for remote backup purposes). That is, I want to pull forms, not just a single form of form_id xyz.

Judging from some of the responses I've read in this forum, this feature does not exist, or at least not natively to Briefcase. This response (ODK Briefcase CLI - get all forms) gave me some vague hope though...

If this feature does not exist natively, any suggestions on how to approach this problem? Eg perhaps I could pull all form_ids and loop over them somehow?

Thanks

Agreed that we should make this easier. I've filed an issue at https://github.com/opendatakit/briefcase/issues/721.

If you are on a Linux box, you can do this with a shell script.

#!/bin/bash

AGGREGATE_URL="https://example.com"
ODK_USERNAME="username"
ODK_PASSWORD="password"

FORM_IDS=($(curl --digest --user "$ODK_USERNAME":"$ODK_PASSWORD" --silent "X-OpenRosa-Version:1.0" "$AGGREGATE_URL"/formList 2>&1 | awk -F "=|\"" '{print $4}'))

for FORM_ID in "${FORM_IDS[@]}"; do
    echo "Processing $FORM_ID..."
done

Thanks Yaw - I'll adapt this to the Windows machine that I'm working with