Billing

List VM billing history

Returns billing history of virtual machine for the specified billing cycle. The response includes 'resource_name', 'infrahub_id', 'status', 'incurred_bill', 'usage_time', 'price_per_hour'.

get/billing/billing/history/virtual-machine

Request

  • Base URL: https://infrahub-api.nexgencloud.com/v1
  • URL: https://infrahub-api.nexgencloud.com/v1/billing/billing/history/virtual-machine
  • Auth: API key in header api_key

Query parameters

start_datestring required

Date should be formatted in YYYY-MM-DDTHH:MM:SS

end_datestring required

Date should be formatted in YYYY-MM-DDTHH:MM:SS

searchstring

Search by resource "Name" or "ID"

per_pageinteger

Number of items to return per page

pageinteger

Page number of results to return.

Response

Success

statusboolean

Whether the request succeeded.

messagestring

Human-readable description of the result.

Example response

{
  "message": "Billing History for Virtual Machine Retrieved Successfully.",
  "billing_history_vm": {
    "org_id": 7613,
    "billing_history": [
      {
        "attributes": {
          "id": "7e2d5a13-9c8b-4f1e-a420-3d6f8b9c0e15",
          "infrahub_id": 1402,
          "resource_name": "uimap-bucket-test",
          "status": "ACTIVE"
        },
        "metrics": {
          "incurred_bill": 1.4799118041992184e-11,
          "price_per_hour": 1.479911804199218e-10,
          "usage_time": 1680
        }
      }
    ],
    "total_count": 1,
    "pagination": {
      "per_page": 10,
      "page": 1,
      "pages": 1
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.