Get asset usage
const url = 'https://example.com/api/v1/provision/admin/monitored-assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/usage';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/provision/admin/monitored-assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/usage \ --header 'Authorization: Bearer <token>'Returns current usage on the given monitored asset.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Monitored asset id.
Header Parameters
Section titled “Header Parameters”An id of your own for the call. The answer returns it in the same header, and the server log carries it; when you send none, the server makes one.
Responses
Section titled “Responses”OK
Consumer view of one asset’s usage: the current value plus the metered-tier status or credit balance backing it.
object
Consumer view of where consumption currently sits within the metered usage tiers.
object
Name of the tier the current consumption falls into.
Where the meter stands. A preview or a refused consume leaves it where it was; an accepted consume moves it.
The total a preview or a consume counts against the limit: where the meter stands plus the amount asked for. Null on a status read.
Lower bound of the current tier.
Upper bound of the current tier.
Consumption as a percentage (0–100) of the allowance.
The plan’s allowance for the period: the point where consumption is refused or becomes overage. Unlike Limit, which ends with the tier consumption sits in, it does not move as consumption crosses tiers. Null when the meter has no finite allowance.
What the server does with usage in a quota tier. Only Deny and SuspendUsage refuse a consume; every other policy accepts it and is reported in the usage status, which carries the policy the tier’s level made apply.
Severity of consumption relative to the configured usage tiers.
When the window currently being consumed ends. Null when the metric has no period, and also while no window is open — a quota anchored on first use has no boundary until the report that starts one, and reporting a guess there would show a countdown to a reset that is not scheduled.
Credits taken from the tier’s funding balance for this call, or null when nothing was charged. On a refused call it is what the call would have cost — the number to put in front of someone who needs to top up.
How much of the amount you asked for fell past the included quota and was paid for out of the balance. Subtract it from your request to say how much was included: six seconds committed with one funded unit is “five seconds included, one second from your credits”.
Why a funded overage was refused. None unless the decision is a funding refusal.
Consumer view of a prepaid credit balance (e.g. extra render credits).
object
Example
{ "metricType": "CumulativeCounter", "meteredUsageStatus": { "quotaUsagePolicy": "None", "quotaUsageLevel": "None", "reason": "None" }}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The request carries no valid access token (auth.required).
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
How to authenticate: the bearer challenge.
The caller may not make this call. The code and requires members say why: a missing scope, or a plan that does not include it.
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
Not Found
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
Too many requests. Wait the seconds in Retry-After, then send the call again (service.too-many-requests).
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The seconds to wait before the call is sent again.
The calls the limiter allows in its window, when it knows.
The calls left in the window, when the limiter knows.
The seconds until the window resets, when the limiter knows.
Names the limiter that shed the call.