API

概要

API は Sora に対して HTTP 経由で実行できます。

API は DynamoDB や Route53 などの AWS API が独特な仕様なので紹介 を参考にしており、 x-sora-target というヘッダーを使って実行します。

全ての API は POST を使用し、PATH は / です。リクエストの Body には JSON を使用します。

API の種類

  • API

    • 正式リリースされている API

  • 実験的 API

    • 仕様が確定していない API

    • 詳細は 実験的 API をご確認ください

  • 非推奨 API

    • 期限が来たら廃止される API

    • 詳細は 非推奨 API をご確認ください

設定

api_port

API のポート番号を変更したい場合は sora.conf にて、 API のポート番号を設定してください。

デフォルトでは 3000 番を利用します。

api_port = 3000

api_loopback_address_only

API へのアクセスをループバックアドレスからのみに制限します。 本番環境では可能な限り有効にしてください。

api_loopback_address_only = true

api_cors_origin

API をクロスドメインで使用したい場合に設定します。

api_cors_origin = http://127.0.0.1:5000

こうすることで http://127.0.0.1:5000 から API を叩くことができるようになります。

httpie

ここでの例では httpie という Python のライブラリを使用しています。

インストール

  • Ubuntu は apt install httpie で入ります

  • CentOS は yum install httpie で入ります

  • macOS は brew install httpie または port install httpie で入ります

詳細は https://github.com/httpie/httpie#installation をご確認下さい。

シグナリング API

指定したチャネルの接続をすべて切断する

サービス

Sora

バージョン

20151104

オペレーション

DisconnectChannel

x-sora-target

Sora_20151104.DisconnectChannel

リクエスト JSON

キー

channel_id

string

reason (オプション)

object

reason に値を指定した場合、イベントウェブフック connection.destroyedreason に指定した値が入ってきます。

$ http POST 127.0.0.1:3000 \
    x-sora-target:Sora_20151104.DisconnectChannel \
    channel_id=sora \
    -vvv
POST / HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.3
x-sora-target: Sora_20151104.DisconnectChannel

{
    "channel_id": "sora"
}

HTTP/1.1 200 OK
content-length: 0
content-type: application/json
date: Sun, 24 Jul 2016 06:04:53 GMT
server: Cowboy

指定したクライアント ID の接続をすべて切断する

サービス

Sora

バージョン

20151104

オペレーション

DisconnectClient

x-sora-target

Sora_20151104.DisconnectClient

リクエスト JSON

キー

channel_id

string

client_id

string

reason (オプション)

object

reason に値を指定した場合、イベントウェブフック connection.destroyedreason に指定した値が入ってきます。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20151104.DisconnectClient \
    channel_id=sora \
    client_id=HMRVPQEXJX03D3B3WE778SJGRC \
    -vvv
POST / HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 75
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20151104.DisconnectClient

{
    "channel_id": "sora",
    "client_id": "HMRVPQEXJX03D3B3WE778SJGRC"
}

HTTP/1.1 200 OK
content-length: 0
content-type: application/json
date: Sun, 29 May 2020 05:13:20 GMT
server: Cowboy

指定したコネクション ID の接続を切断する

サービス

Sora

バージョン

20151104

オペレーション

DisconnectConnection

x-sora-target

Sora_20151104.DisconnectConnection

リクエスト JSON

キー

channel_id

string

connection_id

string

reason (オプション)

object

reason に値を指定した場合、イベントウェブフック connection.destroyedreason に指定した値が入ってきます。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20151104.DisconnectConnection \
    channel_id=sora \
    connection_id=HMRVPQEXJX03D3B3WE778SJGRC \
    -vvv
POST / HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 75
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20151104.DisconnectConnection

{
    "channel_id": "sora",
    "connection_id": "HMRVPQEXJX03D3B3WE778SJGRC"
}

HTTP/1.1 200 OK
content-length: 0
content-type: application/json
date: Sun, 29 May 2020 05:13:20 GMT
server: Cowboy

すべての接続一覧を取得する

サービス

Sora

バージョン

20201013

オペレーション

ListConnections

x-sora-target

Sora_20201013.ListConnections

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201013.ListConnections \
    -vvv
POST / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 0
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.2.0
x-sora-target: Sora_20201013.ListConnections



HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 908
content-type: application/json
date: Wed, 25 Nov 2020 09:25:07 GMT
server: Cowboy

[
    {
        "audio": {
            "codec_type": "OPUS"
        },
        "channel_id": "akane",
        "client_id": "DV2Z3MSXC50M78Y11ETN3VZ360",
        "connection_created_timestamp_sec": 1606296288,
        "connection_id": "DV2Z3MSXC50M78Y11ETN3VZ360",
        "multistream": true,
        "role": "sendrecv",
        "simulcast": false,
        "spotlight": false,
        "video": {
            "bit_rate": 1000,
            "codec_type": "VP9"
        }
    },
    {
        "audio": {
            "codec_type": "OPUS"
        },
        "channel_id": "sora",
        "client_id": "DKF93NH82X3BDB0CVKEH32JMVR",
        "connection_created_timestamp_sec": 1606295248,
        "connection_id": "DKF93NH82X3BDB0CVKEH32JMVR",
        "multistream": true,
        "role": "sendrecv",
        "simulcast": false,
        "spotlight": false,
        "video": {
            "bit_rate": 1000,
            "codec_type": "VP9"
        }
    },
    {
        "audio": {
            "codec_type": "OPUS"
        },
        "channel_id": "sora",
        "client_id": "W6725M370N2W301378Y5SFG01C",
        "connection_created_timestamp_sec": 1606295249,
        "connection_id": "W6725M370N2W301378Y5SFG01C",
        "multistream": true,
        "role": "sendrecv",
        "simulcast": false,
        "spotlight": false,
        "video": {
            "bit_rate": 1000,
            "codec_type": "VP9"
        }
    }
]

