Video API


Creating a Video

To create a video file, use a multipart form-data. Example in cURL is shown below.

REST API

POST /api/v0/videos

curl -X POST \
  https://admin-video.springserve.com/api/v0/videos/ \
  -H 'Authorization: <authorizationToken>' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F 'video=@/<filepath>/videofile.mp4'
  -F 'demand_parnter_id="<demand_parnter_id>"'

Status code 201

Response (example)

{
    "id": <id>,
    "account_id": <account_id>,
    "name": "videofile.mp4",
    "height": 1080,
    "width": 1920,
    "duration_seconds": 14,
    "video_file_name": "VIDEO FILE API DOCS",
    "video_content_type": "video/mp4",
    "video_file_size": 6737024,
    "video_updated_at": "2018-08-20T21:25:27.235Z",
    "video_remote_url": null
}

SDK

 resp = springserve.video_creatives.upload_video({'demand_partner_id': 5}, "/Users/blah/Downloads/video.mp4")


Get a Video

REST API

GET /api/v0/videos/<id>

Headers

Content-Type application/json
Authorization "yourAuthToken"

Response

Status code 200

{
    "id": 1832,
    "account_id": 1,
    "name": "videofile.mp4",
    "height": 1080,
    "width": 1920,
    "duration_seconds": 14,
    "video_file_name": "VIDEO FILE API DOCS",
    "video_content_type": "video/mp4",
    "video_file_size": 6737024,
    "video_updated_at": "2018-08-20T21:25:27.235Z",
    "video_remote_url": null
}

Create a Video Demand Tag

First create your video in SpringServe and then create a Creative Asset (demand_class 4) demand tag.

REST API

POST /api/v0/demand_tags

Headers

Content-Type application/json
Authorization "yourAuthToken"

Body (example)

{
"name": "VIDEO Demand Tag",
"video_id": <id>,
"video_landing_page_url": "https://mylandingpage.com"
"demand_class": 4
}