Control Panel — API documentation

File Download

File Download

Download files from the file storage. Use this endpoint to generate a secure URL which can be used to download your files. An expiration date for the URL can also be specified using the 'expire' filter.

Descriptions

path String Normal

Path of the requested file

String

Default:

Sample value:video.mp4

url String Synthetic

Download URL for the specified file

Default:

Sample value:https://example-dl.secdn.net/example-vod/play/sestore4/example/video.mp4?secure=YJfb4E9j9bWJU3uWKDBtfQ&expires=1640908800

expires String Normal

Datetime expression which specifies when the download link expires. All expression's supported by PHP's strtotime() function are valid

String

Default:+1 day

Sample value:2021-12-31T00:00:00

option:related String

Include related object in results

Default:none

Sample value:files

None

Related endpoints

Files

List the files to download using the files endpoint

Examples

Get the Download object with id video.mp4.

Example URL

https://jb-sestore.secdn.net/v1/download/video.mp4

Example cURL

curl --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://jb-sestore.secdn.net/v1/download/video.mp4

Example request body

None

Example response data

{
    "path": "video.mp4",
    "url": "https://example-dl.secdn.net/example-vod/play/sestore4/example/video.mp4?secure=YJfb4E9j9bWJU3uWKDBtfQ&expires=1640908800",
    "expires": "2021-12-31T00:00:00"
}

Create a new Download object.

Example URL

https://jb-sestore.secdn.net/v1/download

Example cURL

curl -X PUT --data-binary @/path/to/request/body --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://jb-sestore.secdn.net/v1/download

Example request body

{
    "path": "video.mp4",
    "expires": "2021-12-31T00:00:00"
}

Example response data

{
    "path": "video.mp4",
    "url": "https://example-dl.secdn.net/example-vod/play/sestore4/example/video.mp4?secure=YJfb4E9j9bWJU3uWKDBtfQ&expires=1640908800",
    "expires": "2021-12-31T00:00:00"
}

You cannot update a download endpoint.

You cannot delete a download endpoint.

Errors

TYPE_MISMATCH

Data type does not conform to required field type

ACCESS_VIOLATION

You do not have access to modify this field