Introduction

Sunet Media Distribution has a RESTful API that enables developers to integrate the service in their own applications.

Authentication

The API uses simple API-key authentication. This information will be available to you if you are a Site-Admin on your site. You can find your key on your profilepage.

In order to make authenticated requests to the api, you must include your username and your api-key in the request-header.

Example in Python:

import requests
import json

headers = {
        'content-type': 'application/json',
        'x-mds-username': '<username>',
        'x-mds-api-key': '<key>'
}
requests.get(<url>, headers=headers, verify=True)

cURL

curl -H 'Accept: application/json' \
     -H 'x-mds-username: <username>' \
     -H 'x-mds-api-key: <key>' \
     url

Resources

Resource                

Description                                                              

GET api/v1/video/

List all your published videos
List all the videos associated with your site. Filter out
material that are not published.

GET api/v1/video/<id>/

Get information on a specific video
List metadata associated with a specific video.

GET api/v1/playurl/<id>/

Get playable URL from the CDN
Get the raw playable URL from the server for a specific
video. This will return a URL sutible for playing in any 
player.

GET api/v1/video/search/

Search for videos

  • No labels