Deprecated Asset Requests

Warning: Deprecated requests.
This page gives examples of using the Asset API endpoints for uploading assets.
Note: Using these endpoints for uploading assets has been deprecated and replaced with one endpoint for uploading videos and another for uploading other asset types. For more information, refer to Asset API.

Upload Assets

You have two options (two different endpoints) to upload assets, like ad images and ad videos, to Ooyala Pulse through the Asset API:
  • by providing a URL to the asset in the body of the request.
  • by providing the asset itself as an octet-stream in the body of the request.

Upload an Asset by Providing a URL

Method POST
URL https://api.videoplaza.com/v1/assets/uri
Header Authentication header (x-o-api-key)
Content type application/json
URL params -
Query params -
Body
{
  "name":"<string>",
  "downloadUri":"<string>"
}
Note: The name parameter in the body needs to contain the correct file extension for the asset.
Success response

HTTP status: 201 Created

Header: Location: URI to the location of your asset

Body: -

Example:

Request header:

POST v1/assets/uri HTTP/1.1
Host: api.videoplaza.com
Content-type: application/json
x-o-api-key="<your key>"

Request body:

{
  "name":"filename.mp4",
  "downloadUri":"http://example.com/video/1234"
}

Success response:

HTTP status:
  201 (Created)

Header:
  Location: <URI with the location of your asset>

Upload an Asset by Providing the Serialised Asset

Method POST
URL https://api.videoplaza.com/v1/assets/file
Header Authentication header (x-o-api-key)
Content type application/octet-stream
URL params -
Query params fileName: name of the file to upload
Body
<your asset as an octet-stream>
Success response

HTTP status: 201 Created

Header: Location: URI to the location of your asset

Body: -

Example:

Request header:

POST v1/assets/file?fileName='filename.mp4' HTTP/1.1
Host: api.videoplaza.com
Content-type: application/octet-stream
x-o-api-key="<your key>"

Request body:

<your asset as an octet-stream>

Success response:

HTTP status:
  201 (Created)

Header:
  Location: <URI with the location of your asset>

해당 내용이 도움 되었습니까?