Skip to content

List current usage details.

POST
/api/web/namespaces/{namespace}/current_usage
curl --request POST \
--url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/web/namespaces/example/current_usage \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "from": "2026-04-15T12:00:00Z", "namespace": "example", "to": "2026-04-15T12:00:00Z" }'

List current usage details per tenant and namespace. Some usage have only sense in the system namespace and this selector has no effect on it.

Examples of this operation.

namespace
required
string

Namespace Namespace to be considered.

Media typeapplication/json
List current usage details request

Request message to GET current usage details.

object
from
Timestamp from

Indicates the “from” part of the request.

string format: date-time
<= 1024 characters
namespace
Namespace

Namespace to be considered.

string
>= 6 characters <= 1024 characters
to
Timestamp to

Indicates the “to” part of the request.

string format: date-time
<= 1024 characters
Examplegenerated
{
"from": "2026-04-15T12:00:00Z",
"namespace": "example",
"to": "2026-04-15T12:00:00Z"
}

A successful response.

Media typeapplication/json
List current usage details response

Response message to GET current usage details.

object
coupons
Coupons

All used coupons.

Array<object>
Coupon

Coupon details, discount type, amount and name.

object
discount_amount
Discount amount

[x-required] If discount_type is fixed_amount, discount_amount is in cents If discount_type is percentage, discount_amount is in percentages of 0.01% precision (12.35% equals to 1235)

integer format: int32
discount_type
string
default: DISCOUNT_TYPE_UNKNOWN
Allowed values: DISCOUNT_TYPE_UNKNOWN DISCOUNT_TYPE_FIXED_AMOUNT DISCOUNT_TYPE_PERCENTAGE
title
Title

Title (or name) of the coupon.

string
>= 6 characters <= 1024 characters
discount
Discount

Discount as hundredths of currency.

string format: int64
<= 1024 characters
total_cost
Total cost

Total cost as hundredths of currency.

string format: int64
<= 1024 characters
usage_items
Usage items

Collection of usage items, lines of response.

Array<object>
CalculatedUsageItem

One line of usage, including pricing details.

object
amount
Amount

Cost as hundredths of currency.

string format: int64
<= 1024 characters
currency_code
Currency code

ISO currency code.

string
<= 1024 characters
end_timestamp
Timestamp end

End of the time unit.

string format: date-time
<= 1024 characters
fixed
Fixed

Means that this data came not from usage (reserved flag for support/discount/onboarding fees)

boolean format: boolean
metric_labels
Metric labels

ID of the corresponding aggregated_usage metric labels from which this calculated usage item is assembled.

Array<string>
quantity
Quantity

Quantity incurred.

number format: double
quantity_billable
Quantity billable

Quantity which is used to calculate the amount. Rounded from quantity as the following:

  • after converting quantity from unit_code to unit_code of this addon_id, if the value < 1, then quantity_billable is rounded to 1
  • after converting quantity from unit_code to unit_code of this addon_id, if the value > 1, then quantity_billable is rounded down to the nearest value.
string format: int64
<= 1024 characters
start_timestamp
Timestamp start

Beginning of the time unit.

string format: date-time
<= 1024 characters
status
string
default: STATUS_UNKNOWN
Allowed values: STATUS_UNKNOWN STATUS_NO_DATA STATUS_NOT_MEASURED STATUS_ACTIVE
unit_name
Unit name

Name of the quantity unit.

string
<= 1024 characters
unit_name_billable
Unit name billable

Unit name a quantity_billable is provided in.

string
<= 1024 characters
usage_type
Usage type

Type of the resource.

string
<= 1024 characters
Example
{
"coupons": [
{
"discount_type": "DISCOUNT_TYPE_UNKNOWN"
}
],
"usage_items": [
{
"status": "STATUS_UNKNOWN"
}
]
}

Returned when operation is not authorized.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when there is no permission to access resource.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when resource is not found.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation on resource is conflicting with current value.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation has been rejected as it is happening too frequently.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server encountered an error in processing API.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when service is unavailable temporarily.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server timed out processing request.

Media typeapplication/json
string format: string
Examplegenerated
example