視訊雲端 SSAI 廣告標籤驗證

在本主題中,您將學習如何跟踪通過服務器端廣告插入(SSAI)指定的廣告調用。

概覽

為了幫助調試服務器端廣告,帶有SSAI的動態投放提供了API端點來跟踪廣告調用。

要使用存儲在Video Cloud中的視頻內容調試服務器端廣告,請按照以下步驟操作:

  1. 查看有關API路徑和授權的常規信息
  2. 跟踪廣告配置
  3. 檢索跟踪詳細信息

一般資訊

下列資訊適用於所有 SSAI API 要求。

基本網址

SSAI API 的基本網址為:

  https://ssai.api.brightcove.com/v1

帳號路徑

在所有情況下,我們都會針對特定的視訊雲端帳戶提出要求。因此,您始終將該術語accounts後跟您的帳戶 ID 添加到基本 URL 中:

  https://ssai.api.brightcove.com/v1/accounts/your account id

授權

API請求需要一個Authorization標頭:

  Authorization: Bearer your access token

access_token是一個臨時的 OAuth2 訪問令牌,必須從布萊特灣 OAuth 服務獲得。有關如何獲取客戶端憑據並使用它們來檢索訪問令牌的詳細信息,請參閱 Brightcove OAuth 概述

作業

當您要求用戶端認證時,您必須指定您想要的帳戶存取或作業類型。以下是 SSAI API 目前支援的作業清單:

  • SSAI 資料:

    video-cloud/ssai/read
    video-cloud/ssai/all

跟踪廣告配置

要跟踪廣告配置,請按照以下步驟操作:

收集信息

收集 API 要求內的下列資訊:

參數 類型 描述
account_id 字串 用戶帳號
playback_config 物件 在 SSAI API 文件的 [ 組態] 欄位詳細資料區段中定義欄位的欄位。
title_metadata 物件 告訴系統您的內容多長時間才能生成正確的廣告響應。

例如,以下內容告訴系統內容長度為 1 分鐘。用於插入相應的廣告。
  "title_metadata": {  "duration": "1m" }
videocloud_metadata 物件 可選。
只有在您使用參考中繼資料欄位的範本變數時才需要。這些定義在 SSAI API 文件的「廣告變數」區段中。

請求

為SSAI廣告配置創建跟踪。

