The Video Stitcher API sends requests to ad providers specified in the ad tags in the body of a live session request. Request and response metadata for these requests is saved for 14 days and can be viewed by inspecting the live session.
The Video Stitcher API composes the ad tag detail using the following:
- The requested ad tag URL in a given ad break (or the default ad tag if none is specified)
- The configured ad tag macros from the live session request
- Additional user metadata
This information, along with the body and metadata of the response, provides insight to the behavior of the Video Stitcher API.
This document describes how to inspect live sessions and the ad tag details for a given live session. For more details, see the REST documentation.
Before you begin
Make sure you are familiar with the steps to create a live session with the Video Stitcher API. For more information, see the how-to guide.
List ad tag details
To list the ad tag details for a live session, use the
projects.locations.liveSessions.liveAdTagDetails.list
method.
Consider the following response for a previously-created live session (some fields are omitted):
{ "name": "projects/PROJECT_NUMBER/locations/LOCATION/liveSessions/SESSION_ID", ... }
REST
Before using any of the request data, make the following replacements:
- PROJECT_NUMBER: your Google Cloud project number located in the Project number field on the IAM Settings page
- LOCATION: the location of your session; use one of
the supported regions:
us-central1
us-east1
us-west1
asia-east1
asia-south1
asia-southeast1
europe-west1
southamerica-east1
- SESSION_ID: the identifier for the live session
To send your request, expand one of these options:
You should receive a JSON response similar to the following:
{ "liveAdTagDetails" : [ { "name": "projects/PROJECT_NUMBER/locations/LOCATION/liveSessions/SESSION_ID/liveAdTagDetails/LIVE_AD_TAG_DETAILS_ID", "adRequests": [ { "uri": "REQUEST_URL", "requestMetadata": "AD_TAG_REQUEST_METADATA", "responseMetadata": "AD_TAG_RESPONSE_METADATA" } ] } ] }
Copy the returned LIVE_AD_TAG_DETAILS_ID. You need it to get the details for a single ad tag.
Python
Before trying this sample, follow the Python setup instructions in the Video Stitcher API quickstart using client libraries. For more information, see the Video Stitcher API Python API reference documentation.
To authenticate to Video Stitcher API, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Get ad tag details
To get the details for a single ad tag details in a live session, use the
projects.locations.liveSessions.liveAdTagDetails.get
method.
The following example demonstrates viewing a single ad tag detail for a live session using the name of an ad tag detail returned from a previous request:
REST
Before using any of the request data, make the following replacements:
- PROJECT_NUMBER: your Google Cloud project number located in the Project number field on the IAM Settings page
- LOCATION: the location of your session; use one of
the supported regions:
us-central1
us-east1
us-west1
asia-east1
asia-south1
asia-southeast1
europe-west1
southamerica-east1
- SESSION_ID: the identifier for the live session
- LIVE_AD_TAG_DETAILS_ID: the ID for the live ad tag details
To send your request, expand one of these options:
You should receive a JSON response similar to the following:
{ "name": "projects/PROJECT_NUMBER/locations/LOCATION/liveSessions/SESSION_ID/liveAdTagDetails/LIVE_AD_TAG_DETAILS_ID", "adRequests": [ { "uri": "REQUEST_URL", "requestMetadata": "AD_TAG_REQUEST_METADATA", "responseMetadata": "AD_TAG_RESPONSE_METADATA" } ] }
Python
Before trying this sample, follow the Python setup instructions in the Video Stitcher API quickstart using client libraries. For more information, see the Video Stitcher API Python API reference documentation.
To authenticate to Video Stitcher API, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.