V2Credits

Get Credit Aggregation

Changed on
post/v2/credits/aggregation

Request

Request body

request_contextobject nullable
from_datestring required

ISO 8601 datetime string for start date

to_datestring required

ISO 8601 datetime string for end date

mode'timely' | 'endpoints' required

Aggregation mode

resolution'hour' | 'day' | 'month'

Aggregation resolution (required for timely mode, optional for endpoints mode)

timezonestring

Timezone for aggregation, defaults to UTC

key_namestring

Optional API key name to scope aggregation results

Response

Successful Response

from_datestring required

ISO 8601 datetime string for start date

to_datestring required

ISO 8601 datetime string for end date

modestring required

Aggregation mode

resolution'hour' | 'day' | 'month'

Aggregation resolution (not applicable for endpoints mode)

timezonestring required

Timezone used for aggregation

total_creditsinteger required

Total credits consumed in the period

aggregationsobject[] required

Array of aggregation data points

Changes

    • breaking

      removed the required property / from the response with the status

    • info

      added the required property / to the response with the status

    • info

      endpoint added