方法 開機自檢
網址 https://ssai.api.brightcove.com/v1/accounts/ {帳戶識別碼} /ssai_debug_vmap/debug.xml
標頭 授權:承載訪問令牌(請參閱獲取訪問令牌
內容類型:應用程序/JSON
本體範例
  {
    "playback_config":{
      "name": "config_name",
      "vmap_response_namespace": "config_namespace",
      "account_id": "account_id",
      "ad_config": {
        "enable_ads": true,
        "expected_ad_response": "dfp_ad_rules",
        "disable_server_beacons": false,
        "round_up_cue_points": false,
        "template_url": {
        "template": "template_url"
        }
      },
      "extend_beacon_guard_ttl": false
    },
    "title_metadata":{
      "duration": "39s"
    }
  }

響應

回應body包含廣告伺服器回應,其中會包含 VAST 或廣告伺服器等效回應。

範例回應:

  <?xml version="1.0" encoding="UTF-8" ?>
  <vmap:VMAP xmlns:bc="bc" xmlns:vmap="http://www.iab.net/vmap-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
    <vmap:Extensions>
      <bc:Brightcove ttl="1800" contenturi="https://ssaiplayback.us-east-1.prod.boltdns.net/playback/once/v1/hls/v5/clear/1752604059001/debug/debug/195b46a6-f71b-432d-af0a-60c7f2131a7e/debug.m3u8?bc_token=NWIxNmQ4YWFfMzMwMzllMzIwMmZlYjRkNmJhY2ZkMWZiN2Y2NGQwOWVkZTYxYTBiOThhZmEwMTdkZjc5NjEzNGFkZDdiYTFjYw%3D%3D"
      contentlength="39.0000" payloadlength="67.0000" contenttype="application/x-mpegURL"></bc:Brightcove>
      <bc:BrightcoveDebug sessionID="195b46a6-f71b-432d-af0a-60c7f2131a7e"></bc:BrightcoveDebug>
    </vmap:Extensions>
    <vmap:AdBreak breakType="linear" breakId="MidRoll_5_0" timeOffset="00:00:05.0000">
      <vmap:AdSource allowMultipleAds="true" followRedirects="true" id="0">
        <vmap:VASTData>
          <VAST xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <Ad id="2">
              <InLine>
                <AdSystem>Test Ad Server</AdSystem>
                <AdTitle>&#xA; Marketing&#xA;</AdTitle>
                <Description>&#xA; Demo ad number 4&#xA;</Description>
                <Error>&#xA; &#xA;</Error>
                <Creatives>
                  <Creative>
                    <Linear skipoffset="00:00:05">
                      <CreativeExtensions>
                        <CreativeExtension>
                          <BrightcoveForeignKey>2</BrightcoveForeignKey>
                        </CreativeExtension>
                      </CreativeExtensions>
                      <Duration>00:00:12.0000</Duration>
                      <AdParameters>&#xA; &lt;xml&gt;&lt;/xml&gt;&#xA;</AdParameters>
                      <VideoClicks></VideoClicks>
                    </Linear>
                  </Creative>
                </Creatives>
                <Extensions>
                  <Extension>
                    <xml>data</xml>
                  </Extension>
                </Extensions>
              </InLine>
            </Ad>
          </VAST>
        </vmap:VASTData>
      </vmap:AdSource>
    </vmap:AdBreak>
    ...// additional ad breaks
  </vmap:VMAP>
  

Request2-使用模板變量

創建一個SSAI廣告跟踪,在其中使用引用元數據字段的模板變量。

方法 開機自檢
網址 https://ssai.api.brightcove.com/v1/accounts/ {帳戶識別碼} /ssai_debug_vmap/debug.xml
標頭 授權:承載訪問令牌(請參閱獲取訪問令牌
內容類型:應用程序/JSON
本體範例
  {
    "playback_config":{
      "name": "config_name",
      "vmap_response_namespace": "config_namespace",
      "account_id": "account_id",
      "ad_config": {
        "enable_ads": true,
        "expected_ad_response": "dfp_ad_rules",
        "disable_server_beacons": false,
        "round_up_cue_points": false,
        "template_url": {
        "template": "template_url"
        }
      },
      "extend_beacon_guard_ttl": false
    },
    "title_metadata":{
    "duration": "10s"
    },
    "videocloud_metadata": {
      "name": "ad_name",
      "tags": [ "tag1:tag1_value", "tag2:tag2_value" ],
      "ad_keys":"a=1&b=2",
      "cue_points": [{
        "name":"Pre-roll",
        "type":"AD",
        "time":0,
        "metadata":"type:pre-roll,a=b",
        },
        {
        "name":"Mid-roll",
        "type":"AD",
        "time":10,
        "metadata":"type=mid-roll,x=y",
      }]
    }
  }

回應2

範例回應:

  <vmap:VMAP xmlns:bc="bc" xmlns:vmap="http://www.iab.net/vmap-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
  <vmap:Extensions>
  <bc:Brightcove ttl="1800" contenturi="https://ssaiplayback.us-east-1.qa.boltdns.net/playback/once/v1/hls/v5/clear/accoutn_debug/debug/debug/7592e9c3-214f-4c68-a576-1e2494b7be06/debug.m3u8" contentlength="10.0000" payloadlength="70.0000" contenttype="application/x-mpegURL"></bc:Brightcove>
  <bc:BrightcoveDebug sessionID="7592e9c3-214f-4c68-a576-1e2494b7be06"></bc:BrightcoveDebug>
  </vmap:Extensions>
  <vmap:AdBreak breakType="linear" breakId="PreRoll_0_0" timeOffset="start">
  <vmap:AdSource allowMultipleAds="true" followRedirects="true" id="0">
  <vmap:VASTData>
    <VAST xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Ad id="test-01-30s">
        <InLine>
          <AdSystem>BIAS</AdSystem>
          <AdTitle>test-01-30s</AdTitle>
          <Creatives>
            <Creative>
              <Linear>
                <CreativeExtensions>
                  <CreativeExtension>
                    <BrightcoveForeignKey>test-01-30s</BrightcoveForeignKey>
                  </CreativeExtension>
                </CreativeExtensions>
                <Duration>00:00:30.0000</Duration>
                <TrackingEvents>
                  <Tracking event="mute">https://solutions.brightcove.com/beacon?event=mute&amp;type=vast&amp;request_id=43a0e4a5-4420-11e8-b306-99b1b6ae5164&amp;parent_request_id=436ae081-4420-11e8-bd7f-41361f814644&amp;ad_id=test-01-30s</Tracking>
                  <Tracking event="unmute">https://solutions.brightcove.com/beacon?event=unmute&amp;type=vast&amp;request_id=43a0e4a5-4420-11e8-b306-99b1b6ae5164&amp;parent_request_id=436ae081-4420-11e8-bd7f-41361f814644&amp;ad_id=test-01-30s</Tracking>
                  <Tracking event="rewind">https://solutions.brightcove.com/beacon?event=rewind&amp;type=vast&amp;request_id=43a0e4a5-4420-11e8-b306-99b1b6ae5164&amp;parent_request_id=436ae081-4420-11e8-bd7f-41361f814644&amp;ad_id=test-01-30s</Tracking>
                  <Tracking event="pause">https://solutions.brightcove.com/beacon?event=pause&amp;type=vast&amp;request_id=43a0e4a5-4420-11e8-b306-99b1b6ae5164&amp;parent_request_id=436ae081-4420-11e8-bd7f-41361f814644&amp;ad_id=test-01-30s</Tracking>
                  <Tracking event="resume">https://solutions.brightcove.com/beacon?event=resume&amp;type=vast&amp;request_id=43a0e4a5-4420-11e8-b306-99b1b6ae5164&amp;parent_request_id=436ae081-4420-11e8-bd7f-41361f814644&amp;ad_id=test-01-30s</Tracking>
                  <Tracking event="fullscreen">https://solutions.brightcove.com/beacon?event=fullscreen&amp;type=vast&amp;request_id=43a0e4a5-4420-11e8-b306-99b1b6ae5164&amp;parent_request_id=436ae081-4420-11e8-bd7f-41361f814644&amp;ad_id=test-01-30s</Tracking>
                  <Tracking event="acceptInvitation">https://solutions.brightcove.com/beacon?event=acceptInvitation&amp;type=vast&amp;request_id=43a0e4a5-4420-11e8-b306-99b1b6ae5164&amp;parent_request_id=436ae081-4420-11e8-bd7f-41361f814644&amp;ad_id=test-01-30s</Tracking>
                </TrackingEvents>
                <VideoClicks>
                  <ClickThrough id="clickthrough">https://www.brightcove.com/en/</ClickThrough>
                  <ClickTracking id="43a0e4a5-4420-11e8-b306-99b1b6ae5164"></ClickTracking>
                </VideoClicks>
              </Linear>
            </Creative>
          </Creatives>
        </InLine>
      </Ad>
    </VAST>
  </vmap:VASTData>
  </vmap:AdSource>
  </vmap:AdBreak>
  ...// additional ad breaks
  </vmap:VMAP>
  

檢索跟踪詳細信息

如上一節所述運行廣告跟踪後,您可以使用會話ID檢索有關跟踪的詳細信息。

session_id指定快取工作階段。每個會話基於視頻內容長度都有自己的長度。您可以在上一步中從API調用的響應中獲取ID。

會話ID可以在上一節的VMAP響應中找到。這是一個例子:

  <bc:BrightcoveDebug sessionID="your session id"></bc:BrightcoveDebug>

請求

要通過提供會話ID來檢索廣告呼叫跟踪信息,請使用類似於以下內容的GET請求:

方法 得到
網址 https://ssai.api.brightcove.com/v1/accounts/ {帳戶識別碼} /ssai_跟踪/ {會話 ID} /ad_呼叫
標頭 授權:承載訪問令牌(請參閱獲取訪問令牌
內容類型:應用程序/JSON

響應

範例回應:

  {
    "ad_calls": [
      {
        "timestamp": "2019-01-29T16:25:57.775607279Z",
        "duration_ms": 2772.666305,
        "request": {
          "content_length": 0,
          "event": "request",
          "headers": {
            "Referer": [
              ""
            ],
            "User-Agent": [
              "insomnia/6.3.2"
            ],
            "X-Device-User-Agent": [
              "insomnia/6.3.2"
            ],
            "X-Forwarded-For": [
              "108.26.214.36, 3.89.139.168"
            ]
          },
          "method": "GET",
          "url": "https://solutions.brightcove.com/bcls/brightcove-player/vmap/simple-vmap.xml"
        },
        "response": {
          "content_length": -1,
          "event": "response",
          "headers": {
            "Accept-Ranges": [
              "bytes"
            ],
            "Access-Control-Allow-Credentials": [
              "true"
            ],
            "Access-Control-Allow-Headers": [
              "X-Requested-With"
            ],
            "Access-Control-Allow-Origin": [
              "*"
            ],
            "Content-Type": [
              "application/xml"
            ],
            "Date": [
              "Tue, 29 Jan 2019 16:25:57 GMT"
            ],
            "Etag": [
              "\"13d6-57baaddddeea0-gzip\""
            ],
            "Last-Modified": [
              "Tue, 27 Nov 2018 19:58:00 GMT"
            ],
            "Server": [
              "Apache/2.4.7 (Ubuntu)"
            ],
            "Vary": [
              "Accept-Encoding"
            ]
          },
          "status_code": 200
        },
        "body": "PHZtYXA6Vk1BUCB4bWxuczp2bWFwPSJodHRwOi8vd3d3LmlhYi5uZXQvdmlkZW9zdWl0ZS92bWFwIiB2ZXJzaW9uPSIxLjAiPgoKICA8dm1hcDpBZEJyZWFrIHRpbWVPZmZzZXQ9InN0YXJ0IiBicmVha1R5cGU9ImxpbmVhciIgYnJlYWtJZD0icHJlcm9sbCI+CiAgICA8dm1hcDpBZFNvdXJjZSBpZD0icHJlcm9sbC1hZCIgYWxsb3dNdWx0aXBsZUFkcz0iZmFsc2UiIGZvbGxvd1JlZGlyZWN0cz0idHJ1ZSI+CiAgICAgIDx2bWFwOlZBU1RBZERhdGE+CiAgICAgICAgPFZBU1QgdmVyc2lvbj0iMy4wIj4KICAgICAgICAgIDxBZCBpZD0iMSI+CiAgICAgICAgICAgIDxJbkxpbmU+CiAgICAgICAgICAgICAgPEFkU3lzdGVtIHZlcnNpb249IjEuMCI+VGVzdCBBZCBTZXJ2ZXI8L0FkU3lzdGVtPgogICAgICAgICAgICAgIDxBZFRpdGxlPgogICAgICAgICAgICAgICAgPCFbQ0RBVEFbUG9ydGFsc11dPgogICAgICAgICAgICAgIDwvQWRUaXRsZT4KICAgICAgICAgICAgICA8RGVzY3JpcHRpb24+CiAgICAgICAgICAgICAgICA8IVtDREFUQVtEZW1vIGFkIG51bWJlciA2XV0+CiAgICAgICAgICAgICAgPC9EZXNjcmlwdGlvbj4KICAgICAgICAgICAgICA8RXJyb3I+CiAgICAgICAgICAgICAgICA8IVtDREFUQVtdXT4KICAgICAgICAgICAgICA8L0Vycm9yPgogICAgICAgICAgICAgIDxDcmVhdGl2ZXM+CiAgICAgICAgICAgICAgICA8Q3JlYXRpdmU+CiAgICAgICAgICAgICAgICAgIDxMaW5lYXI+CiAgICAgICAgICAgICAgICAgICAgPER1cmF0aW9uPjAwOjAwOjg8L0R1cmF0aW9uPgogICAgICAgICAgICAgICAgICAgIDxUcmFja2luZ0V2ZW50cy8+CiAgICAgICAgICAgICAgICAgICAgPEFkUGFyYW1ldGVycz4KICAgICAgICAgICAgICAgICAgICAgIDwhW0NEQVRBWzx4bWw+PC94bWw+XV0+CiAgICAgICAgICAgICAgICAgICAgPC9BZFBhcmFtZXRlcnM+CiAgICAgICAgICAgICAgICAgICAgPFZpZGVvQ2xpY2tzLz4KICAgICAgICAgICAgICAgICAgICA8TWVkaWFGaWxlcz4KICAgICAgICAgICAgICAgICAgICAgIDxNZWRpYUZpbGUgdHlwZT0idmlkZW8vbXA0IiB3aWR0aD0iMTI4MCIgaGVpZ2h0PSI3MjAiIGRlbGl2ZXJ5PSJwcm9ncmVzc2l2ZSIgaWQ9IjIiIGJpdHJhdGU9IjQzMTYiIG1pbkJpdHJhdGU9IjMyMCIgbWF4Qml0cmF0ZT0iMzIwIiBzY2FsYWJsZT0idHJ1ZSIgbWFpbnRhaW5Bc3BlY3RSYXRpbz0idHJ1ZSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDwhW0NEQVRBW2h0dHBzOi8vc29sdXRpb25zLmJyaWdodGNvdmUuY29tL2JjbHMvYWRzL2JjLWFkcy9iY2xzLWFkLTYtNXNlY29uZHMubXA0XV0+CiAgICAgICAgICAgICAgICAgICAgICA8L01lZGlhRmlsZT4KICAgICAgICAgICAgICAgICAgICA8L01lZGlhRmlsZXM+CiAgICAgICAgICAgICAgICAgIDwvTGluZWFyPgogICAgICAgICAgICAgICAgPC9DcmVhdGl2ZT4KICAgICAgICAgICAgICA8L0NyZWF0aXZlcz4KICAgICAgICAgICAgICA8RXh0ZW5zaW9ucz4KICAgICAgICAgICAgICAgIDxFeHRlbnNpb24+CiAgICAgICAgICAgICAgICAgIDx4bWw+ZGF0YTwveG1sPgogICAgICAgICAgICAgICAgPC9FeHRlbnNpb24+CiAgICAgICAgICAgICAgPC9FeHRlbnNpb25zPgogICAgICAgICAgICA8L0luTGluZT4KICAgICAgICAgIDwvQWQ+CiAgICAgICAgPC9WQVNUPgogICAgICA8L3ZtYXA6VkFTVEFkRGF0YT4KICAgIDwvdm1hcDpBZFNvdXJjZT4KICA8L3ZtYXA6QWRCcmVhaz4KCiAgPHZtYXA6QWRCcmVhayB0aW1lT2Zmc2V0PSIwMDowMDowNSIgYnJlYWtUeXBlPSJsaW5lYXIiIGJyZWFrSWQ9Im1pZHJvbGwiPgogICAgPHZtYXA6QWRTb3VyY2UgaWQ9Im1pZHJvbGwtYWQiIGFsbG93TXVsdGlwbGVBZHM9ImZhbHNlIiBmb2xsb3dSZWRpcmVjdHM9InRydWUiPgogICAgICA8dm1hcDpWQVNUQWREYXRhPgogICAgICAgIDxWQVNUIHZlcnNpb249IjMuMCI+CiAgICAgICAgICA8QWQgaWQ9IjIiPgogICAgICAgICAgICA8SW5MaW5lPgogICAgICAgICAgICAgIDxBZFN5c3RlbSB2ZXJzaW9uPSIxLjAiPlRlc3QgQWQgU2VydmVyPC9BZFN5c3RlbT4KICAgICAgICAgICAgICA8QWRUaXRsZT4KICAgICAgICAgICAgICAgIDwhW0NEQVRBW01hcmtldGluZ11dPgogICAgICAgICAgICAgIDwvQWRUaXRsZT4KICAgICAgICAgICAgICA8RGVzY3JpcHRpb24+CiAgICAgICAgICAgICAgICA8IVtDREFUQVtEZW1vIGFkIG51bWJlciA0XV0+CiAgICAgICAgICAgICAgPC9EZXNjcmlwdGlvbj4KICAgICAgICAgICAgICA8RXJyb3I+CiAgICAgICAgICAgICAgICA8IVtDREFUQVtdXT4KICAgICAgICAgICAgICA8L0Vycm9yPgogICAgICAgICAgICAgIDxDcmVhdGl2ZXM+CiAgICAgICAgICAgICAgICA8Q3JlYXRpdmU+CiAgICAgICAgICAgICAgICAgIDxMaW5lYXIgc2tpcG9mZnNldD0iMDA6MDA6MDUiPgogICAgICAgICAgICAgICAgICAgIDxEdXJhdGlvbj4wMDowMDoxMjwvRHVyYXRpb24+CiAgICAgICAgICAgICAgICAgICAgPFRyYWNraW5nRXZlbnRzLz4KICAgICAgICAgICAgICAgICAgICA8QWRQYXJhbWV0ZXJzPgogICAgICAgICAgICAgICAgICAgICAgPCFbQ0RBVEFbPHhtbD48L3htbD5dXT4KICAgICAgICAgICAgICAgICAgICA8L0FkUGFyYW1ldGVycz4KICAgICAgICAgICAgICAgICAgICA8VmlkZW9DbGlja3MvPgogICAgICAgICAgICAgICAgICAgIDxNZWRpYUZpbGVzPgogICAgICAgICAgICAgICAgICAgICAgPE1lZGlhRmlsZSB0eXBlPSJ2aWRlby9tcDQiIHdpZHRoPSIxMjgwIiBoZWlnaHQ9IjcyMCIgZGVsaXZlcnk9InByb2dyZXNzaXZlIiBpZD0iMyIgYml0cmF0ZT0iMzAyNiIgbWluQml0cmF0ZT0iMzIwIiBtYXhCaXRyYXRlPSIzMjAiIHNjYWxhYmxlPSJ0cnVlIiBtYWludGFpbkFzcGVjdFJhdGlvPSJ0cnVlIj4KICAgICAgICAgICAgICAgICAgICAgICAgPCFbQ0RBVEFbaHR0cHM6Ly9zb2x1dGlvbnMuYnJpZ2h0Y292ZS5jb20vYmNscy9hZHMvYmMtYWRzL2JjbHMtYWQtNC0xMnNlY29uZHMubXA0XV0+CiAgICAgICAgICAgICAgICAgICAgICA8L01lZGlhRmlsZT4KICAgICAgICAgICAgICAgICAgICA8L01lZGlhRmlsZXM+CiAgICAgICAgICAgICAgICAgIDwvTGluZWFyPgogICAgICAgICAgICAgICAgPC9DcmVhdGl2ZT4KICAgICAgICAgICAgICA8L0NyZWF0aXZlcz4KICAgICAgICAgICAgICA8RXh0ZW5zaW9ucz4KICAgICAgICAgICAgICAgIDxFeHRlbnNpb24+CiAgICAgICAgICAgICAgICAgIDx4bWw+ZGF0YTwveG1sPgogICAgICAgICAgICAgICAgPC9FeHRlbnNpb24+CiAgICAgICAgICAgICAgPC9FeHRlbnNpb25zPgogICAgICAgICAgICA8L0luTGluZT4KICAgICAgICAgIDwvQWQ+CiAgICAgICAgPC9WQVNUPgogICAgICA8L3ZtYXA6VkFTVEFkRGF0YT4KICAgIDwvdm1hcDpBZFNvdXJjZT4KICA8L3ZtYXA6QWRCcmVhaz4KCiAgPHZtYXA6QWRCcmVhayB0aW1lT2Zmc2V0PSJlbmQiIGJyZWFrVHlwZT0ibGluZWFyIiBicmVha0lkPSJwb3N0cm9sbCI+CiAgICA8dm1hcDpBZFNvdXJjZSBpZD0icG9zdHJvbGwtYWQiIGFsbG93TXVsdGlwbGVBZHM9ImZhbHNlIiBmb2xsb3dSZWRpcmVjdHM9InRydWUiPgogICAgICA8dm1hcDpWQVNUQWREYXRhPgogICAgICAgIDxWQVNUIHZlcnNpb249IjMuMCI+CiAgICAgICAgICA8QWQgaWQ9IjMiPgogICAgICAgICAgICA8SW5MaW5lPgogICAgICAgICAgICAgIDxBZFN5c3RlbSB2ZXJzaW9uPSIxLjAiPlRlc3QgQWQgU2VydmVyPC9BZFN5c3RlbT4KICAgICAgICAgICAgICA8QWRUaXRsZT4KICAgICAgICAgICAgICAgIDwhW0NEQVRBW0JyYW5kXV0+CiAgICAgICAgICAgICAgPC9BZFRpdGxlPgogICAgICAgICAgICAgIDxEZXNjcmlwdGlvbj4KICAgICAgICAgICAgICAgIDwhW0NEQVRBW0RlbW8gYWQgbnVtYmVyIDFdXT4KICAgICAgICAgICAgICA8L0Rlc2NyaXB0aW9uPgogICAgICAgICAgICAgIDxFcnJvcj4KICAgICAgICAgICAgICAgIDwhW0NEQVRBW11dPgogICAgICAgICAgICAgIDwvRXJyb3I+CiAgICAgICAgICAgICAgPENyZWF0aXZlcz4KICAgICAgICAgICAgICAgIDxDcmVhdGl2ZT4KICAgICAgICAgICAgICAgICAgPExpbmVhcj4KICAgICAgICAgICAgICAgICAgICA8RHVyYXRpb24+MDA6MDA6MDg8L0R1cmF0aW9uPgogICAgICAgICAgICAgICAgICAgIDxUcmFja2luZ0V2ZW50cy8+CiAgICAgICAgICAgICAgICAgICAgPEFkUGFyYW1ldGVycz4KICAgICAgICAgICAgICAgICAgICAgIDwhW0NEQVRBWzx4bWw+PC94bWw+XV0+CiAgICAgICAgICAgICAgICAgICAgPC9BZFBhcmFtZXRlcnM+CiAgICAgICAgICAgICAgICAgICAgPFZpZGVvQ2xpY2tzLz4KICAgICAgICAgICAgICAgICAgICA8TWVkaWFGaWxlcz4KICAgICAgICAgICAgICAgICAgICAgIDxNZWRpYUZpbGUgdHlwZT0idmlkZW8vbXA0IiB3aWR0aD0iMTI4MCIgaGVpZ2h0PSI3MjAiIGRlbGl2ZXJ5PSJwcm9ncmVzc2l2ZSIgaWQ9IjQiIGJpdHJhdGU9IjIxMTUiIG1pbkJpdHJhdGU9IjMyMCIgbWF4Qml0cmF0ZT0iMzIwIiBzY2FsYWJsZT0idHJ1ZSIgbWFpbnRhaW5Bc3BlY3RSYXRpbz0idHJ1ZSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDwhW0NEQVRBW2h0dHBzOi8vc29sdXRpb25zLmJyaWdodGNvdmUuY29tL2JjbHMvYWRzL2JjLWFkcy9iY2xzLWFkLTEtOHNlY29uZHMubXA0XV0+CiAgICAgICAgICAgICAgICAgICAgICA8L01lZGlhRmlsZT4KICAgICAgICAgICAgICAgICAgICA8L01lZGlhRmlsZXM+CiAgICAgICAgICAgICAgICAgIDwvTGluZWFyPgogICAgICAgICAgICAgICAgPC9DcmVhdGl2ZT4KICAgICAgICAgICAgICA8L0NyZWF0aXZlcz4KICAgICAgICAgICAgICA8RXh0ZW5zaW9ucz4KICAgICAgICAgICAgICAgIDxFeHRlbnNpb24+CiAgICAgICAgICAgICAgICAgIDx4bWw+ZGF0YTwveG1sPgogICAgICAgICAgICAgICAgPC9FeHRlbnNpb24+CiAgICAgICAgICAgICAgPC9FeHRlbnNpb25zPgogICAgICAgICAgICA8L0luTGluZT4KICAgICAgICAgIDwvQWQ+CiAgICAgICAgPC9WQVNUPgogICAgICA8L3ZtYXA6VkFTVEFkRGF0YT4KICAgIDwvdm1hcDpBZFNvdXJjZT4KICA8L3ZtYXA6QWRCcmVhaz4KCjwvdm1hcDpWTUFQPgo=",
        "creatives": null,
        "errors": null
      }
    ]
  }

您可以使用像 BASE64 這樣的工具來使響應主體可讀。

樣本解碼響應主體:

  <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">

    <vmap:AdBreak timeOffset="start" breakType="linear" breakId="preroll">
      <vmap:AdSource id="preroll-ad" allowMultipleAds="false" followRedirects="true">
        <vmap:VASTAdData>
          <VAST version="3.0">
            <Ad id="1">
              <InLine>
                <AdSystem version="1.0">Test Ad Server</AdSystem>
                <AdTitle>
                  <![CDATA[Portals]]>
                </AdTitle>
                <Description>
                  <![CDATA[Demo ad number 6]]>
                </Description>
                <Error>
                  <![CDATA[]]>
                </Error>
                <Creatives>
                  <Creative>
                    <Linear>
                      <Duration>00:00:8</Duration>
                      <TrackingEvents/>
                      <AdParameters>
                        <![CDATA[<xml></xml>]]>
                      </AdParameters>
                      <VideoClicks/>
                      <MediaFiles>
                        <MediaFile type="video/mp4" width="1280" height="720" delivery="progressive" id="2" bitrate="4316" minBitrate="320" maxBitrate="320" scalable="true" maintainAspectRatio="true">
                          <![CDATA[http://solutions.brightcove.com/bcls/ads/bc-ads/bcls-ad-6-5seconds.mp4]]>
                        </MediaFile>
                      </MediaFiles>
                    </Linear>
                  </Creative>
                </Creatives>
                <Extensions>
                  <Extension>
                    <xml>data</xml>
                  </Extension>
                </Extensions>
              </InLine>
            </Ad>
          </VAST>
        </vmap:VASTAdData>
      </vmap:AdSource>
    </vmap:AdBreak>
  ...