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, */*;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.4.0
x-sora-target: Sora_20151104.DisconnectChannel

{
    "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: 21
content-type: application/json
date: Wed, 07 Jul 2021 05:44:01 GMT
server: Cowboy

{
    "channel_id": "sora"
}

指定したクライアント 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=E2APPNQ9P97Q32V2ABW546SWW8 \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 65
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.4.0
x-sora-target: Sora_20151104.DisconnectClient

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


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: 62
content-type: application/json
date: Wed, 07 Jul 2021 05:45:09 GMT
server: Cowboy

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

指定したコネクション 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=T34CDBMRJS1B5BVPF17RTBQA3C \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 69
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.4.0
x-sora-target: Sora_20151104.DisconnectConnection

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


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: 66
content-type: application/json
date: Wed, 07 Jul 2021 05:59:41 GMT
server: Cowboy

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

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

サービス

Sora

バージョン

20201120

オペレーション

DisconnectChannelByRole

x-sora-target

Sora_20201120.DisconnectChannelByRole

キー

channel_id

string

role

string (sendrecv | sendonly | recvonly)

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

    {
        "channel_id": "sora",
        "role": "sendrecv"
    }

    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: 39
    content-type: application/json
    date: Thu, 03 Dec 2020 06:15:25 GMT
    server: Cowboy

    {
        "channel_id": "sora",
        "role": "sendrecv"
    }

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

サービス

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 や DataChannel を活用できる API です。 この機能を使うことでアプリ側でプッシュの仕組みを用意する必要がなくなります。

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

サービス

Sora

バージョン

20160711

オペレーション

PushChannel

x-sora-target

Sora_20160711.PushChannel

キー

channel_id

string

data

object

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

$ 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",
    "connection_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

バージョン

20201120

オペレーション

PushChannelByRole

x-sora-target

Sora_20201120.PushChannelByRole

キー

channel_id

string

role

string (sendrecv | sendonly | recvonly)

data

object

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201120.PushChannelByRole \
    channel_id=sora \
    role=sendrecv \
    data:="{\"spam\": \"egg\"}" \
    -vvv
    POST / HTTP/1.1
    Accept: application/json, */*;q=0.5
    Accept-Encoding: gzip, deflate
    Connection: keep-alive
    Content-Length: 67
    Content-Type: application/json
    Host: 127.0.0.1:3000
    User-Agent: HTTPie/2.2.0
    x-sora-target: Sora_20201120.PushChannelByRole

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

    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: 37
    content-type: application/json
    date: Thu, 03 Dec 2020 06:16:16 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

この API は非同期です。200 が返ってきた場合でも録画ファイルや録画メタデータファイルが生成されていることを保証しません。 イベントウェブフックの archive.available または recording.report の通知を利用してください。

キー

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

  • simulcast

    • r0

      • rtp

        • total_received_rtp

        • total_received_rtp_byte_size

        • total_received_rtp_padding

        • total_received_rtp_padding_size

        • total_received_rtp_red

        • total_received_rtp_red_rtx

        • total_received_rtp_red_ulpfec

        • total_received_rtp_rtx

      • rtp_hdr_ext

        • total_received_rtp_hdr_ext_abs_send_time

        • total_received_rtp_hdr_ext_audio_level

        • total_received_rtp_hdr_ext_av1_rtp_sepc

        • total_received_rtp_hdr_ext_color_space

        • total_received_rtp_hdr_ext_inband_cn

        • total_received_rtp_hdr_ext_playout_delay

        • total_received_rtp_hdr_ext_sdes_mid

        • total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id

        • total_received_rtp_hdr_ext_sdes_rtp_stream_id

        • total_received_rtp_hdr_ext_toffset

        • total_received_rtp_hdr_ext_transport_wide_cc

        • total_received_rtp_hdr_ext_unknown

        • total_received_rtp_hdr_ext_video_content_type

        • total_received_rtp_hdr_ext_video_orientation

        • total_received_rtp_hdr_ext_video_timeing

    • r1

      • r0 と同様

    • r2

      • r0 と同様

  • spotlight

    • total_spotlight_focus_failed

    • total_spotlight_unfocus_audio_no_room

    • total_spotlight_unfocus_audio_out_packet

    • total_spotlight_unfocus_audio_publish

  • dtls

    • total_received_dtls

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

    • total_sent_dtls

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

  • network_status

    • unstable_level

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

  • signaling

    • total_received_signaling_pong

    • total_sent_signaling_ping

  • packet_loss_simulator

    • total_dropped_received_rtp

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

    • total_dropped_sent_rtp

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

    • total_dropped_received_data_channel

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

    • total_dropped_sent_data_channel

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

  • rtp

    • total_generic_nack_cache_hit

      • 再送要求に答えた総数

    • total_generic_nack_cache_miss

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

    • total_pli_trigger

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

    • total_received

    • total_received_byte_size

    • 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_rtp

    • total_sent_rtp_byte_size

  • rtp_hdr_ext

    • total_received_rtp_hdr_ext_abs_send_time

    • total_received_rtp_hdr_ext_audio_level

    • total_received_rtp_hdr_ext_av1_rtp_sepc

    • total_received_rtp_hdr_ext_color_space

    • total_received_rtp_hdr_ext_inband_cn

    • total_received_rtp_hdr_ext_playout_delay

    • total_received_rtp_hdr_ext_sdes_mid

    • total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id

    • total_received_rtp_hdr_ext_sdes_rtp_stream_id

    • total_received_rtp_hdr_ext_toffset

    • total_received_rtp_hdr_ext_transport_wide_cc

    • total_received_rtp_hdr_ext_unknown

    • total_received_rtp_hdr_ext_video_content_type

    • total_received_rtp_hdr_ext_video_orientation

    • total_received_rtp_hdr_ext_video_timeing

    • total_sent_rtp_hdr_ext_abs_send_time

    • total_sent_rtp_hdr_ext_audio_level

    • total_sent_rtp_hdr_ext_av1_rtp_sepc

    • total_sent_rtp_hdr_ext_color_space

    • total_sent_rtp_hdr_ext_inband_cn

    • total_sent_rtp_hdr_ext_playout_delay

    • total_sent_rtp_hdr_ext_sdes_mid

    • total_sent_rtp_hdr_ext_sdes_repaired_rtp_stream_id

    • total_sent_rtp_hdr_ext_sdes_rtp_stream_id

    • total_sent_rtp_hdr_ext_toffset

    • total_sent_rtp_hdr_ext_transport_wide_cc

    • total_sent_rtp_hdr_ext_unknown

    • total_sent_rtp_hdr_ext_video_content_type

    • total_sent_rtp_hdr_ext_video_orientation

    • total_sent_rtp_hdr_ext_video_timeing

  • rtcp

    • 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_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

  • 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

  • data_channel

    • signaling

      • total_received_data_channel_message

      • total_received_data_channel_message_byte_size

      • total_sent_data_channel_message

      • total_sent_data_channel_message_byte_size

    • notify

      • signaling と同様

    • push

      • signaling と同様

    • stats

      • signaling と同様

    • e2ee

      • signaling と同様

  • sctp

    • total_received_invalid_sctp

    • total_received_sctp

    • total_received_sctp_byte_size

    • total_received_sctp_chunk_abort

    • total_received_sctp_chunk_asconf

    • total_received_sctp_chunk_asconf_ack

    • total_received_sctp_chunk_auth

    • total_received_sctp_chunk_cookie_ack

    • total_received_sctp_chunk_cookie_echo

    • total_received_sctp_chunk_cwr

    • total_received_sctp_chunk_data

    • total_received_sctp_chunk_ecne

    • total_received_sctp_chunk_error

    • total_received_sctp_chunk_forward_tsn

    • total_received_sctp_chunk_heartbeat

    • total_received_sctp_chunk_heartbeat_ack

    • total_received_sctp_chunk_i_data

    • total_received_sctp_chunk_i_forward_tsn

    • total_received_sctp_chunk_init

    • total_received_sctp_chunk_init_ack

    • total_received_sctp_chunk_pad

    • total_received_sctp_chunk_reconfig

    • total_received_sctp_chunk_sack

    • total_received_sctp_chunk_shutdown

    • total_received_sctp_chunk_shutdown_ack

    • total_received_sctp_chunk_shutdown_complete

    • total_received_sctp_chunk_unknown

    • total_received_unknown_sctp

    • total_sent_sctp

    • total_sent_sctp_byte_size

    • total_sent_sctp_chunk_abort

    • total_sent_sctp_chunk_asconf

    • total_sent_sctp_chunk_asconf_ack

    • total_sent_sctp_chunk_auth

    • total_sent_sctp_chunk_cookie_ack

    • total_sent_sctp_chunk_cookie_echo

    • total_sent_sctp_chunk_cwr

    • total_sent_sctp_chunk_data

    • total_sent_sctp_chunk_ecne

    • total_sent_sctp_chunk_error

    • total_sent_sctp_chunk_forward_tsn

    • total_sent_sctp_chunk_heartbeat

    • total_sent_sctp_chunk_heartbeat_ack

    • total_sent_sctp_chunk_i_data

    • total_sent_sctp_chunk_i_forward_tsn

    • total_sent_sctp_chunk_init

    • total_sent_sctp_chunk_init_ack

    • total_sent_sctp_chunk_pad

    • total_sent_sctp_chunk_reconfig

    • total_sent_sctp_chunk_sack

    • total_sent_sctp_chunk_shutdown

    • total_sent_sctp_chunk_shutdown_ack

    • total_sent_sctp_chunk_shutdown_complete

    • total_sent_sctp_chunk_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=KDBN2YD1A919V5BA2JX6TG2RP8 \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 65
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.4.0
x-sora-target: Sora_20170529.GetStatsClient

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


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: 11292
content-type: application/json
date: Mon, 14 Jun 2021 01:28:39 GMT
server: Cowboy

