Download Asset from Segment
Downloads a specific asset file from a segment. Returns the binary content of the asset with appropriate content-type headers for direct display or download.
URL
(GET) /api/resources/assets/{segmentid}
PARAMETERS
Parameter | Type | Required | Description |
---|---|---|---|
segmentid (URL) | int | Mandatory | The unique segment identifier containing the asset |
scope (Query) | string | Mandatory | The scope parameter that defines the project or job context. Formats: |
filename (Query) | string | Mandatory | The name of the asset file to download |
locale (Query) | string | Optional | Language code if the asset is associated with a specific language |
relativePath (Query) | string | Optional | Relative path within the segment's asset folder. If provided, takes precedence over path in filename |
ACCESS RIGHTS
The user must have access rights to the project's reference material. The system checks project-level permissions to ensure the user can download assets from the specified scope.
EXAMPLE REQUEST
curl --location '{{URL}}/api/resources/assets/27665601?locale=en&scope=pr7214&filename=pexels-gons3.jpg' \
--header 'X-Auth-Token: {{AUTH_TOKEN}}' \
--header 'X-Auth-AccountId: {{ACCOUNT_ID}}'
RESULTS
The response returns the binary content of the requested asset file with appropriate HTTP headers:
Header | Description |
---|---|
Content-Type | The MIME type of the asset (e.g., |
Content-Length | The size of the file in bytes |
Content-Disposition | Specifies how the browser should handle the file (inline for display, attachment for download) |
Response Body: Binary content of the asset file
EXAMPLE RESPONSE
HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: 2268156
Content-Disposition: inline; filename="pexels-gons3.jpg"
[Binary image data]
USAGE NOTES
The endpoint returns the raw binary content of the asset
The
Content-Type
header indicates the file type (image/jpeg, image/png, video/mp4, etc.)The
v
parameter helps with browser caching - when an asset is updated, the version parameter changes (only available from the provided URL when uploading assets, or when calling the list endpoint)If
locale
is specified, the system looks for the asset in the language-specific subfolderIf the asset is not found, the API returns a 404 Not Found response
The
filename
parameter must match exactly the stored filenameFile Path Handling: The system supports two ways to specify file paths:
Use the
relativePath
parameter to specify the folder structureInclude the path directly in the filename (e.g.,
"subfolder/image.jpg"
)If both are provided,
relativePath
takes precedence
Path separators should be URL-encoded in query parameters