Direct Downloads
Introduction
From version 22.4
it will possible to request a direct URL to the original or preview representation of any item.
Contract
A new endpoint without authentication is available as
https://<public host>/representations/<Record Id>?type=<type>
Example
https://mh-tst.mediahaven.com/representations/ee453c142a22402a8e913c33cde74e9e7ed868dfce2d499fa24bb54830933aee?type=Access
Parameters
Record ID is the unique identifier of an item as documented in https://mediahaven.atlassian.net/wiki/spaces/CS/pages/3604512769
Type: value is either
Original
(default) orAccess
Response
When sending a GET
request with optional parameters, the gateway service responds with a temporary redirect 302 Found
to the appropriate storage URL. We use a temporary redirect because we want the browser to keep using the representation endpoint in order to count future statistics. When the parameter type
is not provided, it is assumed to be Original
.
Statistics
To store the events, we log them as Premis https://mediahaven.atlassian.net/wiki/spaces/CS/pages/1490485332 on the (flat) data object with types
DIRECT_DOWNLOAD.ORIGINAL
DIRECT_DOWNLOAD.ACCESS
Configuration
By default, the original is not accessible directly by any means and the response for
type=Original
will be403 Forbidden
Upon a service request, the original storage can be made publicly available with the caveat that the knowledge of the
RecordId
is sufficient to download any original