Charges consumption on a metered asset. Supply idempotencyKey so a retried consume returns the original decision instead of charging twice.
const url = 'https://example.com/api/v1/provision/usage/consume/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/example';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/provision/usage/consume/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/exampleA metric the entitlement does not track answers 404 (license.metric_not_tracked) and charges nothing, a session that no longer exists answers 409 (license.no_active_session), and a plan without usage metering answers 403 (license.usage_metering_not_licensed) and charges nothing.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Active license session.
Metric name.
Query Parameters
Section titled “Query Parameters”Quantity to commit.
Optional idempotency key. When supplied, a repeated consume with the same key returns the original outcome and applies the usage only once.
Responses
Section titled “Responses”OK
object
Defines the enforcement behavior applied by the resource controller or interceptor when a specific usage tier threshold is reached. Ordered from least to most restrictive.
Why a consumption the quota tiers allowed could not be settled against the balance funding the overage. Accompanies a Deny decision so a refusal that is about money rather than about the quota can be told apart.
object
Defines the enforcement behavior applied by the resource controller or interceptor when a specific usage tier threshold is reached. Ordered from least to most restrictive.
Why a consumption the quota tiers allowed could not be settled against the balance funding the overage. Accompanies a Deny decision so a refusal that is about money rather than about the quota can be told apart.
Example
{ "quotaUsageLevel": "None", "quotaUsagePolicy": "None", "reason": "None"}object
Defines the enforcement behavior applied by the resource controller or interceptor when a specific usage tier threshold is reached. Ordered from least to most restrictive.
Why a consumption the quota tiers allowed could not be settled against the balance funding the overage. Accompanies a Deny decision so a refusal that is about money rather than about the quota can be told apart.
Example
{ "quotaUsageLevel": "None", "quotaUsagePolicy": "None", "reason": "None"}Bad Request
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Forbidden
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Conflict
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}