Skip to content
Oclavex is in private preview, available to selected users. Public signup is blocked. Request access at [email protected].

Returns the consumption status on a metric for the given session, including quota.

GET
/api/v1/provision/usage/{sessionId}/{metric}/consumption
curl --request GET \
--url https://example.com/api/v1/provision/usage/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/example/consumption

A metric the entitlement does not track answers 204 with no body, and a session that no longer exists (deleted or revoked) answers 409 (license.no_active_session).

sessionId
required
string format: uuid

Active license session.

metric
required
string

Metric name.

OK

Consumer view of where consumption currently sits within the metered usage tiers.

object
tier

Name of the tier the current consumption falls into.

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

Lower bound of the current tier.

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

Upper bound of the current tier.

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

Consumption as a percentage (0–100) of the tier limit.

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

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
quotaUsageLevel

Severity of consumption relative to the configured usage tiers.

Allowed values: None Normal Warning Critical OverUsage
periodResetAt

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.

null | string format: date-time
creditsCharged

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.

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

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”.

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

Why a funded overage was refused. None unless the decision is a funding refusal.

Allowed values: None NoCredit SpendingDisabled BalanceExpired BalanceSuspended

No Content

Conflict

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