RICOH Live Streaming REST API は Live Streaming サービスの公開 REST API です
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:
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
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 拡張形式) |
Parameter | Value |
---|---|
env | prod |
env | dev |
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}
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 拡張 形式) |
Parameter | Value |
---|---|
env | prod |
env | dev |
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
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 | この値に前方一致する課金分類ラベルについてのみ結果を返却します ・指定されない場合は全ての課金分類ラベルについての結果を返却します |
Parameter | Value |
---|---|
env | prod |
env | dev |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | CostAndUsageResponse オブジェクト | CostAndUsageResponse |
400 | Bad Request | リクエスト不正 ・error_id の 値 ・invalid_parameter: リクエストのクエリパラメータの不正、options のキーに不正だったパラメータ名が入ります | Error |
料金・利用量 API のレスポンス
{
"results": [
{
"classification_label": "string",
"approximate_total_cost": 0,
"items": [
{
"item_name": "string",
"usage": 0,
"approximate_cost": 0
}
]
}
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
results | [CostAndUsage] | false | none | 料金・利用量オブジェクトのリスト |
料金・利用量オブジェクト
{
"classification_label": "string",
"approximate_total_cost": 0,
"items": [
{
"item_name": "string",
"usage": 0,
"approximate_cost": 0
}
]
}
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
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | HierarchicalCostAndUsageItem | false | none | 料金形態が階層化された明細項目の利用量及び料金 |
明細項目の利用量及び料金
{
"item_name": "string",
"usage": 0,
"approximate_cost": 0
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
item_name | string | true | none | 項目名 |
usage | number | true | none | 項目の利用量 |
approximate_cost | number | true | none | 項目の料金の概算値 |
料金形態が階層化された明細項目の利用量及び料金
{
"item_name": "string",
"sub_items": [
{
"item_name": "string",
"usage": 0,
"approximate_cost": 0
}
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
item_name | string | true | none | 項目名 |
sub_items | [CostAndUsageItem] | false | none | サブ項目に関しての利用量及び料金オブジェクトのリスト |
{
"error_id": "string",
"message": "string",
"options": {}
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
error_id | string | true | none | エラーの種類を識別する ID |
message | string | false | none | ・エラーの内容を記述した開発者向けのメッセージ ・バージョンアップによってテキストの内容が変更される可能性があるため、これに依存した処理を実装しないで下さい |
options | object | false | none | ・エラーの補助情報 ・内容は API および error_id によって異なります |