SmartSTREAM logo

SmartSTREAM Support Manual

Return to Support Manual TOP

Catalog API

Common Processing

Request Headers

Please refer here for request headers.

Retrieve Media by ID or Reference ID

API to retrieve a single media item.

HTTP Request

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

OR

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

URL Parameters

Field Type Description Example Required
merchant_id String Merchant ID nttsmc Required
media_id String Media ID 1 Either media_id or ref_id is required
ref_id String Reference ID video1

Response

Field Type Description
merchant_id String Merchant ID
id String Media ID
ref_id String Reference ID (must be unique within the merchant account)
live_event_id String Live event ID
name String Name
description String Description
duration Number Duration (milliseconds)
encode_type String Encoding type (file or live or scheduled live)
custom_fields Object Custom field values, default is {}
publish_geo_rule String Geo publishing rule
poster Object Poster image
 src String Poster image URL
thumbnaill Object Thumbnail image
 src String Thumbnail image URL
seek_preview_config JSON Seek preview configuration
tags String[] Array of tags
offline_enabled Boolean Whether offline playback is enabled
text_tracks Object[] Array of text tracks
created_at DateString Created date and time
updated_at DateString Updated date and time

Response Example

HTTP/1.1 200 OK
{
"merchant_id": "nttsmc",
"id": "7f8d4baf20f244fca34acbe3452886ac",
"ref_id": null,
"live_event_id": "6126a01db6744dca93aa2af575e9ba0c",
"name": "live_event_6126a01db6744dca93aa2af575e9ba0c",
"description": "",
"duration": null,
"encode_type": null,
"custom_fields": {
    "keywords": "live, test",
    "link": "http://test_link"
  },
"publish_geo_rule": [
  "jp"
],
"poster": {
  "src": "/uploads/nttsmc/sample_poster.gif"
},
"thumbnail": {
  "src": "/uploads/nttsmc/sample_thumbnail.jpg"
},
"seek_preview_config": null,
"tags": [],
"offline_enabled": false,
"text_tracks": [
  {
    "kind": "subtitles",
    "lang": "ja",
    "mime_type": "type/vtt",
    "src": "https://s3-ap-northeast-1.amazonaws.com/sample.mp3"
  }
],
"created_at": "2018-02-22T12:03:36.427+09:00",
"updated_at": "2018-02-22T18:44:38.839+09:00"
}

Error Codes

Status Code Code Message
401 UNAUTHORIZED Authentication failed
403 GEO_RULE Access from this IP address is not permitted
404 MEDIA_NOT_FOUND The specified media does not exist
500 SERVER_ERROR An unexpected error has occurred

Retrieve Media List

This API retrieves a list of media information.

HTTP Request

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

URL Parameters

Field Type Description Example Required
merchant_id String Merchant ID nttsmc Required
live_event_id String Live event ID id Optional
job_id String Job ID id Optional
media_group_id String Media Group ID id Optional

Query parameters

Field Type Description Example
limit Integer Number of records to retrieve 30
page Integer Page number 1
sort String Sort column updated_at
order String Sort order ASC

Response

Field Type Description
merchant_id String Merchant ID
id String Media ID
ref_id String Reference ID (must be unique within the merchant account)
live_event_id String Live event ID
name String Name
description String Description
duration Number Duration (milliseconds)
encode_type String Encoding type (file or live or scheduled live)
custom_fields Object Custom field values, default is {}
publish_geo_rule String Geo publishing rule
poster Object Poster image
 src String Poster image URL
thumbnaill Object Thumbnail image
 src String Thumbnail image URL
seek_preview_config JSON Seek preview configuration
tags String[] Array of tags
offline_enabled Boolean Whether offline playback is enabled
text_tracks Object[] Array of text tracks
created_at DateString Created date and time
updated_at DateString Updated date and time

Response Example

HTTP/1.1 200 OK
{
  "count": 30,
  "medias":
    [
      {<media1 fields>},
      {<media2 fields>},
      ...
    ]
}

Error Codes

Status Code Code Message
400 BAD_REQUEST Invalid request parameters
401 UNAUTHORIZED Authentication failed
404 MEDIA_NOT_FOUND The specified media does not exist
500 SERVER_ERROR An unexpected error has occurred

Edit Media

This API edits media information.

HTTP Request

PUT https://ovp-s-api.smartstream.ne.jp/v1/merchants/:merchant_id/medias/:media_id

OR

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

URL Parameters

Field Type Description Example Required
merchant_id String Merchant ID nttsmc Required
media_id String Media ID 1 Either media_id or ref_id is required
ref_id String Reference ID video1

Request

Field Type Description Required
name String Title Optional
description String Description Optional
ref_id String Reference ID Optional
publish_status String Publication status Optional (select from publish_on, publish_off, before_review, draft)
publish_geo_rule Array Target publishing regions Optional (*)
publish_start_at DateString Publish start date and time Required
publish_end_at DateString Publish end date and time Optional
thumbnail_image File Thumbnail image file Optional
poster_image File Poster image file Optional
thumbnail_image_url String Thumbnail image file URL Optional
poster_image_url String Poster image file URL Optional
access_control_ips Jsonb IP restriction settings Optional
access_control_hosts Jsonb Host restriction settings Optional