指定したチャネルの接続一覧を取得する

サービス

Sora

バージョン

20201013

オペレーション

ListChannelConnections

x-sora-target

Sora_20201013.ListChannelConnections

キー

channel_id

string

http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201013.ListChannelConnections \
    channel_id=sora \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.2.0
x-sora-target: Sora_20201013.ListChannelConnections

{
    "channel_id": "sora"
}

HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 605
content-type: application/json
date: Wed, 25 Nov 2020 09:26:00 GMT
server: Cowboy

[
    {
        "audio": {
            "codec_type": "OPUS"
        },
        "channel_id": "sora",
        "client_id": "DKF93NH82X3BDB0CVKEH32JMVR",
        "connection_created_timestamp_sec": 1606295248,
        "connection_id": "DKF93NH82X3BDB0CVKEH32JMVR",
        "multistream": true,
        "role": "sendrecv",
        "simulcast": false,
        "spotlight": false,
        "video": {
            "bit_rate": 1000,
            "codec_type": "VP9"
        }
    },
    {
        "audio": {
            "codec_type": "OPUS"
        },
        "channel_id": "sora",
        "client_id": "W6725M370N2W301378Y5SFG01C",
        "connection_created_timestamp_sec": 1606295249,
        "connection_id": "W6725M370N2W301378Y5SFG01C",
        "multistream": true,
        "role": "sendrecv",
        "simulcast": false,
        "spotlight": false,
        "video": {
            "bit_rate": 1000,
            "codec_type": "VP9"
        }
    }
]

プッシュ API

シグナリングで使用している WebSocket を活用できる API です。 この機能を使うことでアプリ側でプッシュの仕組みを用意する必要がなくなります。

指定したチャネル全員にプッシュ通知を送る

サービス

Sora

バージョン

20160711

オペレーション

PushChannel

x-sora-target

Sora_20160711.PushChannel

キー

channel_id

string

data

object

data には全員に通知する JSON を指定してください。 クライアントには data に指定した JSON が送られます。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20160711.PushChannel \
    channel_id=sora \
    data:="{\"spam\": \"egg\"}" \
    -vvv
POST / HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 47
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.4
x-sora-target: Sora_20160711.PushChannel

{
    "channel_id": "sora",
    "data": {
        "spam": "egg"
    }
}

HTTP/1.1 200 OK
content-length: 37
content-type: application/json
date: Sun, 24 Jul 2016 06:26:21 GMT
server: Cowboy

{
    "data": {
        "spam": "egg"
    },
    "type": "push"
}

指定したチャネルのクライアントにプッシュ通知を送る

サービス

Sora

バージョン

20160711

オペレーション

PushClient

x-sora-target

Sora_20160711.PushClient

キー

channel_id

string

client_id

string

data

object

複数の接続に同一の client_id が指定されていた場合、複数の接続にプッシュ通知が送られます。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20160711.PushClient \
    channel_id=sora \
    client_id=C0YTCRZM715BKATBXWFPKTYGRM \
    data:="{\"spam\": \"egg\"}" \
    -vvv
POST / HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 100
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.4
x-sora-target: Sora_20160711.PushClient

{
    "channel_id": "sora",
    "client_id": "C0YTCRZM715BKATBXWFPKTYGRM",
    "data": {
        "spam": "egg"
    }
}

HTTP/1.1 200 OK
content-length: 37
content-type: application/json
date: Sun, 24 Jul 2016 07:46:31 GMT
server: Cowboy

{
    "data": {
        "spam": "egg"
    },
    "type": "push"
}

指定したチャネルの接続にプッシュ通知を送る

サービス

Sora

バージョン

20160711

オペレーション

PushConnection

x-sora-target

Sora_20160711.PushConnection

キー

channel_id

string

connection_id

string

data

object

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20160711.PushConnection \
    channel_id=sora \
    connection_id=C0YTCRZM715BKATBXWFPKTYGRM \
    data:="{\"spam\": \"egg\"}" \
    -vvv
POST / HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 100
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.4
x-sora-target: Sora_20160711.PushConnection

{
    "channel_id": "sora",
    "client_id": "C0YTCRZM715BKATBXWFPKTYGRM",
    "data": {
        "spam": "egg"
    }
}

HTTP/1.1 200 OK
content-length: 37
content-type: application/json
date: Sun, 24 Jul 2016 07:46:31 GMT
server: Cowboy

{
    "data": {
        "spam": "egg"
    },
    "type": "push"
}

録画 API

録画されたファイルは sora.confarchive_dir に指定したフォルダに置かれます。

音声と映像のコーデック指定はシグナリング開始時に指定してください。

指定したチャネルの録画を開始する

サービス

Sora

バージョン

20161101

オペレーション

StartRecording

x-sora-target

Sora_20161101.StartRecording

キー

channel_id

string

expire_time

integer

split_duration (オプション)

integer

split_only (オプション)

