Retrieve list of GPUs in a VM
This topic explains how to retrieve a list of all Graphics Processing Unit (GPU) cards that are currently attached to a specific server within a Virtual Data Center (VDC). This API request is useful for auditing the resources of a server or verifying a successful GPU attachment.
Endpoint
Use the following endpoint for templates: https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/servers/{serverId}/gpus
Request
curl --location \
--request GET 'https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/servers/{serverId}/gpus' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJraWQiO' \
--header 'Content-Type: application/json'To make authenticated requests to the API, the following fields are mandatory in the request header:
Name
Type
Description
Authorization
string
The bearer token.
Content-Type
string
Must be application/json.
To make authenticated requests to the API, the following fields are mandatory in the request header:
Name
Type
Description
v6
string
The API version.
datacenterId
string
The ID of the Data Center where the VM is located.
serverId
string
The ID of the server, that is, the Cloud GPU VM.
You can refine your request by adding the optional query parameter depth.
Name
Type
Description
depth
integer
Template detail depth. Default value is 0.
Response
A successful request returns a 200 status code and a JSON collection containing a list of GPU resources attached to the specified server.
Last updated
Was this helpful?