プロジェクト トラフィック API

概要

プロジェクトの API キーを利用してそのプロジェクトのトラフィック情報を取得します。

以下の項目が取得できます。

  • 最大同時接続数 (Max concurrent connections)
  • 最大利用帯域 (Max bandwidth)
  • 最大イングレス (Ingress)
  • 最大エグレス (Egress)

直近 1 年のトラフィックを取得する

API URL:

https://api.sora-cloud.shiguredo.app/projects/list-traffics-last-year

直近 1 年のトラフィックを 1 ヶ月単位で取得します。利用転送量の単位はバイトです。

$ curl -sS \
    -X POST \
    https://api.sora-cloud.shiguredo.app/projects/list-traffics-last-year \
    -H "Authorization: Bearer <API-KEY>" \
    | jq .
[
    {
        "timestamp": "2022-12-01T00:00:00Z",
        "max_concurrent_connections": 2,
        "max_bandwidth_mbps": 2,
        "ingress": 336327052,
        "egress": 271330208
    },
    {
        "timestamp": "2023-01-01T00:00:00Z",
        "max_concurrent_connections": 0,
        "max_bandwidth_mbps": 0,
        "ingress": 0,
        "egress": 0
    },
    {
        "timestamp": "2023-02-01T00:00:00Z",
        "max_concurrent_connections": 0,
        "max_bandwidth_mbps": 0,
        "ingress": 0,
        "egress": 0
    },
    ...
]

直近 1 ヶ月のトラフィックを取得する

API URL:

https://api.sora-cloud.shiguredo.app/projects/list-traffics-last-month

直近 1 ヶ月のトラフィックを 1 日単位で取得します。利用転送量の単位はバイトです。

$ curl -sS \
    -X POST \
    https://api.sora-cloud.shiguredo.app/projects/list-traffics-last-month \
    -H "Authorization: Bearer <API-KEY>" \
    | jq .
[
    {
        "timestamp": "2023-11-21T00:00:00Z",
        "max_concurrent_connections": 2,
        "max_bandwidth_mbps": 2,
        "ingress": 124288260,
        "egress": 122220468
    },
    {
        "timestamp": "2023-11-22T00:00:00Z",
        "max_concurrent_connections": 0,
        "max_bandwidth_mbps": 0,
        "ingress": 0,
        "egress": 0
    },
    {
        "timestamp": "2023-11-23T00:00:00Z",
        "max_concurrent_connections": 1,
        "max_bandwidth_mbps": 1,
        "ingress": 8816144,
        "egress": 43928
    }
    ...
]

直近 1 週間のトラフィックを取得する

API URL:

https://api.sora-cloud.shiguredo.app/projects/list-traffics-last-week

直近 1 週間トラフィックを 1 日単位で取得します。利用転送量の単位はバイトです。

$ curl -sS \
    -X POST \
    https://api.sora-cloud.shiguredo.app/projects/list-traffics-last-week \
    -H "Authorization: Bearer <API-KEY>" \
    | jq .
[
    {
        "timestamp": "2023-12-14T00:00:00Z",
        "max_concurrent_connections": 2,
        "max_bandwidth_mbps": 2,
        "ingress": 203222648,
        "egress": 149065812
    },
    {
        "timestamp": "2023-12-15T00:00:00Z",
        "max_concurrent_connections": 2,
        "max_bandwidth_mbps": 2,
        "ingress": 124288260,
        "egress": 122220468
    },
    {
        "timestamp": "2023-12-16T00:00:00Z",
        "max_concurrent_connections": 0,
        "max_bandwidth_mbps": 0,
        "ingress": 0,
        "egress": 0
    },
    ...
]

直近 1 日のトラフィックを取得する

API URL:

https://api.sora-cloud.shiguredo.app/projects/list-traffics-last-day

直近 1 日のトラフィックを 1 時間単位で取得します。利用転送量の単位はバイトです。

$ curl -sS \
    -X POST \
    https://api.sora-cloud.shiguredo.app/projects/list-traffics-last-day \
    -H "Authorization: Bearer <API-KEY>" \
    | jq .
[
    {
        "timestamp": "2023-12-20T10:00:00Z",
        "max_concurrent_connections": 1,
        "max_bandwidth_mbps": 1,
        "ingress": 7292024,
        "egress": 29912
    },
    {
        "timestamp": "2023-12-20T11:00:00Z",
        "max_concurrent_connections": 0,
        "max_bandwidth_mbps": 0,
        "ingress": 0,
        "egress": 0
    },
    {
        "timestamp": "2023-12-20T12:00:00Z",
        "max_concurrent_connections": 1,
        "max_bandwidth_mbps": 0,
        "ingress": 1524120,
        "egress": 14016
    },
    ...
]