boolean

  • expire_time の範囲は 0 から 86400 までで、秒数を指定してください

    • expire_time を 0 に指定した場合、録画の期限が無くなります

  • split_duration は 1 から 86400 までで、秒数を指定して下さい

  • split_only は true か false を指定して下さい。指定しない場合は false が指定されます

  • split_only を true に指定する場合は expire_time は 0 を指定する必要があります

  • start_time は録画を開始した時間で Unix Time (UTC) の秒数で返ってきます

expire_time が 0:

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20161101.StartRecording \
    channel_id=sora \
    expire_time:=0 \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 41
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.9
x-sora-target: Sora_20161101.StartRecording

{
    "channel_id": "sora",
    "expire_time": 0
}

HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 82
content-type: application/json
date: Wed, 19 Apr 2017 06:35:38 GMT
server: Cowboy

{
    "channel_id": "sora",
    "expire_time": 0,
    "recording_id": "C0YTCRZM715BKATBXWFPKTYGRM"
}

expire_time が 3600:

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20161101.StartRecording \
    channel_id=sora \
    expire_time:=3600 \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 43
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.9
x-sora-target: Sora_20161101.StartRecording

{
    "channel_id": "sora",
    "expire_time": 3600
}

HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 84
content-type: application/json
date: Wed, 19 Apr 2017 06:37:08 GMT
server: Cowboy

{
    "channel_id": "sora",
    "expire_time": 3600,
    "recording_id": "C0YTCRZM715BKATBXWFPKTYGRM"
}

split_only が true:

http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20161101.StartRecording \
    channel_id=sora \
    expire_time:=0 \
    split_duration:=3600 \
    split_only:=true \
    -vvv

POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 84
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.2.0
x-sora-target: Sora_20161101.StartRecording

{
    "channel_id": "sora",
    "expire_time": 0,
    "split_duration": 3600,
    "split_only": true
}

HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 121
content-type: application/json
date: Fri, 04 Dec 2020 03:04:17 GMT
server: Cowboy

{
    "channel_id": "sora",
    "expire_time": 0,
    "recording_id": "MK4J54QBGS4ES0MCSZMF6C9M9M",
    "split_duration": 3600,
    "split_only": true
}

エラー

すでに録画が開始している場合は "STARTED-RECORDING" が返ってきます。

$ http POST 127.0.0.1:3000/ \
        x-sora-target:Sora_20161101.StartRecording \
        channel_id=sora \
        expire_time:=3600 \
        -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 43
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.9
x-sora-target: Sora_20161101.StartRecording

{
    "channel_id": "sora",
    "expire_time": 3600
}

HTTP/1.1 400 Bad Request
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 34
content-type: application/json
date: Wed, 19 Apr 2017 06:44:58 GMT
server: Cowboy

{
    "error_type": "STARTED-RECORDING"
}
  • "STARTED-RECORDING"

    • すでに指定したチャネルでは録画が開始されている

指定したチャネルの録画を停止する

サービス

Sora

バージョン

20161101

オペレーション

StopRecording

x-sora-target

Sora_20161101.StopRecording

キー

channel_id

string

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20161101.StopRecording \
    channel_id=sora \
    -vvv
POST / HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.4
x-sora-target: Sora_20161101.StopRecording

{
    "channel_id": "sora"
}

HTTP/1.1 200 OK
content-length: 21
content-type: application/json
date: Fri, 11 Nov 2016 14:29:14 GMT
server: Cowboy

{
    "channel_id": "sora"
}

エラー

  • NOT-STARTED-RECORDING

    • 指定したチャネルの録画が開始されていない

録画が有効かどうかを確認する

サービス

Sora

バージョン

20161101

オペレーション

GetStartedRecording

x-sora-target

Sora_20161101.GetStartedRecording

キー

channel_id

string

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20161101.GetStartedRecording \
    channel_id=sora \
    -vvv
POST / HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.4
x-sora-target: Sora_20161101.GetStartedRecording

{
    "channel_id": "sora"
}

HTTP/1.1 200 OK
content-length: 88
content-type: application/json
date: Sat, 19 Nov 2016 13:03:24 GMT
server: Cowboy

{
    "channel_id": "sora",
    "expire_time": 3600,
    "expired_at": 1479563964,
    "start_time": 1479560364
}

エラー

指定したチャネルで録画が開始されていない場合は "NOT-STARTED-RECORDING" が返ってきます

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20161101.GetStartedRecording \
    channel_id=sora \
    -vvv
POST / HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.4
x-sora-target: Sora_20161101.GetStartedRecording

{
    "channel_id": "sora"
}

HTTP/1.1 400 Bad Request
content-length: 38
content-type: application/json
date: Sat, 19 Nov 2016 13:03:53 GMT
server: Cowboy

{
    "error_type": "NOT-STARTED-RECORDING"
}
  • NOT-STARTED-RECORDING

    • 指定したチャネルの録画が開始されていない

録画が行われているチャネル一覧を取得する

サービス

Sora

バージョン

20161101

オペレーション

ListStartedRecording

x-sora-target

Sora_20161101.ListStartedRecording

$ http POST 127.0.0.1:3000/ \
    "x-sora-target:Sora_20161101.ListStartedRecording" \
    -vvv
POST / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 0
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.4
x-sora-target: Sora_20161101.ListStartedRecording



HTTP/1.1 200 OK
content-length: 168
content-type: application/json
date: Sat, 19 Nov 2016 13:05:38 GMT
server: Cowboy

