POST
/
media
Add media
curl --request POST \
  --url http://api.dsm.whdiyo.com/api/v1/media \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "alternateId": "<string>",
  "title": "<string>",
  "duration": 123,
  "streams": [
    {
      "format": "dash",
      "url": "<string>",
      "segmentDuration": 123,
      "timescale": 123,
      "drm": true,
      "kid": "<string>",
      "pssh": "<string>",
      "clearKey": "<string>"
    }
  ]
}'
{
  "id": "<string>",
  "alternateId": "<string>",
  "title": "<string>",
  "duration": 123,
  "streams": [
    {
      "format": "dash",
      "url": "<string>",
      "segmentDuration": 123,
      "timescale": 123,
      "drm": true,
      "kid": "<string>",
      "pssh": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Media Create model Basic Media model

streams
object[]

The dash hls stream for the media

alternateId
string

A friendly identifier for your media

title
string

The media title

duration
number

float

Response

success response

Media Response model Id model Media model Basic Media model

id
string

System identifier

streams
object[]

The dash hls stream for the media

alternateId
string

A friendly identifier for your media

title
string

The media title

duration
number

float