V2Credits

Get Credit Aggregation

post/v2/credits/aggregation

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

Changed in 2 of the 9 revisions of this API.12

  • bcf3eb6e643011See the full diff
    • removed the required property response_context/time_took_in_seconds from the response with the 200 status

      response-required-property-removed

    • added the required property response_context/time_taken_in_seconds to the response with the 200 status

      response-required-property-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added