The media endpoint allows you retrieve the media items associated with a particular inspection. These can be identified by the href
elements in the media items of the inspection data.
The media is downloaded directly, so you should save the output to a file with an appropriate name. For example, you can use the values from the media item in the inspection JSON to construct the filename <media_id>.<file_ext>
.
Please note that this endpoint requires authorization using your API token. Make sure to include your token in the header when making requests.
For example:
curl --location 'http://api.safetyculture.io/audits/$AUDIT_ID/media/$MEDIA_ID' --header 'Authorization: Bearer {api_token}' -o output.png
This API does not support downloading videos. Instead, please use Get media download URL.