Table of Contents |
---|
...
Creating a Video Creative
To create a video fileVideo Creative, use a multipart form-data, or provide a remote URL. Examples in cURL are shown below.
REST API
Video FileCreative:
POST /api/v0/videos
Code Block | ||
---|---|---|
| ||
curl -X POST \ https://console.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_partner_id="<demand_partner_id>"' -F 'name="MyCreative"' |
...
Response (example)
Code Block | ||
---|---|---|
| ||
{ "id": <id>, "account_id": <account_id>, "name": "MyCreative", "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 } |
...
POST /api/v0/videos
Code Block | ||||
---|---|---|---|---|
| ||||
curl -X POST \ https://console.springserve.com/api/v0/videos/ \ -H 'Authorization: <authorizationToken>' \ -H 'Cache-Control: no-cache' \ -F 'demand_partner_id="<demand_partner_id>"' -F 'creative_remote_url="<remote_url>"' -F 'name="MyCreative"' |
...
Response (example)
Code Block | ||||
---|---|---|---|---|
| ||||
{ "id": <id>, "account_id": <account_id>, "demand_partner_id": <demand_partner_id>, "name": "MyCreative", "height": 1080, "width": 1920, "duration_seconds": 31, "creative_file_name": "video.mp4", "creative_content_type": "video/mp4", "creative_file_size": 14305681, "creative_updated_at": "2022-08-03T22:08:04.187Z", "creative_remote_url": "https://cdn.samplewebsite.com/video.mp4" } |
SDK
Code Block |
---|
resp = springserve.video_creatives.upload_video({'demand_partner_id': 5}, "/Users/blah/Downloads/video.mp4") |
Get a Video Creative
REST API
GET /api/v0/videos/<id>
Headers
...
Code Block |
---|
{ "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
...