Skip to content

Charges over time, by up to two keys

GET
https://billing.ezghcloud.com/v1/organizations/{orgId}/costs

Authorization

  • apiKeyoptionalHTTP
  • oauthoptionalHTTP
  • sessionCookieoptionalAPI key in cookie

Path parameters

  • orgIdstringrequired
    format: uuid

Query parameters

  • fromstringrequired

    A date (2026-09-01) or an hour-aligned UTC time (2026-09-01T10:00:00Z).

  • tostringrequired

    Exclusive, like from. Hourly windows are at most 14 days, others 13 months.

  • granularityoptionalhourordayormonth
    Default: "day"
  • groupByoptionalstring

    Up to two of project, service, meter, sku, region, comma-separated.

  • filteroptionalstring

    key:value, comma-separated, keys as groupBy; values of one key are alternatives. project: is organization-level usage.

Returns

200

OK

JSON
  • organizationIdstringrequired
  • fromstringrequired
    format: date-time
  • tostringrequired
    format: date-time
  • granularitystringrequired

    hour, day or month.

  • currencystringrequired
  • ratedThroughstringrequired

    Every hour before this is rated; later costs are still coming.

    format: date-time
  • periodsarray ofobjectrequired

    Every period in the window.

    4 properties
    • startstringrequired
      format: date-time
    • endstringrequired

      Exclusive.

      format: date-time
    • estimatedbooleanrequired
    • groupsarray ofobjectrequired
      4 properties
      • keysmap ofstringrequired

        The group's values of the groupBy keys. project "" is organization-level usage.

      • billedCoststringrequired

        Micros.

        pattern: ^-?[0-9]+(\.[0-9]+)?$
      • quantitystring | nullrequired

        Set when grouped by meter or sku.

      • unitstring | nullrequired

        The quantity's unit; null for charges without a meter.

  • valuesmap ofarray<string>required

    Every value of each key in the window, whatever the filter.

  • labelsobjectrequired

    Display names for the IDs in the answer. IDs without one are left out.

    3 properties
    • servicesmap ofstringrequired
    • metersmap ofstringrequired
    • skusmap ofstringrequired
  • nextCursornullrequired

    One page: always null.

400

invalid_request: the request is malformed (with issues), or invalid_cursor.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

401

unauthenticated: no valid credential.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

403

access_denied: the caller isn't allowed to (the message names the action); forbidden_origin: a cookie-authenticated write from another site.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

404

not_found: the organization (or one the caller doesn't belong to), or the resource, doesn't exist.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

429

too_many_requests: slow down.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

500

internal_error: a bug; the details are in the logs, under the request ID.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

503

unavailable, ledger_unavailable or payments_unavailable: retry later.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired
Navigation

Type to search…

↑↓ navigate↵ selectEsc close