本文へスキップ
CargoDuo logoCargoDuo
料金

このドキュメントは現在、英語版のみです。

開発者向けドキュメントAPI referenceAccount

Get usage

Requests, jobs, credits, compute seconds and vehicles per UTC day.

GEThttps://runner.cargoduo.com/v1/usage

Without from/to: the last 30 days. At most 92 days per call.

認証

Bearer API キー(必要なスコープ)account:read詳細を見る

クエリパラメーター

名前型必須説明
fromstring
string
いいえ

First day, YYYY-MM-DD (UTC).

tostring
string
いいえ

Last day, YYYY-MM-DD (UTC). Defaults to today.

リクエストの例

curl -X GET "https://runner.cargoduo.com/v1/usage?from=2026-10-17&to=2026-10-19" \
  -H "Authorization: Bearer $CARGODUO_API_KEY"

レスポンスの例

200 OK · Usage
{
  "data": [
    {
      "date": "2026-10-17",
      "requests": 41,
      "jobs": 9,
      "credits": 2.931,
      "compute_seconds": 38.2,
      "vehicles": 11
    },
    {
      "date": "2026-10-18",
      "requests": 12,
      "jobs": 3,
      "credits": 0.829,
      "compute_seconds": 9.8,
      "vehicles": 3
    },
    {
      "date": "2026-10-19",
      "requests": 27,
      "jobs": 6,
      "credits": 1.867,
      "compute_seconds": 21.4,
      "vehicles": 7
    }
  ]
}

レスポンス

  • 200OKOne row per day.
    名前型必須説明
    dataUsageDay[]
    UsageDay[]
    いいえ
  • 401Unauthorizedunauthorizedkey_revokedkey_expired
    • unauthorizedMissing, malformed or unknown API key.
    • key_revokedThe key was revoked.
    • key_expiredThe key passed its expiry date.
    名前型必須説明
    errorErrorBody必須
    ErrorBody
    はい
    すべてのエラーコード
  • 403Forbiddenip_not_allowedsubscription_inactiveaccount_inactivescope_missing
    • ip_not_allowedThe calling IP is not on the key's allowlist.
    • subscription_inactiveThe organization has no active subscription that includes the API.
    • account_inactiveThe organization is suspended, or has no owner whose account is active.
    • scope_missingThe key lacks a scope this endpoint needs.
    名前型必須説明
    errorErrorBody必須
    ErrorBody
    はい
    すべてのエラーコード
  • 422Unprocessable entityvalidation_failed
    • validation_failedThe request is well-formed JSON but describes an invalid job. details[] lists every problem.
    名前型必須説明
    errorErrorBody必須
    ErrorBody
    はい
    すべてのエラーコード
  • 429Too many requestsrate_limited
    • rate_limitedToo many requests in the current minute, hour or day (per key or per organization), or more than 60 failed authentications per minute from your IP address.
    名前型必須説明
    errorErrorBody必須
    ErrorBody
    はい
    すべてのエラーコード
  • 500Internal server errorinternal_error
    • internal_errorSomething failed on our side.
    名前型必須説明
    errorErrorBody必須
    ErrorBody
    はい
    すべてのエラーコード
  • 503Service unavailableapi_disabled
    • api_disabledThe API is temporarily disabled (maintenance) or switched off for the organization.
    名前型必須説明
    errorErrorBody必須
    ErrorBody
    はい
    すべてのエラーコード