ライセンス API¶
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
{
    "expired_at": "2023-03",
    "max_connections": 100,
    "product_name": "Sora",
    "serial_code": "123ABC-SRA-E001-202303-100",
    "type": "Experimental"
}
UpdateLicense¶
- x-sora-target:
 Sora_20171218.UpdateLicense
ライセンスを更新します。
sora.conf の license_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": {
        "expired_at": "2023-03",
        "max_connections": 100,
        "product_name": "Sora",
        "serial_code": "123ABC-SRA-E001-202303-100",
        "type": "Experimental"
    },
    "old_license": {
        "expired_at": "2024-03",
        "max_connections": 100,
        "product_name": "Sora",
        "serial_code": "123ABC-SRA-E002-202403-100",
        "type": "Experimental"
    }
}