Retrieve the selected media for a given inspection

The media endpoint allows you to 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 'https://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.

Path Params
string
required

The id of the inspection to retrieve media from.

string
required

The id of the media to retrieve.

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json