繁體中文
繁體中文
Appearance
繁體中文
繁體中文
Appearance
取得帳戶的彙總使用統計資訊 — 上傳趨勢、儲存成長、檔案類型分佈和閘道頻寬。可按時間範圍和 API 金鑰篩選。

GET /analytics
| 參數 | 類型 | 必填 | 描述 |
|---|---|---|---|
from | number | 是 | 起始時間戳記,Unix 毫秒。 |
to | number | 是 | 結束時間戳記,Unix 毫秒。 |
apiKey | string | 否 | 按 API 金鑰前綴(如 "bws_0a3ff5f7")或簽章權杖前綴(如 "sup_a1b2c3d4")篩選。僅顯示使用該金鑰或權杖進行的上傳。 |
curl "https://api.ipfs.ninja/analytics?from=1711036800000&to=1711641600000" \
-H "X-Api-Key: bws_your_api_key_here"200 OK {
"period": { "from": 1711036800000, "to": 1711641600000 },
"totals": {
"uploads": 42,
"storageMB": 15.3,
"fileTypes": { "json": 25, "image": 12, "pdf": 5 }
},
"daily": [
{ "date": "2026-03-21", "uploads": 20, "sizeMB": 8.1 },
{ "date": "2026-03-22", "uploads": 22, "sizeMB": 7.2 }
],
"storageGrowth": [
{ "date": "2026-03-21", "cumulativeMB": 8.1 },
{ "date": "2026-03-22", "cumulativeMB": 15.3 }
],
"gatewayBandwidthMB": 1200,
"gatewayBandwidthLimitMB": 51200
}TIP
gatewayBandwidthMB 反映當月的使用情況,與 from/to 範圍無關。apiKey 篩選僅適用於上傳指標 — 閘道頻寬是帳戶範圍的。簽章上傳權杖前綴與 API 金鑰前綴儲存在同一欄位中,因此您可以按簽章權杖前綴(如 sup_a1b2c3d4)篩選,查看使用特定簽章權杖進行的上傳。