Use the sources API endpoint with the PUT method to update the data in an existing Manual Upload type Data Source.
Prerequisites
You must have a Data Source already configured in the Web Portal. You cannot use an API endpoint to create a Data Source.
To use this endpoint, your Data Source must be of the Manual Upload type.
Note the FormSpace and Data Source IDs for the Data Sources that you want to update.
Base URL
https://api.prontoforms.com
Endpoint
URL structure
https://api.prontoforms.com/api/1.1/formspaces/{formspaceID}/sources/{sourceID}/upload.{extension}
Request parameters
Parameter | Default value | Required | Description |
---|---|---|---|
delimiter | , | No | The delimiter for CSV files. |
encoding | utf-8 | No | Specifies the character encoding of the content. For content generated from Microsoft Windows environments, set this to windows-1252 . |
suppressPush | false | No | Specifies whether the update triggers any configured push notifications to mobile users. |
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 example
curl -v -k -u {username}:{password} -X PUT --upload-file {filename}.{extension} https://api.prontoforms.com/api/1.1/formspaces/{formSpaceID}/sources/{sourceID}/upload.{extension}
where username is the API Key ID and password is the API Key Secret.
Request body
Include the binary content you want to upload as shown in the following Postman example.
Response code
200—OK
Note:This API endpoint triggers a data upload, and it returns a 200 response when the upload request is successful. Some data uploads that return a 200 response code might result in errors in the Web Portal. Examples are when the file extension doesn’t match the file type, or the file exceeds the maximum number of cells. In these cases the system notifies the problem contact via email.
Response example
This endpoint does not return a response body.
Error codes
Error code | Error message | HTTP response code | Description |
---|---|---|---|
SourceHeaderTooLong | Column headers can be a maximum of 255 characters in length. Header ''{1}'' was {0} characters in length. No data has been loaded. | 400 | One of the column headers exceeds the maximum value of 255 characters. |
SourceNotUploadable | Data Source Not Uploadable: This Data Source is not an upload Data Source | 400 | The Data Source must be a Manual Upload type. |
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.