[
    {
        "channel_id": "sora",
        "expire_time": 3600,
        "expired_at": 1479564309,
        "start_time": 1479560709
    },
    {
        "channel_id": "akane",
        "expire_time": 0,
        "expired_at": 0,
        "start_time": 1479560735
    }
]

現在録画中の状態を取得する

サービス

Sora

バージョン

20161101

オペレーション

ListArchiving

x-sora-target

Sora_20161101.ListArchiving

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20161101.ListArchiving \
    -vvv
POST / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 0
Host: 127.0.0.1:3000
User-Agent: HTTPie/1.0.2
x-sora-target: Sora_20161101.ListArchiving



HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 218
content-type: application/json
date: Mon, 15 Apr 2019 08:39:20 GMT
server: Cowboy

[
    {
        "audio": {
            "codec_type": "OPUS"
        },
        "channel_id": "sora",
        "client_id": "C0YTCRZM715BKATBXWFPKTYGRM",
        "connection_id": "C0YTCRZM715BKATBXWFPKTYGRM",
        "seconds": 146,
        "video": {
            "bit_rate": 1000,
            "codec_type": "VP9"
        }
    }
]
  • seconds は録画を開始してからの経過時間(秒)です

  • video が設定されていない場合は "video": false という値が入ってきます

  • audio が設定されていない場合は "audio": false という値が入ってきます

統計 API

統計項目一覧

説明が書いていないものは項目名そのままの内容になります

  • timestamp

    • API を取得した時点の UTC 時間 RFC3339 形式

  • channel_id

  • client_id

  • connection_id

  • dtls

    • total_received_dtls

      • 受信した DTLS パケットの総数

    • total_sent_dtls

      • 送信した DTLS パケットの総数

  • network_status

    • unstable_level

      • API を取得した時点の不安定レベル

  • packet_loss_simulator

    • total_dropped_received_rtp

      • 受信したがパケロスシミュレータが落とした RTP パケットの総数

    • total_dropped_sent_rtp

      • 送信したがパケロスシミュレータが落とした RTP パケットの総数

  • rtp

    • total_generic_nack_cache_hit

      • 再送要求に答えた総数

    • total_generic_nack_cache_miss

      • 再送要求に答えられなかった総数

    • total_pli_trigger

      • 再送要求が限界に来たため全画面要求(PLI) を送信した総数

    • total_received

    • total_received_byte_size

    • total_received_rtcp

    • total_received_rtcp_byte

    • total_received_rtcp_byte_size

    • total_received_rtcp_psfb_afb

    • total_received_rtcp_psfb_fir

    • total_received_rtcp_psfb_pli

    • total_received_rtcp_rr

    • total_received_rtcp_rtpfb_generic_nack

    • total_received_rtcp_rtpfb_tmmbn

    • total_received_rtcp_rtpfb_tmmbr

    • total_received_rtcp_rtpfb_transport_wide

    • total_received_rtcp_sdes

    • total_received_rtcp_sr

    • total_received_rtcp_unknown

    • total_received_rtcp_xr

    • total_received_rtp

    • total_received_rtp_byte_size

    • total_received_rtp_red

    • total_received_rtp_red_rtx

    • total_received_rtp_red_ulpfec

    • total_received_rtp_rtx

    • total_sent

    • total_sent_byte_size

    • total_sent_rtcp

    • total_sent_rtcp_byte

    • total_sent_rtcp_byte_size

    • total_sent_rtcp_psfb_afb

    • total_sent_rtcp_psfb_fir

    • total_sent_rtcp_psfb_pli

    • total_sent_rtcp_rr

    • total_sent_rtcp_rtpfb_generic_nack

    • total_sent_rtcp_rtpfb_tmmbn

    • total_sent_rtcp_rtpfb_tmmbr

    • total_sent_rtcp_rtpfb_transport_wide

    • total_sent_rtcp_sdes

    • total_sent_rtcp_sr

    • total_sent_rtcp_unknown

    • total_sent_rtcp_xr

    • total_sent_rtp

    • total_sent_rtp_byte_size

  • turn

    • total_received_turn_unknown_stun

    • total_received_turn_invalid_stun

    • total_received_unknown_channel_number

    • total_received_expired_channel_number

    • total_received_allocate_request

    • total_received_binding_request

    • total_received_channel_bind_request

    • total_received_channel_data

    • total_received_create_permission_request

    • total_received_refresh_request

    • total_received_send_indication

    • total_received_turn_binding_error

    • total_received_turn_binding_request

    • total_received_turn_binding_success

    • total_received_turn_unknown

    • total_sent_allocate_error

    • total_sent_allocate_success

    • total_sent_binding_error

    • total_sent_binding_success

    • total_sent_channel_bind_error

    • total_sent_channel_bind_success

    • total_sent_channel_data

    • total_sent_create_permission_error

    • total_sent_create_permission_success

    • total_sent_data_indication

    • total_sent_refresh_error

    • total_sent_refresh_success

    • total_sent_turn_binding_error

    • total_sent_turn_binding_request

    • total_sent_turn_binding_success

    • total_sent_turn_unknown

指定したクライアントの統計情報を取得する

サービス

Sora

バージョン

20170529

オペレーション

GetStatsClient

x-sora-target

Sora_20170529.GetStatsClient

キー

channel_id

string

client_id

string

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20170529.GetStatsClient \
    channel_id=sora \
    client_id=KD9N57E2RN5T1BDEA7S7SH038M \
    -vvv

POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 65
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20170529.GetStatsClient

