- Home
- API Enriched
- Billing And Usage
- data
- Billing Usage Summary.
Billing Usage Summary.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/data/namespaces/system/billing/usage_summary';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"end_time":"example","start_time":"example"}'};
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-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/data/namespaces/system/billing/usage_summary \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "end_time": "example", "start_time": "example" }'GET the aggregated billing usage data for each feature/SKU over the specified duration.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Time interval to GET the billing usage summary.
object
Fetch alerts whose timestamp <= end_time format: unix_timestamp|RFC 3339
Optional: If not specified, then the end_time will be evaluated to start_time + 6 hours
If start_time is not specified, then the end_time will be evaluated to
Fetch billing usage summary for timestamp >= start_time format: unix_timestamp|RFC 3339
Optional: If not specified, then the start_time will be evaluated to end_time - 6 hours
If end_time is not specified, then the start_time will be evaluated to
Examplegenerated
{ "end_time": "example", "start_time": "example"}Responses
Section titled “Responses”A successful response.
Contains list of usage summary items.
object
Configuration parameter for usage summary items
Usage Summary Item represents the usage details for a usage type like Public Load Balancers, for a given service like App Stack.
object
object
Configuration parameter for unit
Value is derived using division_factor. For eg. If the metric usage is 20 hours over a time duration of 1 day/24h, then division_factor will be 24 hrs, so the billing metric value can be calculated it by dividing the usage value by this factor: 20/24 = 0.83 or if the division_factor is static like 1e12 like in case of bytes, then billing metric value is 100/1e12 (assuming that raw usage is 100 bytes and billing unit is in TB)
Human-readable name for the resource
Service to which the usage summary item is associated.
object
object
Timestamp
Configuration parameter for value
Configuration parameter for unit
Examplegenerated
{ "usage_summary_items": [ { "billing_metric_data": { "unit": "example", "value": "example" }, "name": "example", "service": "example", "usage_metric_data": { "metric_value": { "timestamp": 1, "value": "example" }, "unit": "example" } } ]}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example