Retrieve Dashboard
GET https://infrahub-api.nexgencloud.com/v1/core/dashboard
Returns an overview of hardware and pricing information for your active resources, including virtual machines, containers, and volumes. For additional information on the Dashboard feature, click here.
Parameters
No parameters.
Attributes of the Dashboard object
status boolean
Indicates the success or failure of the retrieval of Dashboard information. In this case, it is set to true
, indicating that the dashboard information has been retrieved successfully.
message string
A message confirming the successful retrieval of dashboard information.
overview object
An object containing an overview of running resources, including; virtual machines, containers, and volumes.
Show child attributes
virtual_machine object
An object containing details about virtual machines in the overview.
Show child attributes
count integer
The number of virtual machines currently running.
vcpus integer
The total number of virtual CPUs across all running virtual machines.
gpus integer
The total number of GPUs across all running virtual machines.
ram integer
The total amount of RAM in gigabytes (GB) across all running virtual machines.
cost_per_hour number
The total cost per hour for running all virtual machines, e.g., $0.08 per hour.
container object
An object containing details about containers in the overview.
Show child attributes
count integer
The number of containers currently running.
vcpus integer
The total number of virtual CPUs across all running containers.
gpus integer
The total number of GPUs across all running containers.
ram integer
The total amount of RAM in gigabytes (GB) across all running containers.
cost_per_hour number
The total cost per hour for running all containers.
volume object
An object containing details about volumes in the overview.
curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/dashboard" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
{
"status": true,
"message": "Getting dashboard info success",
"overview": {
"virtual_machine": {
"count": 2,
"vcpus": 2,
"gpus": 2,
"ram": 1,
"cost_per_hour": 0.08
},
"container": {
"count": 0,
"vcpus": 0,
"gpus": 0,
"ram": 0,
"cost_per_hour": 0
},
"volume": {
"count": 1,
"using": 1,
"cost_per_hour": 0
}
}
}
Returns
Returns the status of the dashboard information retrieval, along with an accompanying message that explains the status. The response also includes an overview
object containing virtual_machine
, container
, and volume
objects. Each of these objects contains configuration details and hourly cost information. Any other response indicates an error.
This response indicates that there are currently "2" active virtual machines that use: "2" CPUs, "2" GPUs, and "1" GB of RAM, with a total hourly cost of "$0.08". There is also "1" volume, that is currently in use, with an hourly of $"0.00". No containers are currently In use.