{
    "channel_id": "sora",
    "client_id": "KD9N57E2RN5T1BDEA7S7SH038M"
}

HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 2784
content-type: application/json
date: Tue, 09 Jun 2020 05:38:14 GMT
server: Cowboy

[
    {
        "channel_id": "sora",
        "client_id": "KD9N57E2RN5T1BDEA7S7SH038M",
        "connection_id": "KD9N57E2RN5T1BDEA7S7SH038M",
        "dtls": {
            "total_received_dtls": 2,
            "total_sent_dtls": 2
        },
        "network_status": {
            "unstable_level": 0
        },
        "packet_loss_simulator": {
            "total_dropped_received_rtp": 0,
            "total_dropped_sent_rtp": 0
        },
        "rtp": {
            "total_generic_nack_cache_hit": 0,
            "total_generic_nack_cache_miss": 0,
            "total_pli_trigger": 0,
            "total_received": 5361,
            "total_received_byte_size": 4232942,
            "total_received_rtcp": 98,
            "total_received_rtcp_bye": 0,
            "total_received_rtcp_byte_size": 6572,
            "total_received_rtcp_psfb_afb": 0,
            "total_received_rtcp_psfb_fir": 0,
            "total_received_rtcp_psfb_pli": 0,
            "total_received_rtcp_rr": 6,
            "total_received_rtcp_rtpfb_generic_nack": 0,
            "total_received_rtcp_rtpfb_tmmbn": 0,
            "total_received_rtcp_rtpfb_tmmbr": 0,
            "total_received_rtcp_rtpfb_transport_wide": 0,
            "total_received_rtcp_sdes": 92,
            "total_received_rtcp_sr": 92,
            "total_received_rtcp_unknown": 0,
            "total_received_rtcp_xr": 0,
            "total_received_rtp": 5263,
            "total_received_rtp_byte_size": 4226370,
            "total_received_rtp_red": 0,
            "total_received_rtp_red_rtx": 0,
            "total_received_rtp_red_ulpfec": 0,
            "total_received_rtp_rtx": 3,
            "total_sent": 44,
            "total_sent_byte_size": 2936,
            "total_sent_rtcp": 44,
            "total_sent_rtcp_bye": 0,
            "total_sent_rtcp_byte_size": 2936,
            "total_sent_rtcp_psfb_afb": 38,
            "total_sent_rtcp_psfb_fir": 0,
            "total_sent_rtcp_psfb_pli": 0,
            "total_sent_rtcp_rr": 44,
            "total_sent_rtcp_rtpfb_generic_nack": 0,
            "total_sent_rtcp_rtpfb_tmmbn": 0,
            "total_sent_rtcp_rtpfb_tmmbr": 0,
            "total_sent_rtcp_rtpfb_transport_wide": 0,
            "total_sent_rtcp_sdes": 0,
            "total_sent_rtcp_sr": 0,
            "total_sent_rtcp_unknown": 0,
            "total_sent_rtcp_xr": 0,
            "total_sent_rtp": 0,
            "total_sent_rtp_byte_size": 0
        },
        "timestamp": "2020-06-09T05:38:15Z",
        "turn": {
            "total_received_allocate_request": 14,
            "total_received_binding_request": 0,
            "total_received_channel_bind_request": 1,
            "total_received_channel_data": 5392,
            "total_received_create_permission_request": 2,
            "total_received_expired_channel_number": 0,
            "total_received_refresh_request": 0,
            "total_received_send_indication": 8,
            "total_received_turn_binding_error": 0,
            "total_received_turn_binding_request": 18,
            "total_received_turn_binding_success": 16,
            "total_received_turn_invalid_stun": 0,
            "total_received_turn_unknown": 0,
            "total_received_turn_unknown_stun": 0,
            "total_received_unknown_channel_number": 0,
            "total_sent_allocate_error": 10,
            "total_sent_allocate_success": 2,
            "total_sent_binding_error": 0,
            "total_sent_binding_success": 0,
            "total_sent_channel_bind_error": 0,
            "total_sent_channel_bind_success": 1,
            "total_sent_channel_data": 75,
            "total_sent_create_permission_error": 0,
            "total_sent_create_permission_success": 2,
            "total_sent_data_indication": 5,
            "total_sent_refresh_error": 0,
            "total_sent_refresh_success": 0,
            "total_sent_turn_binding_error": 0,
            "total_sent_turn_binding_request": 16,
            "total_sent_turn_binding_success": 3,
            "total_sent_turn_unknown": 0
        }
    }
]

指定した接続の統計情報を取得する

サービス

Sora

バージョン

20170529

オペレーション

GetStatsConnection

x-sora-target

Sora_20170529.GetStatsConnection

キー

channel_id

string

connection_id

string

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20170529.GetStatsConnection \
    channel_id=sora \
    connection_id=KD9N57E2RN5T1BDEA7S7SH038M -vvv

POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 69
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20170529.GetStatsConnection

{
    "channel_id": "sora",
    "connection_id": "KD9N57E2RN5T1BDEA7S7SH038M"
}

HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 2800
content-type: application/json
date: Tue, 09 Jun 2020 05:39:52 GMT
server: Cowboy

