Skip to content

Retrieve Resource Statements ​

Retrieves a list of all statements made within your account and their details, including the amount, payment status, and more.

HTTP Request ​

GET {API_URL}billing/resources/statements

Query string parameters ​

ParametersRequirementsTypeDescription
limitOptionalintThe number of items to return
offsetOptionalintThe number of items to skip before starting to collect the result set
sortFieldOptionalstringThe field by which the data will be ordered
sortOrderOptionalstringSorting order: desc、asc
filtersOptionalstringStringified array of filter objects. eg: [{"key":"name","op":"contains","val":"hub"}]

Reponse Attributes ​

status boolean ​

Indicates the result of the request to create virtual machine. true signifies success, while false indicates an error.

message string ​

A description of the status of the request.

total int ​

Total records count

data object ​

An array of objects containing information about the usage statements for all resources.

Child attributes ​
  • resource_id The ID for the resource.
  • resource_type The type of resource, vm for virtual machine, or volume for storage volumes.
  • status The status of the payment.
  • started_time
  • due_time
  • type
  • amount

Example ​

Request ​

curl -X GET '{API_URL}billing/resources/statements' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'refresh-token: {REFRESH_TOKEN}' \
-H 'Content-Type: application/json'

Response ​

{
    "status": true,
    "message": "Getting resources statement successful",
    "data": [
        {
            "id": "66d177596d0d0c262463c4f7",
            "resource_id": "66d175ce6d0d0c262463c3dd",
            "resource_type": "vm",
            "status": "paid",
            "started_time": 1725003272,
            "due_time": 1725003590,
            "type": "lease_fee",
            "amount": 2.5558
        },
        {
            "id": "66d137dce0ec6a5d1d8ad89e",
            "resource_id": "66d13748e0ec6a5d1d8ad82a",
            "resource_type": "vm",
            "status": "paid",
            "started_time": 1724987286,
            "due_time": 1724987341,
            "type": "lease_fee",
            "amount": 0.5112
        },
        {
            "id": "66d08cf0c0464845bb46e461",
            "resource_id": "66d08a01c0464845bb46e3af",
            "resource_type": "vm",
            "status": "paid",
            "started_time": 1724942899,
            "due_time": 1724943564,
            "type": "lease_fee",
            "amount": 5.6228
        }
    ],
    "total": 3
}