The following API calls are currently available for the SurveyResponse FILE object:
- GET SURVEYRESPONSE FILE
GET SURVEYRESPONSE FILE - Get a secure download URL for a file uploaded in a survey response.
https://api.alchemer.com/v5/survey/123456/surveyresponse/121/file
Note: If not specified, the URL expires after 300 seconds (5 minutes).
Request Parameters | Example | Required | Notes |
---|---|---|---|
Authentication Credentials | api_token=12345&api_token_secret=12345 | True | |
filename | 800bd34f0a5900_Alchemer_logo.jpg | True | Use the filename returned by the Survey Response API as the ‘answer’ to file upload question types. |
expires | 300 | False | Number of seconds before the file download URL expires. Default = 300 (5 minutes) |
Response Parameters | Example | Notes |
---|---|---|
survey_id | 7695487 | The survey ID. Returned for convivence. |
response_id | 1 | The response ID. Returned for convivence. |
filename | 800bd34f0a5900_Alchemer_logo.jpg | The filename. Returned for convivence. |
download_url | https://s3.amazonaws.com/alchemer/2024/800bd34f0a5900_Alchemer_logo.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AK%2F104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=2027Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=b228d100 | The download URL. Use this URL to download the file. |
Example Request
GET https://api.alchemer.com/v5/survey/7695487/surveyresponse/1/file?api_token=abcd12345&api_token_secret=abcd12345&filename=800bd34f0a5900_Alchemer_logo.jpg
Example Response
{
"result_ok": true,
"code": 200,
"message": "",
"data": {
"survey_id": "7695487",
"response_id": "1",
"filename": "800bd34f0a5900_Alchemer_logo.jpg",
"download_url": "https://s3.amazonaws.com/alchemer/2024/19-7f910d4a5fe63f1a5a800bd34f0a5900_Alchemer_logo.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AK%2F104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=2027Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=b228d100"
}
}