{
    "channel_id": "sora",
    "client_id": "KD9N57E2RN5T1BDEA7S7SH038M",
    "connection_id": "KD9N57E2RN5T1BDEA7S7SH038M",
    "dtls": {
        "total_received_dtls": 2,
        "total_sent_dtls": 2
    },
    "network_status": {
        "unstable_level": 0
    },
    "packet_loss_simulator": {
        "total_dropped_received_rtp": 0,
        "total_dropped_sent_rtp": 0
    },
    "rtp": {
        "total_generic_nack_cache_hit": 0,
        "total_generic_nack_cache_miss": 0,
        "total_pli_trigger": 0,
        "total_received": 22383,
        "total_received_byte_size": 17661215,
        "total_received_rtcp": 418,
        "total_received_rtcp_bye": 0,
        "total_received_rtcp_byte_size": 28060,
        "total_received_rtcp_psfb_afb": 0,
        "total_received_rtcp_psfb_fir": 0,
        "total_received_rtcp_psfb_pli": 0,
        "total_received_rtcp_rr": 25,
        "total_received_rtcp_rtpfb_generic_nack": 0,
        "total_received_rtcp_rtpfb_tmmbn": 0,
        "total_received_rtcp_rtpfb_tmmbr": 0,
        "total_received_rtcp_rtpfb_transport_wide": 0,
        "total_received_rtcp_sdes": 393,
        "total_received_rtcp_sr": 393,
        "total_received_rtcp_unknown": 0,
        "total_received_rtcp_xr": 0,
        "total_received_rtp": 21965,
        "total_received_rtp_byte_size": 17633155,
        "total_received_rtp_red": 0,
        "total_received_rtp_red_rtx": 0,
        "total_received_rtp_red_ulpfec": 0,
        "total_received_rtp_rtx": 3,
        "total_sent": 185,
        "total_sent_byte_size": 12350,
        "total_sent_rtcp": 185,
        "total_sent_rtcp_bye": 0,
        "total_sent_rtcp_byte_size": 12350,
        "total_sent_rtcp_psfb_afb": 160,
        "total_sent_rtcp_psfb_fir": 0,
        "total_sent_rtcp_psfb_pli": 0,
        "total_sent_rtcp_rr": 185,
        "total_sent_rtcp_rtpfb_generic_nack": 0,
        "total_sent_rtcp_rtpfb_tmmbn": 0,
        "total_sent_rtcp_rtpfb_tmmbr": 0,
        "total_sent_rtcp_rtpfb_transport_wide": 0,
        "total_sent_rtcp_sdes": 0,
        "total_sent_rtcp_sr": 0,
        "total_sent_rtcp_unknown": 0,
        "total_sent_rtcp_xr": 0,
        "total_sent_rtp": 0,
        "total_sent_rtp_byte_size": 0
    },
    "timestamp": "2020-06-09T05:39:52Z",
    "turn": {
        "total_received_allocate_request": 15,
        "total_received_binding_request": 0,
        "total_received_channel_bind_request": 1,
        "total_received_channel_data": 22491,
        "total_received_create_permission_request": 2,
        "total_received_expired_channel_number": 0,
        "total_received_refresh_request": 2,
        "total_received_send_indication": 12,
        "total_received_turn_binding_error": 0,
        "total_received_turn_binding_request": 61,
        "total_received_turn_binding_success": 54,
        "total_received_turn_invalid_stun": 0,
        "total_received_turn_unknown": 0,
        "total_received_turn_unknown_stun": 0,
        "total_received_unknown_channel_number": 0,
        "total_sent_allocate_error": 11,
        "total_sent_allocate_success": 2,
        "total_sent_binding_error": 0,
        "total_sent_binding_success": 0,
        "total_sent_channel_bind_error": 0,
        "total_sent_channel_bind_success": 1,
        "total_sent_channel_data": 293,
        "total_sent_create_permission_error": 0,
        "total_sent_create_permission_success": 2,
        "total_sent_data_indication": 9,
        "total_sent_refresh_error": 0,
        "total_sent_refresh_success": 2,
        "total_sent_turn_binding_error": 0,
        "total_sent_turn_binding_request": 54,
        "total_sent_turn_binding_success": 7,
        "total_sent_turn_unknown": 0
    }
}

すべての接続の統計情報を取得する

サービス

Sora

バージョン

20171101

オペレーション

GetStatsAllConnections

x-sora-target

Sora_20171101.GetStatsAllConnections

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20171101.GetStatsAllConnections -vvv

POST / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 0
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20171101.GetStatsAllConnections



HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 5592
content-type: application/json
date: Tue, 09 Jun 2020 05:43:53 GMT
server: Cowboy

