REST Resource: adBreak.networks.assets.adBreaks

Resource: AdBreak

Ad break metadata used to decision ads for an ad break in a live video event.

JSON representation
{
  "name": string,
  "createTime": string,
  "expectedDuration": string,
  "customParams": string,
  "scte35CueOut": string,
  "podTemplateName": string,
  "breakState": enum (BreakState),
  "expectedStartTime": string,
  "expireDuration": string,
  "breakSequence": string,
  "breakParams": {
    object (BreakParams)
  },
  "matchParams": {
    object (MatchParams)
  },
  "servedBreak": {
    object (ServedBreak)
  }
}
Fields
name

string

Output only. The resource name of the Ad Break. This field will have the format of "networks//assets//adBreaks/".

network_code is the network code in Google Ad Manager to which this content belongs.

asset_key is the key of the Live Stream Event in Google Ad Manage under which the Ad Break was created.

adBreakId is the key of the Ad Break. OUTPUT ONLY.

createTime

string (Timestamp format)

Output only. The create time of the Ad Break.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

expectedDuration

string (Duration format)

Required. Expected break duration.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

customParams
(deprecated)

string

Optional. Key-value pairs to be included on ad requests for this break for custom criteria targeting in Ad Manager. Example: 'key1=value&key2=value2,value22' Deprecated: Please set cust_params in breakParams.ad_tag_params by using the "cust_params" key.

scte35CueOut

string

Optional. Base 64 encoded data from the scte35 cue out. May include splice_insert() or time_signal() command. Examples: - with time_signal(): “/DA0AAAAAAAA///wBQb+cr0AUAAeAhxDVUVJSAAAjn/PAAGlmbAICAAAAAAsoKGKNAIAmsnRfg==” - with splice_insert(): "/DAvAAAAAAAA///wFAVIAACPf+/+c2nALv4AUsz1AAAAAAAKAAhDVUVJAAABNWLbowo="

podTemplateName
(deprecated)

string

Optional. Google Ad Manager pod template name. Deprecated: Please set cust_params in breakParams.ad_tag_params by using the "ptpln" key.

breakState

enum (BreakState)

Output only. The current state of the Ad Break.

expectedStartTime

string (Timestamp format)

Optional. The expected start time of the Ad Break.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

expireDuration

string (Duration format)

Optional. Expires the Ad Break at expectedStartTime + expireDuration. If expectedStartTime is not set, the Ad Break will expire expireDuration after decisioning starts. Default: 30m Minimum: 5m Maximum: 6h

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

breakSequence

string (int64 format)

Output only. The midroll sequence ID of the Ad Break. Multiple ad breaks may have the same breakSequence if explicitly specified through breakParams.ad_tag_params with the mridx key. This effectively links two GAM ad breaks.

breakParams

object (BreakParams)

Optional. Break parameters to be included on ad requests for this break.

matchParams

object (MatchParams)

Optional. Used for Stitched DAI to determine how an Ad Break created through the API is matched with an in-manifest ad break. When a new break is detected, a match function will be run against all ad breaks of an event that have a breakState of SCHEDULED or DECISIONED to check if all set parameters in matchParams of an Ad Break match the detected break. A match occurs if either of these conditions are met: 1. The Ad Break has a matchParams field, and all parameters set in it match the new break. 2. The Ad Break is DECISIONED and does not have a matchParams field.

To prevent accidental "match-all" behavior (which would occur with an empty but present matchParams), matchParams cannot be empty if set. If the field is present in a request, at least one of its own fields must be set.

Ad Breaks are checked in this order: 1. with matchParams, ordered by ascending expectedStartTime, ascending createTime, where Ad Breaks without expectedStartTime are prioritized when sorted 2. without matchParams, ordered by ascending expectedStartTime, ascending createTime, where Ad Breaks without expectedStartTime are prioritized when sorted

If all pending EABNs do not match, DAI will fall back to JIT decisioning behavior utilizing the next available midroll index

servedBreak

object (ServedBreak)

