支持 聯繫支持 | 系統狀況 系統狀態

檢索視頻數據

本主題顯示了使用HTTP GET方法的各種示例請求。

簡介

在本主題中,您將學習如何檢索有關您的各種信息 Video Cloud 視頻,使用 CMS API 要求。 要創建這些請求,請將本文檔中列出的端點附加到具有您的帳戶ID的基本URL中。

    https://cms.api.brightcove.com/v1/accounts/{account_id}/{endpoint}
    
    

要求 CMS API 需要包含您的訪問令牌的授權標頭。 有關如何獲取客戶端憑據並使用它們來檢索訪問令牌的詳細信息,請參閱 Brightcove OAuth概述.

獲取視頻

檢索您所有視頻的數據 Video Cloud 帳戶。

終點: /videos

要求

    https://cms.api.brightcove.com/v1/accounts/1507807800001/videos
    
    

響應

    [ {
    "id" : "2114345471001",
    "account_id" : "1507807800001",
    "complete" : true,
    "created_at" : "2013-01-23T19:06:16.328Z",
    "cue_points" : [ {
    "name" : "Flying Off",
    "type" : "CODE",
    "time" : 2.64,
    "metadata" : null,
    "force_stop" : false,
    "asset_id" : null
    }, {
    "name" : "Pre-roll",
    "type" : "AD",
    "time" : 0.0,
    "metadata" : null,
    "force_stop" : false,
    "asset_id" : null
    }, {
    "name" : "Bird Back",
    "type" : "CODE",
    "time" : 5.938,
    "metadata" : null,
    "force_stop" : false,
    "asset_id" : null
    }, {
    "name" : "Post-roll",
    "type" : "AD",
    "time" : 8.242,
    "metadata" : null,
    "force_stop" : false,
    "asset_id" : null
    } ],
    "custom_fields" : {
    "customfield1" : "Approved",
    "customfield2" : "Verified"
    }, ...
    ]
    
    

獲取視頻

檢索特定視頻或ID多個視頻的數據

終點: /videos/{video_id}[,{video2_id},{video3_id}]

要求

    https://cms.api.brightcove.com/v1/accounts/1507807800001/videos/2114345471001
    
    

響應

    {
    "id" : "2114345471001",
    "account_id" : "1507807800001",
    "complete" : true,
    "created_at" : "2013-01-23T19:06:16.328Z",
    "cue_points" : [ {
    "name" : "Flying Off",
    "type" : "CODE",
    "time" : 2.64,
    "metadata" : null,
    "force_stop" : false,
    "asset_id" : null
    }, {
    "name" : "Pre-roll",
    "type" : "AD",
    "time" : 0.0,
    "metadata" : null,
    "force_stop" : false,
    "asset_id" : null
    }, {
    "name" : "Bird Back",
    "type" : "CODE",
    "time" : 5.938,
    "metadata" : null,
    "force_stop" : false,
    "asset_id" : null
    }, ...
    
    

獲取來源

檢索特定視頻的來源。

終點: /videos/{video_id}/sources

要求

    https://cms.api.brightcove.com/v1/accounts/1507807800001/videos/2114345471001/sources
    
    

響應

    [
    {
    "asset_id": "5164827527001",
    "remote": false,
    "src": "http://brightcove.vo.llnwd.net/e2/hls/57838016001/57838016001_5164827527001_5164799982001.m3u8?pubId=57838016001&videoId=5164799982001",
    "type": "application/vnd.apple.mpegurl"
    },
    {
    "asset_id": "5164827527001",
    "remote": false,
    "src": "https://brightcove.hs.llnwd.net/e2/hls/57838016001/57838016001_5164827527001_5164799982001.m3u8?pubId=57838016001&videoId=5164799982001",
    "type": "application/vnd.apple.mpegurl"
    }, ...
    ]
    
    

獲取圖像

檢索特定視頻的圖像。

終點: /videos/{video_id}/images

要求

    https://cms.api.brightcove.com/v1/accounts/1507807800001/videos/2114345471001/images
    
    

響應

    {
    "thumbnail" : {
    "id" : "3815806023001",
    "src" : "http://brightcove.vo.llnwd.net/v1/unsecured/media/1507807800001/201410/2431/1507807800001_3815806023001_thumb.jpg?pubId=1507807800001"
    },
    "poster" : {
    "id" : "3815782921001",
    "src" : "http://brightcove.vo.llnwd.net/v1/unsecured/media/1507807800001/201410/273/1507807800001_3815782921001_still.jpg?pubId=1507807800001"
    }
    }
    
    

通過refid獲取視頻

使用參考ID檢索特定視頻的數據。

終點: /videos/ref:{video_reference_id}

要求

    https://cms.api.brightcove.com/v1/accounts/1507807800001/videos/ref:titmouse_title_refid7
    
    

響應

    {
    "id" : "2114345471001",
    "account_id" : "1507807800001",
    "complete" : true,
    "created_at" : "2013-01-23T19:06:16.328Z",
    "cue_points" : [ {
    "name" : "Flying Off",
    "type" : "CODE",
    "time" : 2.64,
    "metadata" : null,
    "force_stop" : false,
    "asset_id" : null
    }, ...
    
    

通過引用獲取來源

使用參考ID檢索特定視頻的來源。

終點: /videos/ref:{video_reference_id}/sources

要求

    https://cms.api.brightcove.com/v1/accounts/1507807800001/videos/ref:titmouse_title_refid7/sources
    
    

響應

    [
    {
    "asset_id": "5192219618001",
    "remote": false,
    "src": "http://brightcove.vo.llnwd.net/v1/uds/pd/57838016001/201611/3753/57838016001_5192219618001_5192207668001.mp4?pubId=57838016001&videoId=5192207668001",
    "codec": "H264",
    "container": "MP4",
    "encoding_rate": 1823000,
    "duration": 41237,
    "height": 540,
    "width": 960,
    "size": 9417086,
    "uploaded_at": "2016-11-01T09:37:37.336Z"
    },
    {
    "asset_id": "5192219618001",
    "remote": false,
    "src": "https://brightcove.hs.llnwd.net/v1/uds/pd/57838016001/201611/3753/57838016001_5192219618001_5192207668001.mp4?pubId=57838016001&videoId=5192207668001",
    "codec": "H264",
    "container": "MP4",
    "encoding_rate": 1823000,
    "duration": 41237,
    "height": 540,
    "width": 960,
    "size": 9417086,
    "uploaded_at": "2016-11-01T09:37:37.336Z"
    }, ...
    ]
    
    

通過refid獲取圖像

使用參考ID檢索特定視頻的圖像。

終點: /videos/ref:{video_reference_id}/images

要求

    https://cms.api.brightcove.com/v1/accounts/1507807800001/videos/ref:titmouse_title_refid7/images
    
    

響應

    {
    "thumbnail" : {
    "id" : "3815806023001",
    "src" : "http://brightcove.vo.llnwd.net/v1/unsecured/media/1507807800001/201410/2431/1507807800001_3815806023001_thumb.jpg?pubId=1507807800001"
    },
    "poster" : {
    "id" : "3815782921001",
    "src" : "http://brightcove.vo.llnwd.net/v1/unsecured/media/1507807800001/201410/273/1507807800001_3815782921001_still.jpg?pubId=1507807800001"
    }
    }
    
    

頁面最後更新於12年2020月XNUMX日