[
    {
        "channel_id": "sora",
        "client_id": "WZXPMM6K8113K83VB8G9XZDTFW",
        "connection_id": "WZXPMM6K8113K83VB8G9XZDTFW",
        "dtls": {
            "total_received_dtls": 2,
            "total_sent_dtls": 2
        },
        "network_status": {
            "unstable_level": 0
        },
        "packet_loss_simulator": {
            "total_dropped_received_rtp": 0,
            "total_dropped_sent_rtp": 0
        },
        "rtp": {
            "total_generic_nack_cache_hit": 0,
            "total_generic_nack_cache_miss": 0,
            "total_pli_trigger": 0,
            "total_received": 13730,
            "total_received_byte_size": 10747862,
            "total_received_rtcp": 259,
            "total_received_rtcp_bye": 0,
            "total_received_rtcp_byte_size": 17338,
            "total_received_rtcp_psfb_afb": 8,
            "total_received_rtcp_psfb_fir": 0,
            "total_received_rtcp_psfb_pli": 0,
            "total_received_rtcp_rr": 24,
            "total_received_rtcp_rtpfb_generic_nack": 0,
            "total_received_rtcp_rtpfb_tmmbn": 0,
            "total_received_rtcp_rtpfb_tmmbr": 0,
            "total_received_rtcp_rtpfb_transport_wide": 0,
            "total_received_rtcp_sdes": 235,
            "total_received_rtcp_sr": 235,
            "total_received_rtcp_unknown": 0,
            "total_received_rtcp_xr": 0,
            "total_received_rtp": 13471,
            "total_received_rtp_byte_size": 10730524,
            "total_received_rtp_red": 0,
            "total_received_rtp_red_rtx": 0,
            "total_received_rtp_red_ulpfec": 0,
            "total_received_rtp_rtx": 0,
            "total_sent": 728,
            "total_sent_byte_size": 373228,
            "total_sent_rtcp": 124,
            "total_sent_rtcp_bye": 0,
            "total_sent_rtcp_byte_size": 8336,
            "total_sent_rtcp_psfb_afb": 100,
            "total_sent_rtcp_psfb_fir": 0,
            "total_sent_rtcp_psfb_pli": 1,
            "total_sent_rtcp_rr": 116,
            "total_sent_rtcp_rtpfb_generic_nack": 0,
            "total_sent_rtcp_rtpfb_tmmbn": 0,
            "total_sent_rtcp_rtpfb_tmmbr": 0,
            "total_sent_rtcp_rtpfb_transport_wide": 0,
            "total_sent_rtcp_sdes": 7,
            "total_sent_rtcp_sr": 7,
            "total_sent_rtcp_unknown": 0,
            "total_sent_rtcp_xr": 0,
            "total_sent_rtp": 604,
            "total_sent_rtp_byte_size": 364892
        },
        "timestamp": "2020-06-09T05:43:54Z",
        "turn": {
            "total_received_allocate_request": 15,
            "total_received_binding_request": 0,
            "total_received_channel_bind_request": 1,
            "total_received_channel_data": 13799,
            "total_received_create_permission_request": 2,
            "total_received_expired_channel_number": 0,
            "total_received_refresh_request": 2,
            "total_received_send_indication": 10,
            "total_received_turn_binding_error": 0,
            "total_received_turn_binding_request": 40,
            "total_received_turn_binding_success": 37,
            "total_received_turn_invalid_stun": 0,
            "total_received_turn_unknown": 0,
            "total_received_turn_unknown_stun": 0,
            "total_received_unknown_channel_number": 0,
            "total_sent_allocate_error": 11,
            "total_sent_allocate_success": 2,
            "total_sent_binding_error": 0,
            "total_sent_binding_success": 0,
            "total_sent_channel_bind_error": 0,
            "total_sent_channel_bind_success": 1,
            "total_sent_channel_data": 799,
            "total_sent_create_permission_error": 0,
            "total_sent_create_permission_success": 2,
            "total_sent_data_indication": 8,
            "total_sent_refresh_error": 0,
            "total_sent_refresh_success": 2,
            "total_sent_turn_binding_error": 0,
            "total_sent_turn_binding_request": 37,
            "total_sent_turn_binding_success": 5,
            "total_sent_turn_unknown": 0
        }
    },
    {
        "channel_id": "sora",
        "client_id": "3G6WGDG68H66QEYSKD5ZM3KRSR",
        "connection_id": "3G6WGDG68H66QEYSKD5ZM3KRSR",
        "dtls": {
            "total_received_dtls": 2,
            "total_sent_dtls": 2
        },
        "network_status": {
            "unstable_level": 0
        },
        "packet_loss_simulator": {
            "total_dropped_received_rtp": 0,
            "total_dropped_sent_rtp": 0
        },
        "rtp": {
            "total_generic_nack_cache_hit": 0,
            "total_generic_nack_cache_miss": 0,
            "total_pli_trigger": 0,
            "total_received": 621,
            "total_received_byte_size": 368336,
            "total_received_rtcp": 17,
            "total_received_rtcp_bye": 0,
            "total_received_rtcp_byte_size": 1022,
            "total_received_rtcp_psfb_afb": 1,
            "total_received_rtcp_psfb_fir": 0,
            "total_received_rtcp_psfb_pli": 0,
            "total_received_rtcp_rr": 7,
            "total_received_rtcp_rtpfb_generic_nack": 0,
            "total_received_rtcp_rtpfb_tmmbn": 0,
            "total_received_rtcp_rtpfb_tmmbr": 0,
            "total_received_rtcp_rtpfb_transport_wide": 0,
            "total_received_rtcp_sdes": 10,
            "total_received_rtcp_sr": 10,
            "total_received_rtcp_unknown": 0,
            "total_received_rtcp_xr": 0,
            "total_received_rtp": 604,
            "total_received_rtp_byte_size": 367314,
            "total_received_rtp_red": 0,
            "total_received_rtp_red_rtx": 0,
            "total_received_rtp_red_ulpfec": 0,
            "total_received_rtp_rtx": 3,
            "total_sent": 624,
            "total_sent_byte_size": 372536,
            "total_sent_rtcp": 14,
            "total_sent_rtcp_bye": 0,
            "total_sent_rtcp_byte_size": 1040,
            "total_sent_rtcp_psfb_afb": 6,
            "total_sent_rtcp_psfb_fir": 0,
            "total_sent_rtcp_psfb_pli": 0,
            "total_sent_rtcp_rr": 7,
            "total_sent_rtcp_rtpfb_generic_nack": 0,
            "total_sent_rtcp_rtpfb_tmmbn": 0,
            "total_sent_rtcp_rtpfb_tmmbr": 0,
            "total_sent_rtcp_rtpfb_transport_wide": 0,
            "total_sent_rtcp_sdes": 7,
            "total_sent_rtcp_sr": 7,
            "total_sent_rtcp_unknown": 0,
            "total_sent_rtcp_xr": 0,
            "total_sent_rtp": 610,
            "total_sent_rtp_byte_size": 371496
        },
        "timestamp": "2020-06-09T05:43:54Z",
        "turn": {
            "total_received_allocate_request": 11,
            "total_received_binding_request": 0,
            "total_received_channel_bind_request": 1,
            "total_received_channel_data": 629,
            "total_received_create_permission_request": 2,
            "total_received_expired_channel_number": 0,
            "total_received_refresh_request": 0,
            "total_received_send_indication": 7,
            "total_received_turn_binding_error": 0,
            "total_received_turn_binding_request": 7,
            "total_received_turn_binding_success": 6,
            "total_received_turn_invalid_stun": 0,
            "total_received_turn_unknown": 0,
            "total_received_turn_unknown_stun": 0,
            "total_received_unknown_channel_number": 0,
            "total_sent_allocate_error": 7,
            "total_sent_allocate_success": 2,
            "total_sent_binding_error": 0,
            "total_sent_binding_success": 0,
            "total_sent_channel_bind_error": 0,
            "total_sent_channel_bind_success": 1,
            "total_sent_channel_data": 634,
            "total_sent_create_permission_error": 0,
            "total_sent_create_permission_success": 2,
            "total_sent_data_indication": 5,
            "total_sent_refresh_error": 0,
            "total_sent_refresh_success": 0,
            "total_sent_turn_binding_error": 0,
            "total_sent_turn_binding_request": 6,
            "total_sent_turn_binding_success": 2,
            "total_sent_turn_unknown": 0
        }
    }
]