Note: jp, au, gb, ca, fr, nz, in, de, cn, hk, br, us, my, tw, and id correspond to Japan, Australia, the United Kingdom, Canada, France, New Zealand, India, Germany, the People’s Republic of China, the Hong Kong Special Administrative Region of the People’s Republic of China, Brazil, the United States, Malaysia, Taiwan, and Indonesia, respectively.

Request example

{
  "name": "sample",
  "publish_status": "publish_on",
  "publish_geo_rule": ["jp","au","de","us"],
  "access_control_ips": {"black_ips":["12.34.56.78","100.100.100.100"]},
  "access_control_hosts": {"black_hosts":["https://sample.jp"]},
  "thumbnail_image_url": "https://sample.ne.jp/sample.jpg"
  ...
}

Response

Field Type Description
merchant_id String Merchant ID
id String Media ID
ref_id String Reference ID (must be unique within the merchant account)
live_event_id String Live event ID
name String Name
description String Description
duration Number Duration (milliseconds)
encode_type String Encoding type (file or live or scheduled live)
custom_fields Object Custom field values, default is {}
publish_geo_rule String Geo publishing rule
poster Object Poster image
 src String Poster image URL
thumbnaill Object Thumbnail image
 src String Thumbnail image URL
seek_preview_config JSON Seek preview configuration
tags String[] Array of tags
offline_enabled Boolean Whether offline playback is enabled
text_tracks Object[] Array of text tracks
created_at DateString Created date and time
updated_at DateString Updated date and time

Delete Media

This is the API to delete media.

HTTP Request

DELETE https://ovp-s-api.smartstream.ne.jp/v1/merchants/:merchant_id/medias/:media_id

OR

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

URL Parameters

Field Type Description Example Required
merchant_id String Merchant ID nttsmc Required
media_id String Media ID 39u3jmjbaboi12hojnlknn Either media_id or ref_id is required
ref_id String Reference ID video1

Response

Field Type Description
merchant_id String Merchant ID
id String Media ID
ref_id String Reference ID (must be unique within the merchant account)
live_event_id String Live event ID
name String Name
description String Description
duration Number Duration (milliseconds)
encode_type String Encoding type (file or live or scheduled live)
custom_fields Object Custom field values, default is {}
publish_geo_rule String Geo publishing rule
poster Object Poster image
 src String Poster image URL
thumbnaill Object Thumbnail image
 src String Thumbnail image URL
seek_preview_config JSON Seek preview configuration
tags String[] Array of tags
offline_enabled Boolean Whether offline playback is enabled
text_tracks Object[] Array of text tracks
created_at DateString Created date and time
updated_at DateString Updated date and time

Response Example

HTTP/1.1 200 OK
{
"merchant_id": "nttsmc",
"id": "7f8d4baf20f244fca34acbe3452886ac",
"ref_id": null,
"live_event_id": "6126a01db6744dca93aa2af575e9ba0c",
"name": "live_event_6126a01db6744dca93aa2af575e9ba0c",
"description": "",
"duration": null,
"encode_type": null,
"custom_fields": {
    "keywords": "live, test",
    "link": "http://test_link"
  },
"publish_geo_rule": [
  "jp"
],
"poster": {
  "src": "/uploads/nttsmc/sample_poster.gif"
},
"thumbnail": {
  "src": "/uploads/nttsmc/sample_thumbnail.jpg"
},
"seek_preview_config": null,
"tags": [],
"offline_enabled": false,
"text_tracks": [
  {
    "kind": "subtitles",
    "lang": "ja",
    "mime_type": "type/vtt",
    "src": "https://s3-ap-northeast-1.amazonaws.com/sample.mp3"
  }
],
"created_at": "2018-02-22T12:03:36.427+09:00",
"updated_at": "2018-02-22T18:44:38.839+09:00"
}

Error Codes

Status Code Code Message
401 UNAUTHORIZED Authentication failed
404 MEDIA_GROUP_NOT_FOUND The specified media group does not exist
500 SERVER_ERROR An unexpected error has occurred

Retrieve Media Group List

HTTP Request

GET https://ovp-s-api.smartstream.ne.jp/v1/merchants/:merchant_id/media_groups

URL Parameters

Field Type Description Example Required
merchant_id String Merchant ID nttsmc Required

Query parameters

Field Type Description Example
limit Integer Number of records to retrieve 30
page Integer Page number 1
sort String Sort column updated_at
order String Sort order ASC

Response

Field Type Description
merchant_id String Merchant ID
id String Media Group ID
ref_id String Reference ID
name String Name
description String Description
created_at DateString Created date and time
updated_at DateString Updated date and time

Response Example

HTTP/1.1 200 OK
{
  "count": 30,
  "media_groups":
    [
      {<media_group1 fields>},
      {<media_group2 fields>},
      ...
    ]
}

Error Codes

Status Code Code Message
400 BAD_REQUEST Invalid request parameters
401 UNAUTHORIZED Authentication failed
500 SERVER_ERROR An unexpected error has occurred