Skip to content

Commits consumption on a metered asset. Supply idempotentKey so a retried commit returns the original decision instead of consuming twice.

POST
/api/v1/provision/usage/try-consume/{sessionId}/{metric}
curl --request POST \
--url https://example.com/api/v1/provision/usage/try-consume/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/example
sessionId
required
string format: uuid

Active license session.

metric
required
string

Metric name.

amount
number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/

Quantity to commit.

idempotentKey
string

Optional idempotency key. When supplied, a repeated commit with the same key returns the original outcome and applies the usage only once.

OK

object
tier
required
string
currentValue
required
null | number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/
start
required
null | number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/
limit
required
null | number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/
usagePercentage
required
null | number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/
quotaUsageLevel
required
Allowed values: None Normal Warning Critical OverUsage
quotaUsagePolicy
required

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.

Allowed values: None NotifyOnly AllowWithOverage AllowWithGrace RateLimit Deny SuspendUsage
periodResetAt
null | string format: date-time
creditsCharged
null | number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?$/
fundedUnits
null | number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/
reason

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.

default: None
Allowed values: None NoCredit SpendingDisabled BalanceExpired BalanceSuspended

Bad Request

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string