Hello,
I want to automate my workflow by uploading an XLSForm (.xlsx) to Kobo and then deploying it using the Kobo API (v2).
I checked the official API documentation, but I could not find a clear example showing:
1. How to upload an XLSForm file using the API
2. How to deploy the form after upload
3. How to update an existing form with a new XLSForm file
Could someone please provide:
The correct API endpoint(s)
The required parameters
A sample cURL or Python request
How to deploy the form via API after uploading
Any guidance or official reference would be greatly appreciated.
Thank you!
Kal_Lam
2
Welcome to the community, @mohammedshihab! You could do it by referencing the following cURL command as shown below:
curl -s -H “Authorization: Token xxxxxxxxxxxxxxxxxxxx” -H “Accept: application/json” -X POST “https://kf.kobotoolbox.org/api/v2/imports/” --form library=false --form “file=@/c/Users/Admin/Downloads/Test.xlsx”
curl -s -H “Authorization: Token xxxxxxxxxxxxxxxxxxxx” -H “Accept: application/json” “https://kf.kobotoolbox.org/api/v2/imports/iFSTbqBH7dXYBFjZFyPe5F/”
curl -s -H “Authorization: Token xxxxxxxxxxxxxxxxxxxx” -H “Accept: application/json” “https://kf.kobotoolbox.org/api/v2/assets/awnRYdmX9dGyXGhzAMp9YE/deployment/” --form active=true
1 Like