Usage Find By Datacenter
Returns the usage of a contract for a given data-center
get
Authorizations
AuthorizationstringRequired
Path parameters
contractintegerRequiredPattern:
Contract number
[0-9]{5,10}dcstring · nullableRequiredExample:
Get data for the particular data-center ID (VDC UUID)
ad34b997-43c7-4666-889b-57acbeaeeb8bPattern: ^([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|null)$Query parameters
periodstringOptionalPattern:
Period of interest in format YYYY-MM (current month by default if not specified)
^\d{4}-\d{2}$Responses
200
Result data
application/json
startDatestring · dateOptionalExample:
2020-01-01endDatestring · dateOptionalExample:
2020-01-12401
Unauthorized
application/json
403
Forbidden
application/json
404
The contract not found or doesn't belong to the user
application/json
409
Conflict when getting the invoice data for usage calculation
application/json
422
Wrong period format specified
application/json
500
Unexpected internal server error
application/json
get/{contract}/usage/{dc}
GET /billing/{contract}/usage/{dc} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
"startDate": "2020-01-01",
"endDate": "2020-01-12",
"datacenters": [
{
"id": "ad34b997-43c7-4666-889b-57acbeaeeb8b",
"name": "Main VDC",
"location": "EU",
"meters": [
{
"meterId": "C01000",
"meterDesc": "1h core AMD",
"quantity": {
"quantity": "742.00",
"unit": "1hour"
}
}
]
}
],
"metadata": {
"contractId": "31805900",
"customerId": "112505406",
"reference": "31805900"
}
}Last updated
Was this helpful?