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

Note: The following request contains sample values. Remember to replace them with the relevant information.

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.

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?