統計情報を取得する

警告

この API は実験的機能のため正式版では仕様が変更される可能性があります

サービス

Sora

バージョン

20171010

オペレーション

GetStatsReport

x-sora-target

Sora_20171010.GetStatsReport

Sora の起動している間の統計情報を取得することができます。この統計情報は Sora を止めたり再起動したりすることでクリアされますので注意してください。

レスポンス項目

  • total_connection_created

    • 現在までの接続が作成された数

  • total_connection_updated

    • 現在までの接続が更新された数

  • total_connection_destroyed

    • 現在までの接続が破棄された数

  • total_successful_connections

    • 現在までの接続が成功した数

  • total_ongoing_connections

    • 現在接続している数

  • total_failed_connections

    • 現在までの接続が失敗した数

  • total_duration_sec

    • 現在までの合計接続時間 (秒)

  • total_turn_udp_connections

    • 現在までの TURN-UDP での接続数

  • total_turn_tcp_connections

    • 現在までの TURN-TCP または TURN-TLS での接続数

  • average_duration_sec

    • 平均接続時間 (秒)

  • average_setup_time_msec

    • 平均セットアップ時間 (ミリ秒)

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20171010.GetStatsReport \
    -vvv

POST / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 0
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.9
x-sora-target: Sora_20171010.GetStatsReport



HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 172
content-type: application/json
date: Tue, 10 Oct 2017 10:23:22 GMT
server: Cowboy

{
    "average_duration_sec": 127,
    "average_setup_time_msec": 358,
    "total_connection_created": 100,
    "total_connection_destroyed": 100,
    "total_connection_updated": 174,
    "total_duration_sec": 12769,
    "total_failed_connections": 80,
    "total_ongoing_connections": 0,
    "total_successful_connections": 100,
    "total_turn_tcp_connections": 2,
    "total_turn_udp_connections": 98
}

ライセンス API

現在利用しているライセンス情報を取得する

サービス

Sora

バージョン

20171218

オペレーション

GetLicense

x-sora-target

Sora_20171218.GetLicense

重要

signature は表示されません

$ http POST 127.0.0.1:3000/
    x-sora-target:Sora_20171218.GetLicense -vvv
POST / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 0
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.9
x-sora-target: Sora_20171218.GetLicense



HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 174
content-type: application/json
date: Fri, 05 Jan 2018 06:41:35 GMT
server: Cowboy

{
    "max_connections": 100,
    "product_name": "Sora",
    "serial_code": "123ABC-SRA-E001-20180101-100",
    "type": "Experimental"
}

ライセンスを更新する

サービス

Sora

バージョン

20171218

オペレーション

UpdateLicense

x-sora-target

Sora_20171218.UpdateLicense

sora.conflicense_file に設定したファイルを新規のライセンスとして読み込みます。 ライセンスが壊れていたり、見つからない場合はエラーになります

重要

signature は表示されません

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20171218.UpdateLicense -vvv

POST / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 0
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.9
x-sora-target: Sora_20171218.UpdateLicense



HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 379
content-type: application/json
date: Fri, 05 Jan 2018 06:44:47 GMT
server: Cowboy

{
    "new_license": {
        "max_connections": 100,
        "product_name": "Sora",
        "serial_code": "123ABC-SRA-E001-20180101-100",
        "type": "Experimental"
    },
    "old_license": {
        "max_connections": 100,
        "product_name": "Sora",
        "serial_code": "123ABC-SRA-E002-20190101-100",
        "type": "Experimental"
    }
}