Output only. This reflects the actual information of the served ad break. Only set for ad breaks with a COMPLETE breakState.

BreakState

The state of an Ad Break.

Enums
BREAK_STATE_UNSPECIFIED The Ad Break state is unknown.
BREAK_STATE_DECISIONED The Ad Break decisioning started but not yet delivered to users.
BREAK_STATE_COMPLETE The Ad Break was delivered to users.
BREAK_STATE_SCHEDULED The Ad Break is scheduled for decisioning.
BREAK_STATE_EXPIRED The Ad Break is expired and unusable. By default, Ad Breaks will expire 30 minutes after expectedStartTime, or 30 minutes after the Ad Break starts decisioning if expectedStartTime is not set. An expiry can be explicitly set using the expireDuration field.

BreakParams

Parameters associated with an ad break.

JSON representation
{
  "macros": [
    {
      object (KeyValue)
    }
  ],
  "adTagParams": [
    {
      object (KeyValue)
    }
  ]
}
Fields
macros[]

object (KeyValue)

Optional. Custom macro values that replace an arbitrary placeholder in the ad tag. At ad request time, DAI will expand ad tag macros in the form %%DAI_PATTERN:[MACRO_KEY]%%, where MACRO_KEY is the key.

If set, these macros will take precedence over macros set on a Pod Serving request.

adTagParams[]

object (KeyValue)

Optional. Overrides ad tag parameters on the primary ad request.

These are used for decisioning if it triggers before Pod Serving requests with cust_params set.

Generally parameters override a query string parameter on the primary ad request for the break. For some ad servers with custom URL formats, parameters may override specific places in the ad tag to conform ad server requirements. Setting the "mridx" value on the AdBreak will override the breakSequence field with the provided value, if it is a valid positive integer. This is true even for non-GAM ad servers.

If set, these parameters will take precedence over parameters set on a Pod Serving request.

KeyValue

Represents a key value pair.

JSON representation
{
  "key": string,
  "value": string
}
Fields
key

string

Required. Key of this key value pair.

value

string

Required. Value of this key value pair.

MatchParams

Parameters to match with a detected Stitched DAI ad break.

JSON representation
{
  "scte35Binary": string,
  "scte35Upid": string,
  "scte35EventId": integer,
  "breakDuration": boolean
}
Fields
scte35Binary

string

Optional. SCTE-35 binary. To match this field, the in-manifest ad break must have the same SCTE-35 binary string (base64-encoded). If empty, this is skipped.

scte35Upid

string

Optional. SCTE-35 UPID (Unique Program Identifier). To match this field, the in-manifest ad break must have the same SCTE-35 UPID. The UPID is a value that is parsed from the SCTE-35 binary. If empty, this is skipped.

scte35EventId

integer (uint32 format)

Optional. SCTE-35 event ID. To match this field, the in-manifest ad break must have the same event ID (splice event ID/segmentation event ID). The event ID is a value that is parsed from the SCTE-35 binary. If empty, this is skipped.

breakDuration

boolean

Optional. Break duration. To match this field, the in-manifest ad break must have the same break duration as the Ad Break's expectedDuration, with a tolerance of 1ms. If false, this is skipped.

ServedBreak

Represents actual information of the served Ad Break.

JSON representation
{
  "breakDetectTime": string,
  "detectedDuration": string,
  "scte35CueOut": string
}
Fields
breakDetectTime

string (Timestamp format)

Output only. The time that the matching ad break is detected. For Pod Serving, this is the time when the first segment/manifest of the ad pod is requested. For Stitched DAI, this is when the ad break is first detected on the manifest.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

detectedDuration

string (Duration format)

Output only. The detected duration passed on the matching ad break.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

scte35CueOut

string

Output only. The detected base64-encoded SCTE-35 message passed on the matching ad break.

Methods

create

API to create an Ad Break within the live stream.

delete

API to delete an Ad Break within the live stream.

get

API to get an Ad Break within the live stream.

list

API to list Ad Breaks within the live stream.

patch

API to update an Ad Break within the live stream.