Resources API
The resources APIs allow for downloading of an actual file Resource given a token, and generating a download URL (using seekerproxy) with an expiring token for the specified resource based on its resource key.
Download Resource
Downloads the resource associated with the specified token.
Input
URL:
/resources/download
HTTP Method(s):
- GET
Parameters:
Parameter | Required | Default | Description |
---|---|---|---|
Token | Yes | Resource Token | |
ContentType | No | application/octet-stream | The content-type to download the file as. |
Response:
FileStream
Examples
Request:
GET /seeker/resources/download?Token=ee57dda8-5138-41bd-838a-7e91a506f42f
Response:
FileStream
Generate Download URL
Generates a new public download URL (using seekerproxy) with an expiring token for the specified resource based on its resource key (table_dt_resource.resource_key).
Input
URL:
/resources/{Id}/generate
HTTP Method(s):
- GET
Parameters
Parameter | Required | Default | Description |
---|---|---|---|
Id | Yes | Resource Key | |
Expires | No | 7days | How far in the future that the generated token will expire. Examples:
|
AlwaysUnique | No | False | Always generate a new token or not |
Response:
Parameter | Description |
---|---|
Expires | Date/Time token will expire |
Url | seeker proxy url for downloading the file |
Examples
Request:
GET /seeker/resources/1705a634-525b-49e8-b69a-353f8f21db08/generate?Expires=100days
Response:
{
"Expires":"2016-01-19T17:26:13.2642488Z",
"Url":"http://localhost/seekerproxy/resources/download?Token=19952961-d175-48e2-97ca-f181c2cdf65b"
}