Ad InsertionConfigure Ad Server

Configure Ad Server

Sets the upstream VAST/VMAP ad server URL, query parameters and custom origin headers. Triggers a stream-adserver provisioning job.

curl -X POST "https://api.5centscdn.com/v2/streams/push/123/adinsertion/server" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "url": "https://adserver.example.com/vast.php",
  "queryParameters": [
    {
      "name": "src_url",
      "type": "from-variable",
      "value": "SOURCE_URL"
    },
    {
      "name": "break_dur",
      "type": "from-variable",
      "value": "ADBREAK_DURATION_S"
    },
    {
      "name": "CACHE_BUSTER",
      "type": "from-variable",
      "value": "CACHE_BUSTER"
    }
  ],
  "adOrigin": {
    "customHeaders": []
  }
}'
{
  "result": "success"
}
POST
/streams/push/{streamid}/adinsertion/server
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

path
streamidinteger
Required

Numeric stream ID.

Content-Typestring
Required

The media type of the request body

Options: application/json
urlstring
Required

The VAST or VMAP ad server endpoint URL. This is the base URL the SSAI engine calls to fetch ad content during a live stream. Must be a valid HTTP/HTTPS URL.

Format: uri
queryParametersarray

A dynamic list of query parameters appended to every ad server request. Each entry has three fields: name (the parameter key), type (the value source), and value (the parameter value or source identifier).

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

streamidinteger
Required

Numeric stream ID.

Body

application/json
urlstring
Required

The VAST or VMAP ad server endpoint URL. This is the base URL the SSAI engine calls to fetch ad content during a live stream. Must be a valid HTTP/HTTPS URL.

Example:
https://pubads.g.doubleclick.net/gampad/ads
queryParametersarray

A dynamic list of query parameters appended to every ad server request. Each entry has three fields: name (the parameter key), type (the value source), and value (the parameter value or source identifier).

adOriginobject

Responses

resultstring
Required

Status of the API response.

Allowed values:successerror
messagestring

Human-readable message describing the result.