Retrieve Resource Statements
Access comprehensive financial records and billing statements for all resources, including transaction details, payment status, and temporal financial data.
HTTP Request
GET {API_URL}billing/resources/statements
Query Parameters
| Parameter | Requirement | Type | Description |
|---|---|---|---|
limit | Optional | int | Maximum number of records to return |
offset | Optional | int | Number of records to skip for pagination |
sortField | Optional | string | Field identifier for result ordering |
sortOrder | Optional | string | Sort direction: desc (descending) or asc (ascending) |
filters | Optional | string | JSON-encoded filter criteria. Format: [{"key":"name","op":"contains","val":"hub"}] |
Response Structure
status boolean
Operation result indicator. Returns true for successful execution, false when encountering an error.
message string
Descriptive response indicating the outcome of the statement retrieval request.
total int
Aggregate count of available records.
data object
Collection of financial statements containing detailed transaction records.
Statement Attributes
resource_idUnique resource identifierresource_typeResource classification (vmfor virtual machine,volumefor storage)statusTransaction statusstarted_timeBilling period commencement timestampdue_timePayment deadline timestamptypeTransaction classificationamountTransaction value
Implementation Example
Request
bash
curl -X GET '{API_URL}billing/resources/statements' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'refresh-token: {REFRESH_TOKEN}' \
-H 'Content-Type: application/json'Response
json
{
"status": true,
"message": "Financial statements retrieved successfully",
"data": [
{
"id": "673f36d51f746bcc4b52c4b9",
"resource_id": "66d08a01c0464845bb46e3af",
"resource_type": "vm",
"status": "paid",
"started_time": 1725003272,
"due_time": 1725003590,
"type": "lease_fee",
"amount": 2.5558
},
{
"id": "6743ddea9164b541082003b8",
"resource_id": "66d13748e0ec6a5d1d8ad82a",
"resource_type": "vm",
"status": "paid",
"started_time": 1724987286,
"due_time": 1724987341,
"type": "lease_fee",
"amount": 0.5112
},
{
"id": "6758eaceaa5d7e0971fc5337",
"resource_id": "66d175ce6d0d0c262463c3dd",
"resource_type": "vm",
"status": "paid",
"started_time": 1724942899,
"due_time": 1724943564,
"type": "lease_fee",
"amount": 5.6228
}
],
"total": 3
}