[
    {
        "channel_id": "sora",
        "client_id": "KDBN2YD1A919V5BA2JX6TG2RP8",
        "connection_id": "KDBN2YD1A919V5BA2JX6TG2RP8",
        "data_channel": {
            "e2ee": {
                "total_received_data_channel_message": 1,
                "total_received_data_channel_message_byte_size": 1,
                "total_sent_data_channel_message": 1,
                "total_sent_data_channel_message_byte_size": 16
            },
            "notify": {
                "total_received_data_channel_message": 1,
                "total_received_data_channel_message_byte_size": 1,
                "total_sent_data_channel_message": 2,
                "total_sent_data_channel_message_byte_size": 82
            },
            "push": {
                "total_received_data_channel_message": 1,
                "total_received_data_channel_message_byte_size": 1,
                "total_sent_data_channel_message": 1,
                "total_sent_data_channel_message_byte_size": 16
            },
            "signaling": {
                "total_received_data_channel_message": 1,
                "total_received_data_channel_message_byte_size": 1,
                "total_sent_data_channel_message": 1,
                "total_sent_data_channel_message_byte_size": 21
            },
            "stats": {
                "total_received_data_channel_message": 3,
                "total_received_data_channel_message_byte_size": 5638,
                "total_sent_data_channel_message": 3,
                "total_sent_data_channel_message_byte_size": 73
            }
        },
        "dtls": {
            "total_received_dtls": 20,
            "total_sent_dtls": 23
        },
        "network_status": {
            "unstable_level": 0
        },
        "packet_loss_simulator": {
            "total_dropped_received_data_channel": 0,
            "total_dropped_received_rtp": 0,
            "total_dropped_sent_data_channel": 0,
            "total_dropped_sent_rtp": 0
        },
        "rtcp": {
            "total_generic_nack_cache_hit": 0,
            "total_generic_nack_cache_miss": 0,
            "total_pli_trigger": 0,
            "total_received_rtcp": 34,
            "total_received_rtcp_bye": 0,
            "total_received_rtcp_byte_size": 2380,
            "total_received_rtcp_psfb_afb": 0,
            "total_received_rtcp_psfb_fir": 0,
            "total_received_rtcp_psfb_pli": 0,
            "total_received_rtcp_rr": 0,
            "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": 34,
            "total_received_rtcp_sr": 34,
            "total_received_rtcp_unknown": 0,
            "total_received_rtcp_xr": 0,
            "total_sent_rtcp": 19,
            "total_sent_rtcp_bye": 0,
            "total_sent_rtcp_byte_size": 1282,
            "total_sent_rtcp_psfb_afb": 17,
            "total_sent_rtcp_psfb_fir": 0,
            "total_sent_rtcp_psfb_pli": 0,
            "total_sent_rtcp_rr": 19,
            "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
        },
        "rtp": {
            "total_generic_nack_cache_hit": 0,
            "total_generic_nack_cache_miss": 0,
            "total_pli_trigger": 0,
            "total_received": 2186,
            "total_received_byte_size": 1634328,
            "total_received_rtcp": 34,
            "total_received_rtcp_bye": 0,
            "total_received_rtcp_byte_size": 2380,
            "total_received_rtcp_psfb_afb": 0,
            "total_received_rtcp_psfb_fir": 0,
            "total_received_rtcp_psfb_pli": 0,
            "total_received_rtcp_rr": 0,
            "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": 34,
            "total_received_rtcp_sr": 34,
            "total_received_rtcp_unknown": 0,
            "total_received_rtcp_xr": 0,
            "total_received_rtp": 2152,
            "total_received_rtp_byte_size": 1631948,
            "total_received_rtp_padding": 0,
            "total_received_rtp_padding_size": 0,
            "total_received_rtp_red": 0,
            "total_received_rtp_red_rtx": 0,
            "total_received_rtp_red_ulpfec": 0,
            "total_received_rtp_rtx": 18,
            "total_sent": 19,
            "total_sent_byte_size": 1282,
            "total_sent_rtcp": 19,
            "total_sent_rtcp_bye": 0,
            "total_sent_rtcp_byte_size": 1282,
            "total_sent_rtcp_psfb_afb": 17,
            "total_sent_rtcp_psfb_fir": 0,
            "total_sent_rtcp_psfb_pli": 0,
            "total_sent_rtcp_rr": 19,
            "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
        },
        "rtp_hdr_ext": {
            "total_received_rtp_hdr_ext_abs_send_time": 2152,
            "total_received_rtp_hdr_ext_audio_level": 719,
            "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
            "total_received_rtp_hdr_ext_color_space": 0,
            "total_received_rtp_hdr_ext_inband_cn": 0,
            "total_received_rtp_hdr_ext_playout_delay": 0,
            "total_received_rtp_hdr_ext_sdes_mid": 0,
            "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
            "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
            "total_received_rtp_hdr_ext_toffset": 0,
            "total_received_rtp_hdr_ext_transport_wide_cc": 0,
            "total_received_rtp_hdr_ext_unknown": 0,
            "total_received_rtp_hdr_ext_video_content_type": 0,
            "total_received_rtp_hdr_ext_video_orientation": 0,
            "total_received_rtp_hdr_ext_video_timeing": 0,
            "total_sent_rtp_hdr_ext_abs_send_time": 0,
            "total_sent_rtp_hdr_ext_audio_level": 0,
            "total_sent_rtp_hdr_ext_av1_rtp_sepc": 0,
            "total_sent_rtp_hdr_ext_color_space": 0,
            "total_sent_rtp_hdr_ext_inband_cn": 0,
            "total_sent_rtp_hdr_ext_playout_delay": 0,
            "total_sent_rtp_hdr_ext_sdes_mid": 0,
            "total_sent_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
            "total_sent_rtp_hdr_ext_sdes_rtp_stream_id": 0,
            "total_sent_rtp_hdr_ext_toffset": 0,
            "total_sent_rtp_hdr_ext_transport_wide_cc": 0,
            "total_sent_rtp_hdr_ext_unknown": 0,
            "total_sent_rtp_hdr_ext_video_content_type": 0,
            "total_sent_rtp_hdr_ext_video_orientation": 0,
            "total_sent_rtp_hdr_ext_video_timeing": 0
        },
        "sctp": {
            "total_received_invalid_sctp": 0,
            "total_received_sctp": 18,
            "total_received_sctp_byte_size": 6192,
            "total_received_sctp_chunk_abort": 0,
            "total_received_sctp_chunk_asconf": 0,
            "total_received_sctp_chunk_asconf_ack": 0,
            "total_received_sctp_chunk_auth": 0,
            "total_received_sctp_chunk_cookie_ack": 0,
            "total_received_sctp_chunk_cookie_echo": 1,
            "total_received_sctp_chunk_cwr": 0,
            "total_received_sctp_chunk_data": 11,
            "total_received_sctp_chunk_ecne": 0,
            "total_received_sctp_chunk_error": 0,
            "total_received_sctp_chunk_forward_tsn": 0,
            "total_received_sctp_chunk_heartbeat": 0,
            "total_received_sctp_chunk_heartbeat_ack": 0,
            "total_received_sctp_chunk_i_data": 0,
            "total_received_sctp_chunk_i_forward_tsn": 0,
            "total_received_sctp_chunk_init": 1,
            "total_received_sctp_chunk_init_ack": 0,
            "total_received_sctp_chunk_pad": 8,
            "total_received_sctp_chunk_reconfig": 0,
            "total_received_sctp_chunk_sack": 5,
            "total_received_sctp_chunk_shutdown": 0,
            "total_received_sctp_chunk_shutdown_ack": 0,
            "total_received_sctp_chunk_shutdown_complete": 0,
            "total_received_sctp_chunk_unknown": 0,
            "total_received_unknown_sctp": 0,
            "total_sent_sctp": 21,
            "total_sent_sctp_byte_size": 836,
            "total_sent_sctp_chunk_abort": 0,
            "total_sent_sctp_chunk_asconf": 0,
            "total_sent_sctp_chunk_asconf_ack": 0,
            "total_sent_sctp_chunk_auth": 0,
            "total_sent_sctp_chunk_cookie_ack": 1,
            "total_sent_sctp_chunk_cookie_echo": 0,
            "total_sent_sctp_chunk_cwr": 0,
            "total_sent_sctp_chunk_data": 8,
            "total_sent_sctp_chunk_ecne": 0,
            "total_sent_sctp_chunk_error": 0,
            "total_sent_sctp_chunk_forward_tsn": 0,
            "total_sent_sctp_chunk_heartbeat": 0,
            "total_sent_sctp_chunk_heartbeat_ack": 0,
            "total_sent_sctp_chunk_i_data": 0,
            "total_sent_sctp_chunk_i_forward_tsn": 0,
            "total_sent_sctp_chunk_init": 0,
            "total_sent_sctp_chunk_init_ack": 1,
            "total_sent_sctp_chunk_pad": 0,
            "total_sent_sctp_chunk_reconfig": 0,
            "total_sent_sctp_chunk_sack": 11,
            "total_sent_sctp_chunk_shutdown": 0,
            "total_sent_sctp_chunk_shutdown_ack": 0,
            "total_sent_sctp_chunk_shutdown_complete": 0,
            "total_sent_sctp_chunk_unknown": 0
        },
        "signaling": {
            "total_received_signaling_pong": 0,
            "total_sent_signaling_ping": 0
        },
        "simulcast": {
            "r0": {
                "rtp": {
                    "total_received_rtp": 0,
                    "total_received_rtp_byte_size": 0,
                    "total_received_rtp_padding": 0,
                    "total_received_rtp_padding_size": 0,
                    "total_received_rtp_red": 0,
                    "total_received_rtp_red_rtx": 0,
                    "total_received_rtp_red_ulpfec": 0,
                    "total_received_rtp_rtx": 0
                },
                "rtp_hdr_ext": {
                    "total_received_rtp_hdr_ext_abs_send_time": 0,
                    "total_received_rtp_hdr_ext_audio_level": 0,
                    "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
                    "total_received_rtp_hdr_ext_color_space": 0,
                    "total_received_rtp_hdr_ext_inband_cn": 0,
                    "total_received_rtp_hdr_ext_playout_delay": 0,
                    "total_received_rtp_hdr_ext_sdes_mid": 0,
                    "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_toffset": 0,
                    "total_received_rtp_hdr_ext_transport_wide_cc": 0,
                    "total_received_rtp_hdr_ext_unknown": 0,
                    "total_received_rtp_hdr_ext_video_content_type": 0,
                    "total_received_rtp_hdr_ext_video_orientation": 0,
                    "total_received_rtp_hdr_ext_video_timeing": 0
                }
            },
            "r1": {
                "rtp": {
                    "total_received_rtp": 0,
                    "total_received_rtp_byte_size": 0,
                    "total_received_rtp_padding": 0,
                    "total_received_rtp_padding_size": 0,
                    "total_received_rtp_red": 0,
                    "total_received_rtp_red_rtx": 0,
                    "total_received_rtp_red_ulpfec": 0,
                    "total_received_rtp_rtx": 0
                },
                "rtp_hdr_ext": {
                    "total_received_rtp_hdr_ext_abs_send_time": 0,
                    "total_received_rtp_hdr_ext_audio_level": 0,
                    "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
                    "total_received_rtp_hdr_ext_color_space": 0,
                    "total_received_rtp_hdr_ext_inband_cn": 0,
                    "total_received_rtp_hdr_ext_playout_delay": 0,
                    "total_received_rtp_hdr_ext_sdes_mid": 0,
                    "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_toffset": 0,
                    "total_received_rtp_hdr_ext_transport_wide_cc": 0,
                    "total_received_rtp_hdr_ext_unknown": 0,
                    "total_received_rtp_hdr_ext_video_content_type": 0,
                    "total_received_rtp_hdr_ext_video_orientation": 0,
                    "total_received_rtp_hdr_ext_video_timeing": 0
                }
            },
            "r2": {
                "rtp": {
                    "total_received_rtp": 0,
                    "total_received_rtp_byte_size": 0,
                    "total_received_rtp_padding": 0,
                    "total_received_rtp_padding_size": 0,
                    "total_received_rtp_red": 0,
                    "total_received_rtp_red_rtx": 0,
                    "total_received_rtp_red_ulpfec": 0,
                    "total_received_rtp_rtx": 0
                },
                "rtp_hdr_ext": {
                    "total_received_rtp_hdr_ext_abs_send_time": 0,
                    "total_received_rtp_hdr_ext_audio_level": 0,
                    "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
                    "total_received_rtp_hdr_ext_color_space": 0,
                    "total_received_rtp_hdr_ext_inband_cn": 0,
                    "total_received_rtp_hdr_ext_playout_delay": 0,
                    "total_received_rtp_hdr_ext_sdes_mid": 0,
                    "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_toffset": 0,
                    "total_received_rtp_hdr_ext_transport_wide_cc": 0,
                    "total_received_rtp_hdr_ext_unknown": 0,
                    "total_received_rtp_hdr_ext_video_content_type": 0,
                    "total_received_rtp_hdr_ext_video_orientation": 0,
                    "total_received_rtp_hdr_ext_video_timeing": 0
                }
            }
        },
        "spotlight": {
            "total_spotlight_focus_failed": 0,
            "total_spotlight_unfocus_audio_no_room": 0,
            "total_spotlight_unfocus_audio_out_packet": 0,
            "total_spotlight_unfocus_audio_publish": 0
        },
        "timestamp": "2021-06-14T01:28:39Z",
        "turn": {
            "total_received_allocate_request": 3,
            "total_received_binding_request": 0,
            "total_received_channel_bind_request": 1,
            "total_received_channel_data": 2234,
            "total_received_create_permission_request": 1,
            "total_received_expired_channel_number": 0,
            "total_received_refresh_request": 0,
            "total_received_send_indication": 2,
            "total_received_turn_binding_error": 0,
            "total_received_turn_binding_request": 9,
            "total_received_turn_binding_success": 3,
            "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": 1,
            "total_sent_allocate_success": 1,
            "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": 53,
            "total_sent_create_permission_error": 0,
            "total_sent_create_permission_success": 1,
            "total_sent_data_indication": 1,
            "total_sent_refresh_error": 0,
            "total_sent_refresh_success": 0,
            "total_sent_turn_binding_error": 0,
            "total_sent_turn_binding_request": 4,
            "total_sent_turn_binding_success": 1,
            "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=KDBN2YD1A919V5BA2JX6TG2RP8 -vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 69
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.4.0
x-sora-target: Sora_20170529.GetStatsConnection

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


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: 11370
content-type: application/json
date: Mon, 14 Jun 2021 01:40:25 GMT
server: Cowboy

{
    "channel_id": "sora",
    "client_id": "KDBN2YD1A919V5BA2JX6TG2RP8",
    "connection_id": "KDBN2YD1A919V5BA2JX6TG2RP8",
    "data_channel": {
        "e2ee": {
            "total_received_data_channel_message": 1,
            "total_received_data_channel_message_byte_size": 1,
            "total_sent_data_channel_message": 1,
            "total_sent_data_channel_message_byte_size": 16
        },
        "notify": {
            "total_received_data_channel_message": 1,
            "total_received_data_channel_message_byte_size": 1,
            "total_sent_data_channel_message": 85,
            "total_sent_data_channel_message_byte_size": 6823
        },
        "push": {
            "total_received_data_channel_message": 1,
            "total_received_data_channel_message_byte_size": 1,
            "total_sent_data_channel_message": 1,
            "total_sent_data_channel_message_byte_size": 16
        },
        "signaling": {
            "total_received_data_channel_message": 1,
            "total_received_data_channel_message_byte_size": 1,
            "total_sent_data_channel_message": 1,
            "total_sent_data_channel_message_byte_size": 21
        },
        "stats": {
            "total_received_data_channel_message": 145,
            "total_received_data_channel_message_byte_size": 412875,
            "total_sent_data_channel_message": 145,
            "total_sent_data_channel_message_byte_size": 4049
        }
    },
    "dtls": {
        "total_received_dtls": 624,
        "total_sent_dtls": 698
    },
    "network_status": {
        "unstable_level": 0
    },
    "packet_loss_simulator": {
        "total_dropped_received_data_channel": 0,
        "total_dropped_received_rtp": 0,
        "total_dropped_sent_data_channel": 0,
        "total_dropped_sent_rtp": 0
    },
    "rtcp": {
        "total_generic_nack_cache_hit": 0,
        "total_generic_nack_cache_miss": 0,
        "total_pli_trigger": 0,
        "total_received_rtcp": 1942,
        "total_received_rtcp_bye": 0,
        "total_received_rtcp_byte_size": 135940,
        "total_received_rtcp_psfb_afb": 0,
        "total_received_rtcp_psfb_fir": 0,
        "total_received_rtcp_psfb_pli": 0,
        "total_received_rtcp_rr": 0,
        "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": 1942,
        "total_received_rtcp_sr": 1942,
        "total_received_rtcp_unknown": 0,
        "total_received_rtcp_xr": 0,
        "total_sent_rtcp": 1044,
        "total_sent_rtcp_bye": 0,
        "total_sent_rtcp_byte_size": 69624,
        "total_sent_rtcp_psfb_afb": 900,
        "total_sent_rtcp_psfb_fir": 0,
        "total_sent_rtcp_psfb_pli": 0,
        "total_sent_rtcp_rr": 1044,
        "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
    },
    "rtp": {
        "total_generic_nack_cache_hit": 0,
        "total_generic_nack_cache_miss": 0,
        "total_pli_trigger": 0,
        "total_received": 116011,
        "total_received_byte_size": 88776032,
        "total_received_rtcp": 1942,
        "total_received_rtcp_bye": 0,
        "total_received_rtcp_byte_size": 135940,
        "total_received_rtcp_psfb_afb": 0,
        "total_received_rtcp_psfb_fir": 0,
        "total_received_rtcp_psfb_pli": 0,
        "total_received_rtcp_rr": 0,
        "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": 1942,
        "total_received_rtcp_sr": 1942,
        "total_received_rtcp_unknown": 0,
        "total_received_rtcp_xr": 0,
        "total_received_rtp": 114069,
        "total_received_rtp_byte_size": 88640092,
        "total_received_rtp_padding": 0,
        "total_received_rtp_padding_size": 0,
        "total_received_rtp_red": 0,
        "total_received_rtp_red_rtx": 0,
        "total_received_rtp_red_ulpfec": 0,
        "total_received_rtp_rtx": 18,
        "total_sent": 1044,
        "total_sent_byte_size": 69624,
        "total_sent_rtcp": 1044,
        "total_sent_rtcp_bye": 0,
        "total_sent_rtcp_byte_size": 69624,
        "total_sent_rtcp_psfb_afb": 900,
        "total_sent_rtcp_psfb_fir": 0,
        "total_sent_rtcp_psfb_pli": 0,
        "total_sent_rtcp_rr": 1044,
        "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
    },
    "rtp_hdr_ext": {
        "total_received_rtp_hdr_ext_abs_send_time": 114069,
        "total_received_rtp_hdr_ext_audio_level": 36051,
        "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
        "total_received_rtp_hdr_ext_color_space": 0,
        "total_received_rtp_hdr_ext_inband_cn": 0,
        "total_received_rtp_hdr_ext_playout_delay": 0,
        "total_received_rtp_hdr_ext_sdes_mid": 0,
        "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
        "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
        "total_received_rtp_hdr_ext_toffset": 0,
        "total_received_rtp_hdr_ext_transport_wide_cc": 0,
        "total_received_rtp_hdr_ext_unknown": 0,
        "total_received_rtp_hdr_ext_video_content_type": 0,
        "total_received_rtp_hdr_ext_video_orientation": 0,
        "total_received_rtp_hdr_ext_video_timeing": 0,
        "total_sent_rtp_hdr_ext_abs_send_time": 0,
        "total_sent_rtp_hdr_ext_audio_level": 0,
        "total_sent_rtp_hdr_ext_av1_rtp_sepc": 0,
        "total_sent_rtp_hdr_ext_color_space": 0,
        "total_sent_rtp_hdr_ext_inband_cn": 0,
        "total_sent_rtp_hdr_ext_playout_delay": 0,
        "total_sent_rtp_hdr_ext_sdes_mid": 0,
        "total_sent_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
        "total_sent_rtp_hdr_ext_sdes_rtp_stream_id": 0,
        "total_sent_rtp_hdr_ext_toffset": 0,
        "total_sent_rtp_hdr_ext_transport_wide_cc": 0,
        "total_sent_rtp_hdr_ext_unknown": 0,
        "total_sent_rtp_hdr_ext_video_content_type": 0,
        "total_sent_rtp_hdr_ext_video_orientation": 0,
        "total_sent_rtp_hdr_ext_video_timeing": 0
    },
    "sctp": {
        "total_received_invalid_sctp": 0,
        "total_received_sctp": 622,
        "total_received_sctp_byte_size": 432056,
        "total_received_sctp_chunk_abort": 0,
        "total_received_sctp_chunk_asconf": 0,
        "total_received_sctp_chunk_asconf_ack": 0,
        "total_received_sctp_chunk_auth": 0,
        "total_received_sctp_chunk_cookie_ack": 0,
        "total_received_sctp_chunk_cookie_echo": 1,
        "total_received_sctp_chunk_cwr": 0,
        "total_received_sctp_chunk_data": 437,
        "total_received_sctp_chunk_ecne": 0,
        "total_received_sctp_chunk_error": 0,
        "total_received_sctp_chunk_forward_tsn": 0,
        "total_received_sctp_chunk_heartbeat": 0,
        "total_received_sctp_chunk_heartbeat_ack": 24,
        "total_received_sctp_chunk_i_data": 0,
        "total_received_sctp_chunk_i_forward_tsn": 0,
        "total_received_sctp_chunk_init": 1,
        "total_received_sctp_chunk_init_ack": 0,
        "total_received_sctp_chunk_pad": 233,
        "total_received_sctp_chunk_reconfig": 0,
        "total_received_sctp_chunk_sack": 171,
        "total_received_sctp_chunk_shutdown": 0,
        "total_received_sctp_chunk_shutdown_ack": 0,
        "total_received_sctp_chunk_shutdown_complete": 0,
        "total_received_sctp_chunk_unknown": 0,
        "total_received_unknown_sctp": 0,
        "total_sent_sctp": 696,
        "total_sent_sctp_byte_size": 31808,
        "total_sent_sctp_chunk_abort": 0,
        "total_sent_sctp_chunk_asconf": 0,
        "total_sent_sctp_chunk_asconf_ack": 0,
        "total_sent_sctp_chunk_auth": 0,
        "total_sent_sctp_chunk_cookie_ack": 1,
        "total_sent_sctp_chunk_cookie_echo": 0,
        "total_sent_sctp_chunk_cwr": 0,
        "total_sent_sctp_chunk_data": 233,
        "total_sent_sctp_chunk_ecne": 0,
        "total_sent_sctp_chunk_error": 0,
        "total_sent_sctp_chunk_forward_tsn": 0,
        "total_sent_sctp_chunk_heartbeat": 24,
        "total_sent_sctp_chunk_heartbeat_ack": 0,
        "total_sent_sctp_chunk_i_data": 0,
        "total_sent_sctp_chunk_i_forward_tsn": 0,
        "total_sent_sctp_chunk_init": 0,
        "total_sent_sctp_chunk_init_ack": 1,
        "total_sent_sctp_chunk_pad": 0,
        "total_sent_sctp_chunk_reconfig": 0,
        "total_sent_sctp_chunk_sack": 437,
        "total_sent_sctp_chunk_shutdown": 0,
        "total_sent_sctp_chunk_shutdown_ack": 0,
        "total_sent_sctp_chunk_shutdown_complete": 0,
        "total_sent_sctp_chunk_unknown": 0
    },
    "signaling": {
        "total_received_signaling_pong": 0,
        "total_sent_signaling_ping": 0
    },
    "simulcast": {
        "r0": {
            "rtp": {
                "total_received_rtp": 0,
                "total_received_rtp_byte_size": 0,
                "total_received_rtp_padding": 0,
                "total_received_rtp_padding_size": 0,
                "total_received_rtp_red": 0,
                "total_received_rtp_red_rtx": 0,
                "total_received_rtp_red_ulpfec": 0,
                "total_received_rtp_rtx": 0
            },
            "rtp_hdr_ext": {
                "total_received_rtp_hdr_ext_abs_send_time": 0,
                "total_received_rtp_hdr_ext_audio_level": 0,
                "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
                "total_received_rtp_hdr_ext_color_space": 0,
                "total_received_rtp_hdr_ext_inband_cn": 0,
                "total_received_rtp_hdr_ext_playout_delay": 0,
                "total_received_rtp_hdr_ext_sdes_mid": 0,
                "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
                "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
                "total_received_rtp_hdr_ext_toffset": 0,
                "total_received_rtp_hdr_ext_transport_wide_cc": 0,
                "total_received_rtp_hdr_ext_unknown": 0,
                "total_received_rtp_hdr_ext_video_content_type": 0,
                "total_received_rtp_hdr_ext_video_orientation": 0,
                "total_received_rtp_hdr_ext_video_timeing": 0
            }
        },
        "r1": {
            "rtp": {
                "total_received_rtp": 0,
                "total_received_rtp_byte_size": 0,
                "total_received_rtp_padding": 0,
                "total_received_rtp_padding_size": 0,
                "total_received_rtp_red": 0,
                "total_received_rtp_red_rtx": 0,
                "total_received_rtp_red_ulpfec": 0,
                "total_received_rtp_rtx": 0
            },
            "rtp_hdr_ext": {
                "total_received_rtp_hdr_ext_abs_send_time": 0,
                "total_received_rtp_hdr_ext_audio_level": 0,
                "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
                "total_received_rtp_hdr_ext_color_space": 0,
                "total_received_rtp_hdr_ext_inband_cn": 0,
                "total_received_rtp_hdr_ext_playout_delay": 0,
                "total_received_rtp_hdr_ext_sdes_mid": 0,
                "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
                "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
                "total_received_rtp_hdr_ext_toffset": 0,
                "total_received_rtp_hdr_ext_transport_wide_cc": 0,
                "total_received_rtp_hdr_ext_unknown": 0,
                "total_received_rtp_hdr_ext_video_content_type": 0,
                "total_received_rtp_hdr_ext_video_orientation": 0,
                "total_received_rtp_hdr_ext_video_timeing": 0
            }
        },
        "r2": {
            "rtp": {
                "total_received_rtp": 0,
                "total_received_rtp_byte_size": 0,
                "total_received_rtp_padding": 0,
                "total_received_rtp_padding_size": 0,
                "total_received_rtp_red": 0,
                "total_received_rtp_red_rtx": 0,
                "total_received_rtp_red_ulpfec": 0,
                "total_received_rtp_rtx": 0
            },
            "rtp_hdr_ext": {
                "total_received_rtp_hdr_ext_abs_send_time": 0,
                "total_received_rtp_hdr_ext_audio_level": 0,
                "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
                "total_received_rtp_hdr_ext_color_space": 0,
                "total_received_rtp_hdr_ext_inband_cn": 0,
                "total_received_rtp_hdr_ext_playout_delay": 0,
                "total_received_rtp_hdr_ext_sdes_mid": 0,
                "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
                "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
                "total_received_rtp_hdr_ext_toffset": 0,
                "total_received_rtp_hdr_ext_transport_wide_cc": 0,
                "total_received_rtp_hdr_ext_unknown": 0,
                "total_received_rtp_hdr_ext_video_content_type": 0,
                "total_received_rtp_hdr_ext_video_orientation": 0,
                "total_received_rtp_hdr_ext_video_timeing": 0
            }
        }
    },
    "spotlight": {
        "total_spotlight_focus_failed": 0,
        "total_spotlight_unfocus_audio_no_room": 0,
        "total_spotlight_unfocus_audio_out_packet": 0,
        "total_spotlight_unfocus_audio_publish": 0
    },
    "timestamp": "2021-06-14T01:40:26Z",
    "turn": {
        "total_received_allocate_request": 3,
        "total_received_binding_request": 0,
        "total_received_channel_bind_request": 4,
        "total_received_channel_data": 117184,
        "total_received_create_permission_request": 2,
        "total_received_expired_channel_number": 0,
        "total_received_refresh_request": 2,
        "total_received_send_indication": 2,
        "total_received_turn_binding_error": 0,
        "total_received_turn_binding_request": 291,
        "total_received_turn_binding_success": 242,
        "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": 1,
        "total_sent_allocate_success": 1,
        "total_sent_binding_error": 0,
        "total_sent_binding_success": 0,
        "total_sent_channel_bind_error": 0,
        "total_sent_channel_bind_success": 4,
        "total_sent_channel_data": 2274,
        "total_sent_create_permission_error": 0,
        "total_sent_create_permission_success": 2,
        "total_sent_data_indication": 1,
        "total_sent_refresh_error": 0,
        "total_sent_refresh_success": 2,
        "total_sent_turn_binding_error": 0,
        "total_sent_turn_binding_request": 243,
        "total_sent_turn_binding_success": 1,
        "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.4.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: 11372
content-type: application/json
date: Mon, 14 Jun 2021 01:40:55 GMT
server: Cowboy

[
    {
        "channel_id": "sora",
        "client_id": "KDBN2YD1A919V5BA2JX6TG2RP8",
        "connection_id": "KDBN2YD1A919V5BA2JX6TG2RP8",
        "data_channel": {
            "e2ee": {
                "total_received_data_channel_message": 1,
                "total_received_data_channel_message_byte_size": 1,
                "total_sent_data_channel_message": 1,
                "total_sent_data_channel_message_byte_size": 16
            },
            "notify": {
                "total_received_data_channel_message": 1,
                "total_received_data_channel_message_byte_size": 1,
                "total_sent_data_channel_message": 88,
                "total_sent_data_channel_message_byte_size": 7015
            },
            "push": {
                "total_received_data_channel_message": 1,
                "total_received_data_channel_message_byte_size": 1,
                "total_sent_data_channel_message": 1,
                "total_sent_data_channel_message_byte_size": 16
            },
            "signaling": {
                "total_received_data_channel_message": 1,
                "total_received_data_channel_message_byte_size": 1,
                "total_sent_data_channel_message": 1,
                "total_sent_data_channel_message_byte_size": 21
            },
            "stats": {
                "total_received_data_channel_message": 151,
                "total_received_data_channel_message_byte_size": 430139,
                "total_sent_data_channel_message": 151,
                "total_sent_data_channel_message_byte_size": 4217
            }
        },
        "dtls": {
            "total_received_dtls": 649,
            "total_sent_dtls": 726
        },
        "network_status": {
            "unstable_level": 0
        },
        "packet_loss_simulator": {
            "total_dropped_received_data_channel": 0,
            "total_dropped_received_rtp": 0,
            "total_dropped_sent_data_channel": 0,
            "total_dropped_sent_rtp": 0
        },
        "rtcp": {
            "total_generic_nack_cache_hit": 0,
            "total_generic_nack_cache_miss": 0,
            "total_pli_trigger": 0,
            "total_received_rtcp": 2021,
            "total_received_rtcp_bye": 0,
            "total_received_rtcp_byte_size": 141470,
            "total_received_rtcp_psfb_afb": 0,
            "total_received_rtcp_psfb_fir": 0,
            "total_received_rtcp_psfb_pli": 0,
            "total_received_rtcp_rr": 0,
            "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": 2021,
            "total_received_rtcp_sr": 2021,
            "total_received_rtcp_unknown": 0,
            "total_received_rtcp_xr": 0,
            "total_sent_rtcp": 1087,
            "total_sent_rtcp_bye": 0,
            "total_sent_rtcp_byte_size": 72490,
            "total_sent_rtcp_psfb_afb": 937,
            "total_sent_rtcp_psfb_fir": 0,
            "total_sent_rtcp_psfb_pli": 0,
            "total_sent_rtcp_rr": 1087,
            "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
        },
        "rtp": {
            "total_generic_nack_cache_hit": 0,
            "total_generic_nack_cache_miss": 0,
            "total_pli_trigger": 0,
            "total_received": 120800,
            "total_received_byte_size": 92417782,
            "total_received_rtcp": 2021,
            "total_received_rtcp_bye": 0,
            "total_received_rtcp_byte_size": 141470,
            "total_received_rtcp_psfb_afb": 0,
            "total_received_rtcp_psfb_fir": 0,
            "total_received_rtcp_psfb_pli": 0,
            "total_received_rtcp_rr": 0,
            "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": 2021,
            "total_received_rtcp_sr": 2021,
            "total_received_rtcp_unknown": 0,
            "total_received_rtcp_xr": 0,
            "total_received_rtp": 118779,
            "total_received_rtp_byte_size": 92276312,
            "total_received_rtp_padding": 0,
            "total_received_rtp_padding_size": 0,
            "total_received_rtp_red": 0,
            "total_received_rtp_red_rtx": 0,
            "total_received_rtp_red_ulpfec": 0,
            "total_received_rtp_rtx": 18,
            "total_sent": 1087,
            "total_sent_byte_size": 72490,
            "total_sent_rtcp": 1087,
            "total_sent_rtcp_bye": 0,
            "total_sent_rtcp_byte_size": 72490,
            "total_sent_rtcp_psfb_afb": 937,
            "total_sent_rtcp_psfb_fir": 0,
            "total_sent_rtcp_psfb_pli": 0,
            "total_sent_rtcp_rr": 1087,
            "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
        },
        "rtp_hdr_ext": {
            "total_received_rtp_hdr_ext_abs_send_time": 118779,
            "total_received_rtp_hdr_ext_audio_level": 37555,
            "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
            "total_received_rtp_hdr_ext_color_space": 0,
            "total_received_rtp_hdr_ext_inband_cn": 0,
            "total_received_rtp_hdr_ext_playout_delay": 0,
            "total_received_rtp_hdr_ext_sdes_mid": 0,
            "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
            "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
            "total_received_rtp_hdr_ext_toffset": 0,
            "total_received_rtp_hdr_ext_transport_wide_cc": 0,
            "total_received_rtp_hdr_ext_unknown": 0,
            "total_received_rtp_hdr_ext_video_content_type": 0,
            "total_received_rtp_hdr_ext_video_orientation": 0,
            "total_received_rtp_hdr_ext_video_timeing": 0,
            "total_sent_rtp_hdr_ext_abs_send_time": 0,
            "total_sent_rtp_hdr_ext_audio_level": 0,
            "total_sent_rtp_hdr_ext_av1_rtp_sepc": 0,
            "total_sent_rtp_hdr_ext_color_space": 0,
            "total_sent_rtp_hdr_ext_inband_cn": 0,
            "total_sent_rtp_hdr_ext_playout_delay": 0,
            "total_sent_rtp_hdr_ext_sdes_mid": 0,
            "total_sent_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
            "total_sent_rtp_hdr_ext_sdes_rtp_stream_id": 0,
            "total_sent_rtp_hdr_ext_toffset": 0,
            "total_sent_rtp_hdr_ext_transport_wide_cc": 0,
            "total_sent_rtp_hdr_ext_unknown": 0,
            "total_sent_rtp_hdr_ext_video_content_type": 0,
            "total_sent_rtp_hdr_ext_video_orientation": 0,
            "total_sent_rtp_hdr_ext_video_timeing": 0
        },
        "sctp": {
            "total_received_invalid_sctp": 0,
            "total_received_sctp": 647,
            "total_received_sctp_byte_size": 450100,
            "total_received_sctp_chunk_abort": 0,
            "total_received_sctp_chunk_asconf": 0,
            "total_received_sctp_chunk_asconf_ack": 0,
            "total_received_sctp_chunk_auth": 0,
            "total_received_sctp_chunk_cookie_ack": 0,
            "total_received_sctp_chunk_cookie_echo": 1,
            "total_received_sctp_chunk_cwr": 0,
            "total_received_sctp_chunk_data": 455,
            "total_received_sctp_chunk_ecne": 0,
            "total_received_sctp_chunk_error": 0,
            "total_received_sctp_chunk_forward_tsn": 0,
            "total_received_sctp_chunk_heartbeat": 0,
            "total_received_sctp_chunk_heartbeat_ack": 25,
            "total_received_sctp_chunk_i_data": 0,
            "total_received_sctp_chunk_i_forward_tsn": 0,
            "total_received_sctp_chunk_init": 1,
            "total_received_sctp_chunk_init_ack": 0,
            "total_received_sctp_chunk_pad": 242,
            "total_received_sctp_chunk_reconfig": 0,
            "total_received_sctp_chunk_sack": 178,
            "total_received_sctp_chunk_shutdown": 0,
            "total_received_sctp_chunk_shutdown_ack": 0,
            "total_received_sctp_chunk_shutdown_complete": 0,
            "total_received_sctp_chunk_unknown": 0,
            "total_received_unknown_sctp": 0,
            "total_sent_sctp": 724,
            "total_sent_sctp_byte_size": 33008,
            "total_sent_sctp_chunk_abort": 0,
            "total_sent_sctp_chunk_asconf": 0,
            "total_sent_sctp_chunk_asconf_ack": 0,
            "total_sent_sctp_chunk_auth": 0,
            "total_sent_sctp_chunk_cookie_ack": 1,
            "total_sent_sctp_chunk_cookie_echo": 0,
            "total_sent_sctp_chunk_cwr": 0,
            "total_sent_sctp_chunk_data": 242,
            "total_sent_sctp_chunk_ecne": 0,
            "total_sent_sctp_chunk_error": 0,
            "total_sent_sctp_chunk_forward_tsn": 0,
            "total_sent_sctp_chunk_heartbeat": 25,
            "total_sent_sctp_chunk_heartbeat_ack": 0,
            "total_sent_sctp_chunk_i_data": 0,
            "total_sent_sctp_chunk_i_forward_tsn": 0,
            "total_sent_sctp_chunk_init": 0,
            "total_sent_sctp_chunk_init_ack": 1,
            "total_sent_sctp_chunk_pad": 0,
            "total_sent_sctp_chunk_reconfig": 0,
            "total_sent_sctp_chunk_sack": 455,
            "total_sent_sctp_chunk_shutdown": 0,
            "total_sent_sctp_chunk_shutdown_ack": 0,
            "total_sent_sctp_chunk_shutdown_complete": 0,
            "total_sent_sctp_chunk_unknown": 0
        },
        "signaling": {
            "total_received_signaling_pong": 0,
            "total_sent_signaling_ping": 0
        },
        "simulcast": {
            "r0": {
                "rtp": {
                    "total_received_rtp": 0,
                    "total_received_rtp_byte_size": 0,
                    "total_received_rtp_padding": 0,
                    "total_received_rtp_padding_size": 0,
                    "total_received_rtp_red": 0,
                    "total_received_rtp_red_rtx": 0,
                    "total_received_rtp_red_ulpfec": 0,
                    "total_received_rtp_rtx": 0
                },
                "rtp_hdr_ext": {
                    "total_received_rtp_hdr_ext_abs_send_time": 0,
                    "total_received_rtp_hdr_ext_audio_level": 0,
                    "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
                    "total_received_rtp_hdr_ext_color_space": 0,
                    "total_received_rtp_hdr_ext_inband_cn": 0,
                    "total_received_rtp_hdr_ext_playout_delay": 0,
                    "total_received_rtp_hdr_ext_sdes_mid": 0,
                    "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_toffset": 0,
                    "total_received_rtp_hdr_ext_transport_wide_cc": 0,
                    "total_received_rtp_hdr_ext_unknown": 0,
                    "total_received_rtp_hdr_ext_video_content_type": 0,
                    "total_received_rtp_hdr_ext_video_orientation": 0,
                    "total_received_rtp_hdr_ext_video_timeing": 0
                }
            },
            "r1": {
                "rtp": {
                    "total_received_rtp": 0,
                    "total_received_rtp_byte_size": 0,
                    "total_received_rtp_padding": 0,
                    "total_received_rtp_padding_size": 0,
                    "total_received_rtp_red": 0,
                    "total_received_rtp_red_rtx": 0,
                    "total_received_rtp_red_ulpfec": 0,
                    "total_received_rtp_rtx": 0
                },
                "rtp_hdr_ext": {
                    "total_received_rtp_hdr_ext_abs_send_time": 0,
                    "total_received_rtp_hdr_ext_audio_level": 0,
                    "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
                    "total_received_rtp_hdr_ext_color_space": 0,
                    "total_received_rtp_hdr_ext_inband_cn": 0,
                    "total_received_rtp_hdr_ext_playout_delay": 0,
                    "total_received_rtp_hdr_ext_sdes_mid": 0,
                    "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_toffset": 0,
                    "total_received_rtp_hdr_ext_transport_wide_cc": 0,
                    "total_received_rtp_hdr_ext_unknown": 0,
                    "total_received_rtp_hdr_ext_video_content_type": 0,
                    "total_received_rtp_hdr_ext_video_orientation": 0,
                    "total_received_rtp_hdr_ext_video_timeing": 0
                }
            },
            "r2": {
                "rtp": {
                    "total_received_rtp": 0,
                    "total_received_rtp_byte_size": 0,
                    "total_received_rtp_padding": 0,
                    "total_received_rtp_padding_size": 0,
                    "total_received_rtp_red": 0,
                    "total_received_rtp_red_rtx": 0,
                    "total_received_rtp_red_ulpfec": 0,
                    "total_received_rtp_rtx": 0
                },
                "rtp_hdr_ext": {
                    "total_received_rtp_hdr_ext_abs_send_time": 0,
                    "total_received_rtp_hdr_ext_audio_level": 0,
                    "total_received_rtp_hdr_ext_av1_rtp_sepc": 0,
                    "total_received_rtp_hdr_ext_color_space": 0,
                    "total_received_rtp_hdr_ext_inband_cn": 0,
                    "total_received_rtp_hdr_ext_playout_delay": 0,
                    "total_received_rtp_hdr_ext_sdes_mid": 0,
                    "total_received_rtp_hdr_ext_sdes_repaired_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_sdes_rtp_stream_id": 0,
                    "total_received_rtp_hdr_ext_toffset": 0,
                    "total_received_rtp_hdr_ext_transport_wide_cc": 0,
                    "total_received_rtp_hdr_ext_unknown": 0,
                    "total_received_rtp_hdr_ext_video_content_type": 0,
                    "total_received_rtp_hdr_ext_video_orientation": 0,
                    "total_received_rtp_hdr_ext_video_timeing": 0
                }
            }
        },
        "spotlight": {
            "total_spotlight_focus_failed": 0,
            "total_spotlight_unfocus_audio_no_room": 0,
            "total_spotlight_unfocus_audio_out_packet": 0,
            "total_spotlight_unfocus_audio_publish": 0
        },
        "timestamp": "2021-06-14T01:40:56Z",
        "turn": {
            "total_received_allocate_request": 3,
            "total_received_binding_request": 0,
            "total_received_channel_bind_request": 4,
            "total_received_channel_data": 122022,
            "total_received_create_permission_request": 2,
            "total_received_expired_channel_number": 0,
            "total_received_refresh_request": 2,
            "total_received_send_indication": 2,
            "total_received_turn_binding_error": 0,
            "total_received_turn_binding_request": 303,
            "total_received_turn_binding_success": 254,
            "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": 1,
            "total_sent_allocate_success": 1,
            "total_sent_binding_error": 0,
            "total_sent_binding_success": 0,
            "total_sent_channel_bind_error": 0,
            "total_sent_channel_bind_success": 4,
            "total_sent_channel_data": 2369,
            "total_sent_create_permission_error": 0,
            "total_sent_create_permission_success": 2,
            "total_sent_data_indication": 1,
            "total_sent_refresh_error": 0,
            "total_sent_refresh_success": 2,
            "total_sent_turn_binding_error": 0,
            "total_sent_turn_binding_request": 255,
            "total_sent_turn_binding_success": 1,
            "total_sent_turn_unknown": 0
        }
    }
]

ライセンス 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"
    }
}
© Copyright 2021, Shiguredo Inc Created using Sphinx 4.1.1