Use the sources API endpoint with the GET method to download the contents of a Data Source as a .csv, .xls, or .xlsx file.
Prerequisites
You must have a Data Source already configured in the Web Portal. You cannot use an API endpoint to create a Data Source.
Note the FormSpace and Data Source IDs for the Data Sources that you want to retrieve.
Base URL
https://api.prontoforms.com
Endpoint
GET
/api/1.1/formspaces/{formSpaceID}/sources/{sourceID}/content.{extension}
Retrieves the contents of a Data Source .csv, .xls, or .xlsx file. The API endpoint supports only .csv and .xlsx. extensions. Use the .csv extension to retrieve the contents of a .xls file.
URL structure
Copy
https://api.prontoforms.com/api/1.1/formspaces/{formspaceID}/sources/{sourceID}/content.{extension}
Request parameters
None
Request header
Include the standard authorization header. This includes the username and password, where username is the API Key ID and password is the API Key Secret.
cURL examples
curl -v -k -u {username}:{password} -X POST https://api.prontoforms.com/api/1.1/formspaces/{formSpaceID}/sources/{sourceID}/content.{extension}
where username is the API Key ID and password is the API Key Secret.
To save the .xls or .xlsx output as a file:
curl -u {username}:{password} https://api.prontoforms.com/api/1.1/formspaces/{formSpaceID}/sources/{sourceID}/content.xlsx --output {filename}.xlsx
Request body
None
Response code
200—OK
Response example
The response is the content of the .csv, .xls, or .xlsx file (with .xlsx as binary output).
Error codes
Error code | Error message | HTTP response code | Description |
---|---|---|---|
MediaTypeNotSupported | Media Type Not Supported: The specified media type is not supported. | 415 | The file extension is not supported. Use a .csv or .xlsx file extension. |
AccessDenied | Access Denied: You are not allowed to access the requested resource | 403 | The Data Source doesn't exist in your account. |
ObjectNotFound | Object Not Found: The object you requested could not be found | 404 | The system couldn't find the Data Source or the FormSpace. Verify the FormSpace and Data Source IDs and try again. |
Comments
0 comments
Please sign in to leave a comment.