Skip to content

Results are limited to the current section : Cloud Services

Get Monthly Credit Consumption

GET
/api/v1/contracts/{project_id}/credit-consumption

Return the monthly aggregation of allocated vs consumed credits for a contract, within the requested time range, ordered by month DESC.

Months with no activity are omitted.

project_id
required
Project Id
string format: uuid
backend_type

Filter results by backend type

string
Allowed values: QPU EMU

Filter results by backend type

start_time
Start Time

Start of the time range (inclusive) for the aggregation

string format: date-time
""

Start of the time range (inclusive) for the aggregation

end_time
End Time

End of the time range (exclusive) for the aggregation

string format: date-time
""

End of the time range (exclusive) for the aggregation

Successful Response

NonPaginatedResponse[list[public_apis.billing.schemas.credit_update.ProducedMonthlyCreditConsumptionResponse]]

Represents a response with either a list of items or a single item in a single page.

Generic Parameters: - A (TypeVar): The type bound to this class, which can be a single BaseModel, a list of BaseModels, or None.

Usage: - To respond with an unpaginated list of FooResponse items from an API endpoint, ensure that your function returns NonPaginatedResponse[List[FooResponse]].

- To respond with a single `FooResponse` item from an API endpoint,
  make sure that your function returns `NonPaginatedResponse[FooResponse]`
  and that Python recognizes it.
object
data
Data
Array<object>
ProducedMonthlyCreditConsumptionResponse
object
date
required
Date
string format: date
allocated_credits
required
Allocated Credits
number
consumed_credits
required
Consumed Credits
number

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string