RICOH Live Streaming REST API は Live Streaming サービスの公開 REST API です
- 本ページは料金・利用量集計 API の仕様について記載します
メンテナンスウィンドウ
- 本機能について、毎週水曜日18:00-20:00をメンテナンスウィンドウといたします
- メンテナンスウィンドウ内でのメンテナンス実施の場合、事前通知はなく、メンテナンスの開始から終了までステータスダッシュボードに掲示いたします
- メンテナンスを実施しない場合は特に告知を行いません
共通仕様
- API の認証/認可に失敗した場合、ステータスコード 401 のレスポンスが返却されます
- 本 API で取得されるデータの保証範囲について
- 終了後 24 時間以上経過した
RoomInstance
について確定した値が算入されていることを保証します
- 指定時刻範囲について
RoomInstance
の開始時刻が since
以降、until
未満のデータ、及び、その RoomInstance
に付随する ConnectionInstance` のデータに対して集計が行われます
since
で指定可能な時刻は、現在時刻から過去 1 年以内
until
で指定可能な時刻は、since
以降 1 ヶ月以内
approximate_total_cost
および approximate_cost
について
料金・利用量の明細リストの各明細項目について
item_name |
usage の単位 |
詳細 |
connection_time |
分 |
usage は ConnectionInstance 単位で接続時間の 1 分未満を切り捨てた値の合計値 |
traffic_volume |
GiB |
usage はデータ通信量の合計値
クライアント全体の集計の場合は合計値の 1GiB 未満を切り捨てた値
|
bitrate_reservation |
分 |
sub_items は各予約帯域幅設定ごとの副項目のリスト
各副項目の item_name は予約帯域幅の設定値 (Mbps)
各副項目の usage は RoomInstance 単位で接続時間の 1 分未満を切り捨てた値の合計値
|
Base URLs:
Authentication
- HTTP Authentication, scheme: basic クライアント ID を username、クライアントシークレットを password にした Basic 認証
料金・利用量集計 API
クライアント全体の料金・利用量集計結果の取得
Code samples
GET https://api.livestreaming.mw.smart-integration.ricoh.com/v1/clients/{client_id}/cost_and_usage/total?since=2019-08-24T14%3A15%3A22Z&until=2019-08-24T14%3A15%3A22Z HTTP/1.1
Host: api.livestreaming.mw.smart-integration.ricoh.com
Accept: application/json
GET /clients/{client_id}/cost_and_usage/total
Parameters
Name |
In |
Type |
Required |
Description |
client_id |
path |
string |
true |
クライアント ID |
env |
query |
array[string] |
false |
集計対象の環境
- - prod: プロダクション環境
- - dev: 開発環境
複数指定可能 ?env=prod&env=dev
指定されない場合は全ての環境について収集します
|
since |
query |
string(date-time) |
true |
集計範囲の開始時刻 (ISO8601 拡張形式) |
until |
query |
string(date-time) |
true |
集計範囲の終了時刻 (ISO8601 拡張形式) |
Enumerated Values
Parameter |
Value |
env |
prod |
env |
dev |
Responses
Status |
Meaning |
Description |
Schema |
200 |
OK |
CostAndUsageResponse オブジェクト
クライアント全体の集計結果のため、 classification_label は空となります
|
CostAndUsageResponse |
400 |
Bad Request |
リクエスト不正
error_id の値
- invalid_parameter: リクエストのクエリパラメータの不正、options のキーに不正だったパラメータ名が入ります
|
Error |
特定の課金分類ラベルについての料金・利用量集計結果の取得
Code samples
GET https://api.livestreaming.mw.smart-integration.ricoh.com/v1/clients/{client_id}/cost_and_usage/classification_labels/{classification_label}?since=2019-08-24T14%3A15%3A22Z&until=2019-08-24T14%3A15%3A22Z HTTP/1.1
Host: api.livestreaming.mw.smart-integration.ricoh.com
Accept: application/json
GET /clients/{client_id}/cost_and_usage/classification_labels/{classification_label}
Parameters
Name |
In |
Type |
Required |
Description |
client_id |
path |
string |
true |
クライアント ID |
classification_label |
path |
string |
true |
課金分類ラベル |
env |
query |
array[string] |
false |
集計対象の環境
- - prod: プロダクション環境
- - dev: 開発環境
複数指定可能 ?env=prod&env=dev
指定されない場合は全ての環境について収集します
|
since |
query |
string(date-time) |
true |
集計範囲の開始時刻 (ISO8601 拡張形式) |
until |
query |
string(date-time) |
true |
集計範囲の終了時刻 (ISO8601 拡張形式) |
Enumerated Values
Parameter |
Value |
env |
prod |
env |
dev |
Responses
Status |
Meaning |
Description |
Schema |
200 |
OK |
CostAndUsageResponse オブジェクト |
CostAndUsageResponse |
400 |
Bad Request |
リクエスト不正
error_id の値
- invalid_parameter: リクエストのクエリパラメータの不正、options のキーに不正だったパラメータ名が入ります
|
Error |
課金分類ラベルごとの料金・利用量集計結果の取得
Code samples
GET https://api.livestreaming.mw.smart-integration.ricoh.com/v1/clients/{client_id}/cost_and_usage/classification_labels?since=2019-08-24T14%3A15%3A22Z&until=2019-08-24T14%3A15%3A22Z HTTP/1.1
Host: api.livestreaming.mw.smart-integration.ricoh.com
Accept: application/json
GET /clients/{client_id}/cost_and_usage/classification_labels
Parameters
Name |
In |
Type |
Required |
Description |
client_id |
path |
string |
true |
クライアント ID |
env |
query |
array[string] |
false |
集計対象の環境
- - prod: プロダクション環境
- - dev: 開発環境
複数指定可能 ?env=prod&env=dev
指定されない場合は全ての環境について収集します
|
since |
query |
string(date-time) |
true |
集計範囲の開始時刻 (ISO8601 拡張形式) |
until |
query |
string(date-time) |
true |
集計範囲の終了時刻 (ISO8601 拡張形式) |
starts_with |
query |
string |
false |
この値に前方一致する課金分類ラベルについてのみ結果を返却します
指定されない場合は全ての課金分類ラベルについての結果を返却します
|
Enumerated Values
Parameter |
Value |
env |
prod |
env |
dev |
Responses
Status |
Meaning |
Description |
Schema |
200 |
OK |
CostAndUsageResponse オブジェクト |
CostAndUsageResponse |
400 |
Bad Request |
リクエスト不正
error_id の値
- invalid_parameter: リクエストのクエリパラメータの不正、options のキーに不正だったパラメータ名が入ります
|
Error |
Schemas
CostAndUsageResponse
料金・利用量 API のレスポンス
{
"results": [
{
"classification_label": "string",
"approximate_total_cost": 0,
"items": [
{
"item_name": "string",
"usage": 0,
"approximate_cost": 0
}
]
}
]
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
results |
[CostAndUsage] |
false |
none |
料金・利用量オブジェクトのリスト |
CostAndUsage
料金・利用量オブジェクト
{
"classification_label": "string",
"approximate_total_cost": 0,
"items": [
{
"item_name": "string",
"usage": 0,
"approximate_cost": 0
}
]
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
classification_label |
string |
false |
none |
課金分類ラベル
課金分類ラベルごとの集計の場合のみ設定され、クライアント全体の集計の場合は空
|
approximate_total_cost |
number |
true |
none |
料金合計の概算値 |
items |
[oneOf] |
true |
none |
料金・利用量の明細リスト |
oneOf
Name |
Type |
Required |
Restrictions |
Description |
anonymous |
CostAndUsageItem |
false |
none |
明細項目の利用量及び料金 |
xor
CostAndUsageItem
明細項目の利用量及び料金
{
"item_name": "string",
"usage": 0,
"approximate_cost": 0
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
item_name |
string |
true |
none |
項目名 |
usage |
number |
true |
none |
項目の利用量 |
approximate_cost |
number |
true |
none |
項目の料金の概算値 |
HierarchicalCostAndUsageItem
料金形態が階層化された明細項目の利用量及び料金
{
"item_name": "string",
"sub_items": [
{
"item_name": "string",
"usage": 0,
"approximate_cost": 0
}
]
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
item_name |
string |
true |
none |
項目名 |
sub_items |
[CostAndUsageItem] |
false |
none |
サブ項目に関しての利用量及び料金オブジェクトのリスト |
Error
{
"error_id": "string",
"message": "string",
"options": {}
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
error_id |
string |
true |
none |
エラーの種類を識別する ID |
message |
string |
false |
none |
エラーの内容を記述した開発者向けのメッセージ
バージョンアップによってテキストの内容が変更される可能性があるため、これに依存した処理を実装しないで下さい
|
options |
object |
false |
none |
エラーの補助情報
内容は API および error_id によって異なります
|