Preview digital asset's native file by slug
get
/content/preview/api/v1.1/assets/.by.slug/{slug}/native
Renders the native file. In the content-type header received in the response has the media type information.
Request Headers (Optional):
Request Headers (Optional):
Header Name | Header Value |
---|---|
channelToken | {valid channel token value} |
Request
Path Parameters
-
slug: string
Slug value of the item to be previewed.
Query Parameters
-
channelToken(optional): string
Channel token of the targeted channel. A channel token must be provided as either a query parameter or a request header.
-
download(optional): boolean
By default, media types such as image, audio, and video are set to inline for the content-disposition header. For all other media types, content-disposition is set to download. Users can specify the query parameter download as true/false in a request to override the default value.
Response
Supported Media Types
- application/octet-stream
- application/json
200 Response
Successful operation.
304 Response
Not changed. The request honors requests with e-tag.
400 Response
Bad Request. The server is unable to process the request on the client side due to malformed syntax, invalid data or message framing.
403 Response
Forbidden. Client is not authorized to perform this request.
404 Response
The requested resource was not found.
500 Response
Internal server error. An unexpected error condition encountered in the system.
Examples
Example:
The following example shows how to get preview of the Digital Asset native file by it's slug by submission of a GET request on the REST resource using cURL:
curl -X GET -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/assets/.by.slug/image-1489851752573-sport/native?download=false&channelToken=37727fdc857c4d479513325888b69df0'
Obtains preview of Digital Asset native file with slug: image-1489851752573-sport, channelToken: 37727fdc857c4d479513325888b69df0.
Response Body
Digital Asset native file will be displayed.