You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I often send requests to the Central API from the command line. In the past, I've used curl to do so, but I've been finding pyODK very helpful for that purpose. The caching of the session token is very convenient, and the fact that configuration is file-based makes it easy to toggle between different servers.
I always do the same 5 or 10 things when I use curl with Central, so I thought I'd wrap those in a small Python script. I haven't tested much of the script, and I'm not very familiar with Python, but I thought I'd share it for discussion purposes: https://gist.github.com/matthew-white/3ece8de162c2ef5d974d5d2f6ed4ff23
Many of the script's CLI options are very generic (e.g., --header), but I also added some Central-specific features:
--extended option to easily request extended metadata
Specify request data using one of --json, --xml, and --file, which are the kinds of data that Central expects. --json and --xml can be combined with --file.
Headers like X-OpenRosa-Version and X-XlsForm-FormId-Fallback are added automatically.
Can be useful for setting up shell scripts or doing basic exploration.
See centralpy and Briefcase.
The text was updated successfully, but these errors were encountered: