SmartSTREAMロゴ

SmartSTREAM サポートマニュアル

サポートマニュアルサイトTOPに戻る

プレイバックAPI

IDもしくは参照IDによるメディアの取得

メディアの情報をIDもしくは参照IDで取得するAPIです。

HTTPリクエスト

GET https://ovp-p-api.smartstream.ne.jp/v1/merchants/:merchant_id/medias/:media_id

OR

GET https://ovp-p-api.smartstream.ne.jp/v1/merchants/:merchant_id/medias/ref:ref_id

リクエストヘッダー

リクエストヘッダーはこちらをご確認ください。

URLパラメータ

フィールド タイプ 説明 サンプル 必要性
media_id String メディアID ***** media_id, ref_idのいずれか必須
merchant_id String マーチャントID nttsmc 必須
ec_url UrlString エンタイトルメントチェックURL https://… 任意
ref_id String 参照ID video1
user_id String ユーザーID 1 任意

レスポンス

フィールド タイプ 説明
merchant_id String マーチャントID
id String メディアID
ref_id String 参照ID (マーチャント内部でユニークである必要がある)
name String 名前
description Text 説明文
duration Number 尺(milliseconds)
encode_type String エンコードタイプ (ファイル or ライブ or スケジュールライブ)
publish_status String 公開設定
custom_fields Object カスタムフィールドの値、デフォルト値は{}
publish_geo_rule String 公開地域ルール
poster Object ポスター画像
 src String ポスター画像のURL
thumbnaill Object サムネイル画像
 src String サムネイルのURL
seek_preview_config JSON シークプレビュー設定
tags String[] タグの配列
offline_enabled Boolean オフライン再生が可能か
sources Object[] 動画ソースの配列
text_tracks Object[] テキストデータの配列
created_at DateString 作成日時
updated_at DateString 更新日時

レスポンスの例

{
  "id": "40459b7e6e414652828f98af788f3abc",
  "name": "BigBuckBunny",
  "ref_id": null,
  "description": null,
  "thumbnail": {
      "src": "https://images.smartstream.jp/nttsmc/12345667890/1234567890.jpg"
  },
  "poster": {
      "src": "https://images.smartstream.jp/nttsmc/12345667890/9999999999.jpg"
  },
  "tags": [],
  "encode_type": "",
  "publish_status": "",
  "custom_fields": {},
  "merchant_id": "nttsmc",
  "publish_geo_rule": null,
  "sources": [
    {
      "type": "application/vnd.apple.mpegurl",
      "src": "https://ovp-vod.smartstream.jp/nttsmc/40459b7e6e414652828f98af788f3abc/11111111/playlist.m3u8",
      "label": "35f91a9919164562b3dbb109fc27def4",
      "key_systems": {
        "com.apple.fps.1_0": {
          "key_request_url": "https://bees.smartstream.jp/nttsmc/40459b7e6e414652828f98af788f3abc/fairplay-license/?token=129y94hqfihliufo98yh2l3oh12luglruahdoczhp8doi2hiu1g",
          "certificate_url": "https://bees.smartstream.jp/nttsmc/40459b7e6e414652828f98af788f3abc/fairplay-license/cert/?specConform=true&token=129y94hqfihliufo98yh2l3oh12luglruahdoczhp8doi2hiu1g"
        }
      },
      "id": "791f9297e1da4ada8afcec2bea0c3a31"
    },
    {
      "type": "application/dash+xml",
      "src": "https://ovp-vod.smartstream.jp/nttsmc/1/123567890/manifest.mpd",
      "label": "b5c8614dd18249b5830e3238a28ed71e",
      "key_systems": {
        "com.widevine.alpha": {
          "license_url": "https://bees.smartstream.jp/nttsmc/40459b7e6e414652828f98af788f3abc/cenc/?specConform=true&token=129y94hqfihliufo98yh2l3oh12luglruahdoczhp8doi2hiu1g"
        },
        "com.microsoft.playready": {
          "license_url": "https://bees.smartstream.jp/nttsmc/40459b7e6e414652828f98af788f3abc/RightsManager.asmx?token=129y94hqfihliufo98yh2l3oh12luglruahdoczhp8doi2hiu1g"
        }
      },
      "id": "bca76a9f43214294b5d6db7e5acce5c2"
    }
  ],
  "duration": 3600000,
  "text_tracks": [
    {
      "mime_type": "text/vtt",
      "default": false,
      "src": "https://assets.smartstream.jp/nttsmc/1234567890.vtt?mediaId=40459b7e6e414652828f98af788f3abc",
      "asset_id": "1111111111"
      "label": "ES",
      "id": "f696dc837e9a43f6b12e0f039bfb2f89",
      "kind": "captions",
      "lang": "es"
    }
  ],
  "seek_preview_config": null,
  "created_at": "2017-10-01T00:00:00.000Z",
  "updated_at": "2017-10-01T00:00:00.000Z",
  "offline_enabled": false
}

エラーコード

ステータスコード コード メッセージ
400 BAD_REQUEST リクエストパラメーターが不正です
401 UNAUTHORIZED 認証に失敗しました
404 MEDIA_NOT_FOUND 該当するメディアが存在しません
500 SERVER_ERROR 予期せぬエラーが発生しました