Skip to content

Storage Management API

General information

This section describes the API methods for working with storage, transcoding tasks and CDN resource for file delivery.

All responses, including errors, are returned in JSON format.

Important

  1. Among the API methods listed below, there is a method for obtaining an S3 key pair. To manage files in the storage (upload, move, delete), the standard S3 interface must be used with these keys.
  2. After transcoding is completed, the resulting files are stored in S3 and are available under the cdnsystem/ prefix. All objects generated during transcoding have keys that begin with cdnsystem/, which is visible when using the standard S3 interface.

    In the dashboard interface, the cdnsystem/ prefix is not shown — instead, quality tags are displayed on the source files.

Storage Management API

  • Required headers: CDN-AUTH-TOKEN (authorization token, see Authorization)
  • Content-Type of a successful response: application/json
  • All responses, including errors, follow a common structure: the status field is always returned; in case of a successful response, the data field with the response payload is returned where applicable; otherwise, the description and errors fields may be returned with error details.

CDN resource management API

  • Required headers: CDN-AUTH-TOKEN (authorization token, see Authorization)
  • Content-Type of a successful response: application/json

A CDN domain is provided for the media storage. Objects can be accessed either through the dashboard interface or via the S3-compatible interface. All objects stored in the storage can be delivered through the CDN.

A delivery link is constructed from the CDN domain and the S3 object key.

Format: https://<cdn_domain>/<path>

where:

  • <cdn_domain> — CDN delivery domain
  • <path> — S3 object key

Example: https://cdn.example.com/video/file.mp4

MP4 delivery with conversion to HLS or MPEG-DASH

MP4 files can be converted on-the-fly to streaming formats HLS and MPEG-DASH.
To enable this, append the corresponding suffix to the MP4 file link:

  • HLS: /playlist.m3u8
  • MPEG-DASH: /manifest.mpd

When accessed via this link, the original MP4 file will be delivered in the selected streaming format.

Examples:

HLS:

https://<cdn_domain>/<path/to/file.mp4>/playlist.m3u8

MPEG-DASH:

https://<cdn_domain>/<path/to/file.mp4>/manifest.mpd

Important

We do not support the Fragmented MP4 container for this service. You can check the file container using the command MP4Box -info test.mp4

Transcoding Results

Transcoding results are stored in the S3 storage under the prefix cdnsystem/.

These objects are visible via the S3 interface and can be delivered through the CDN just like the original files.

From the original file and the set of transcoded files, a SMIL link can be generated for adaptive delivery.

https://test.a.trbcdn.net/file.mp4
https://test.a.trbcdn.net/cdnsystem/file_240p_1763387791.mp4
https://test.a.trbcdn.net/cdnsystem/file_480p_1763387791.mp4
https://test.a.trbcdn.net/cdnsystem/file_360p_1763387791.mp4

Steps to generate

  1. Extract the common part of the URL (domain):
    https://test.a.trbcdn.net/
    
  2. Take the paths to the files without the file extension and list them separated by commas.
    Include a comma at the beginning and end of the list:
    ,file,cdnsystem/file_240p_1763387791,cdnsystem/file_480p_1763387791,cdnsystem/file_360p_1763387791,
    
  3. Add the container extension: .mp4

  4. Add the suffix: .urlset

  5. Add the delivery protocol suffix:

    • for HLS — /playlist.m3u8
    • for MPEG-DASH — /manifest.mpd

Final Example (HLS)

https://test.a.trbcdn.net/,file,cdnsystem/file_240p_1763387791,cdnsystem/file_480p_1763387791,cdnsystem/file_360p_1763387791,.mp4.urlset/playlist.m3u8

The resulting link generates an adaptive stream based on the set of original and transcoded files.