Examples: Deprecated Asset Requests

Warning: Deprecated requests.
This page gives examples of using the Ad API endpoint 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 Examples: Asset Requests.

Uploading Assets

You have two options (two different endpoints) to upload assets, like ad images and ad videos, to Ooyala Pulse through the Ad 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.

Example: providing a URL for the asset

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"
}
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 with the location of your asset>

Example: providing the serialised asset

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>

Was this article helpful?