Skip to content

Latest commit

 

History

History
60 lines (39 loc) · 1.55 KB

GpuApi.md

File metadata and controls

60 lines (39 loc) · 1.55 KB

HyperstackApi.GpuApi

All URIs are relative to https://infrahub-api.nexgencloud.com/v1

Method HTTP request Description
listGpus GET /core/gpus List GPUs

listGpus

GPUList listGpus()

List GPUs

Returns a list of all available GPUs that can be utilized in the creation of custom virtual machine configurations.

Example

import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: accessToken
let accessToken = defaultClient.authentications['accessToken'];
accessToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//accessToken.apiKeyPrefix = 'Token';

let apiInstance = new HyperstackApi.GpuApi();
apiInstance.listGpus().then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

GPUList

Authorization

apiKey, accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json