Get the original file of a preview. Give the extension of the preview. A picture, a PDF or a file extension of the allowed list is accepted. Movie extensions are not accepted on this route. You must have access to the task.
Responses
-
The file
-
The preview is still processing. The body has the status and the Retry-After header gives the delay. Only for a client that accepts application/json. Other clients get a 404.
-
The extension is not in the list of allowed extensions
-
You do not have access to the task of this preview
-
The preview file does not exist, or there is no file with this extension
GET
/pictures/originals/preview-files/{instance_id}.{extension}
curl
curl -X GET "http://api.example.com/pictures/originals/preview-files/a24a6ea4-ce75-4665-a070-57453082c25.png" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/pictures/originals/preview-files/a24a6ea4-ce75-4665-a070-57453082c25.png"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {}
payload = None
response = requests.get(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
Response examples (202)
{
"status": "processing",
"preview_file_id": "a24a6ea4-ce75-4665-a070-57453082c250"
}