hostinger-api-sdk 2.14.2 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,272 @@
1
+ # GPUInstancesApi
2
+
3
+ All URIs are relative to *https://developers.hostinger.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**createInstanceV1**](#createinstancev1) | **POST** /api/gpu/v1/instances | Create instance|
8
+ |[**deleteInstanceV1**](#deleteinstancev1) | **DELETE** /api/gpu/v1/instances/{instanceId} | Delete instance|
9
+ |[**getInstanceDetailsV1**](#getinstancedetailsv1) | **GET** /api/gpu/v1/instances/{instanceId} | Get instance details|
10
+ |[**getInstanceMetricsV1**](#getinstancemetricsv1) | **GET** /api/gpu/v1/instances/{instanceId}/metrics | Get instance metrics|
11
+ |[**getInstancesV1**](#getinstancesv1) | **GET** /api/gpu/v1/instances | Get instances|
12
+
13
+ # **createInstanceV1**
14
+ > CommonSuccessEmptyResource createInstanceV1(gPUV1InstanceStoreRequest)
15
+
16
+ Create a new GPU instance. Pick `pool_instance_id` from the pool instance types list and `os_template_id` from the OS templates available for that instance type. Your account must have enough credits to run the instance for its first hour. The instance is created asynchronously: a successful request returns immediately, and the instance appears in the instance list while its `status` moves from `created` through `creating` to `running`. Use this endpoint to provision GPU compute.
17
+
18
+ ### Example
19
+
20
+ ```typescript
21
+ import {
22
+ GPUInstancesApi,
23
+ Configuration,
24
+ GPUV1InstanceStoreRequest
25
+ } from '@hostinger/sdk';
26
+
27
+ const configuration = new Configuration();
28
+ const apiInstance = new GPUInstancesApi(configuration);
29
+
30
+ let gPUV1InstanceStoreRequest: GPUV1InstanceStoreRequest; //
31
+
32
+ const { status, data } = await apiInstance.createInstanceV1(
33
+ gPUV1InstanceStoreRequest
34
+ );
35
+ ```
36
+
37
+ ### Parameters
38
+
39
+ |Name | Type | Description | Notes|
40
+ |------------- | ------------- | ------------- | -------------|
41
+ | **gPUV1InstanceStoreRequest** | **GPUV1InstanceStoreRequest**| | |
42
+
43
+
44
+ ### Return type
45
+
46
+ **CommonSuccessEmptyResource**
47
+
48
+ ### Authorization
49
+
50
+ [apiToken](../README.md#apiToken)
51
+
52
+ ### HTTP request headers
53
+
54
+ - **Content-Type**: application/json
55
+ - **Accept**: application/json
56
+
57
+
58
+ ### HTTP response details
59
+ | Status code | Description | Response headers |
60
+ |-------------|-------------|------------------|
61
+ |**200** | Success empty response | - |
62
+ |**422** | Validation error response | - |
63
+ |**401** | Unauthenticated response | - |
64
+ |**500** | Error response | - |
65
+
66
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
67
+
68
+ # **deleteInstanceV1**
69
+ > CommonSuccessEmptyResource deleteInstanceV1()
70
+
71
+ Delete a specified GPU instance. The instance is destroyed asynchronously: a successful request returns immediately and the instance `status` moves to `destroying`. Deleting fails while the instance is in `created`, `destroying`, `destroyed` or `abuse` status, or while another action is in progress on it. Use this endpoint to stop billing for a GPU instance you no longer need.
72
+
73
+ ### Example
74
+
75
+ ```typescript
76
+ import {
77
+ GPUInstancesApi,
78
+ Configuration
79
+ } from '@hostinger/sdk';
80
+
81
+ const configuration = new Configuration();
82
+ const apiInstance = new GPUInstancesApi(configuration);
83
+
84
+ let instanceId: number; //GPU instance ID (default to undefined)
85
+
86
+ const { status, data } = await apiInstance.deleteInstanceV1(
87
+ instanceId
88
+ );
89
+ ```
90
+
91
+ ### Parameters
92
+
93
+ |Name | Type | Description | Notes|
94
+ |------------- | ------------- | ------------- | -------------|
95
+ | **instanceId** | [**number**] | GPU instance ID | defaults to undefined|
96
+
97
+
98
+ ### Return type
99
+
100
+ **CommonSuccessEmptyResource**
101
+
102
+ ### Authorization
103
+
104
+ [apiToken](../README.md#apiToken)
105
+
106
+ ### HTTP request headers
107
+
108
+ - **Content-Type**: Not defined
109
+ - **Accept**: application/json
110
+
111
+
112
+ ### HTTP response details
113
+ | Status code | Description | Response headers |
114
+ |-------------|-------------|------------------|
115
+ |**200** | Success empty response | - |
116
+ |**401** | Unauthenticated response | - |
117
+ |**500** | Error response | - |
118
+
119
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
120
+
121
+ # **getInstanceDetailsV1**
122
+ > GPUV1InstanceInstanceResource getInstanceDetailsV1()
123
+
124
+ Retrieve detailed information about a specified GPU instance, including its SSH keys. Use this endpoint to follow the instance `status` after creating or deleting it.
125
+
126
+ ### Example
127
+
128
+ ```typescript
129
+ import {
130
+ GPUInstancesApi,
131
+ Configuration
132
+ } from '@hostinger/sdk';
133
+
134
+ const configuration = new Configuration();
135
+ const apiInstance = new GPUInstancesApi(configuration);
136
+
137
+ let instanceId: number; //GPU instance ID (default to undefined)
138
+
139
+ const { status, data } = await apiInstance.getInstanceDetailsV1(
140
+ instanceId
141
+ );
142
+ ```
143
+
144
+ ### Parameters
145
+
146
+ |Name | Type | Description | Notes|
147
+ |------------- | ------------- | ------------- | -------------|
148
+ | **instanceId** | [**number**] | GPU instance ID | defaults to undefined|
149
+
150
+
151
+ ### Return type
152
+
153
+ **GPUV1InstanceInstanceResource**
154
+
155
+ ### Authorization
156
+
157
+ [apiToken](../README.md#apiToken)
158
+
159
+ ### HTTP request headers
160
+
161
+ - **Content-Type**: Not defined
162
+ - **Accept**: application/json
163
+
164
+
165
+ ### HTTP response details
166
+ | Status code | Description | Response headers |
167
+ |-------------|-------------|------------------|
168
+ |**200** | Success response | - |
169
+ |**401** | Unauthenticated response | - |
170
+ |**500** | Error response | - |
171
+
172
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
173
+
174
+ # **getInstanceMetricsV1**
175
+ > Array<GPUV1MetricsMetricsResource> getInstanceMetricsV1()
176
+
177
+ Retrieve utilisation metrics of a specified GPU instance for the last hour. Each data point contains CPU, memory and GPU utilisation, used GPU memory and GPU throughput. The list is empty until the instance is provisioned. Use this endpoint to monitor GPU instance load.
178
+
179
+ ### Example
180
+
181
+ ```typescript
182
+ import {
183
+ GPUInstancesApi,
184
+ Configuration
185
+ } from '@hostinger/sdk';
186
+
187
+ const configuration = new Configuration();
188
+ const apiInstance = new GPUInstancesApi(configuration);
189
+
190
+ let instanceId: number; //GPU instance ID (default to undefined)
191
+
192
+ const { status, data } = await apiInstance.getInstanceMetricsV1(
193
+ instanceId
194
+ );
195
+ ```
196
+
197
+ ### Parameters
198
+
199
+ |Name | Type | Description | Notes|
200
+ |------------- | ------------- | ------------- | -------------|
201
+ | **instanceId** | [**number**] | GPU instance ID | defaults to undefined|
202
+
203
+
204
+ ### Return type
205
+
206
+ **Array<GPUV1MetricsMetricsResource>**
207
+
208
+ ### Authorization
209
+
210
+ [apiToken](../README.md#apiToken)
211
+
212
+ ### HTTP request headers
213
+
214
+ - **Content-Type**: Not defined
215
+ - **Accept**: application/json
216
+
217
+
218
+ ### HTTP response details
219
+ | Status code | Description | Response headers |
220
+ |-------------|-------------|------------------|
221
+ |**200** | Success response | - |
222
+ |**401** | Unauthenticated response | - |
223
+ |**500** | Error response | - |
224
+
225
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
226
+
227
+ # **getInstancesV1**
228
+ > Array<GPUV1InstanceInstanceListResource> getInstancesV1()
229
+
230
+ Retrieve all GPU instances of your account. Use this endpoint to view your GPU instances with their status, pool, instance type and OS template.
231
+
232
+ ### Example
233
+
234
+ ```typescript
235
+ import {
236
+ GPUInstancesApi,
237
+ Configuration
238
+ } from '@hostinger/sdk';
239
+
240
+ const configuration = new Configuration();
241
+ const apiInstance = new GPUInstancesApi(configuration);
242
+
243
+ const { status, data } = await apiInstance.getInstancesV1();
244
+ ```
245
+
246
+ ### Parameters
247
+ This endpoint does not have any parameters.
248
+
249
+
250
+ ### Return type
251
+
252
+ **Array<GPUV1InstanceInstanceListResource>**
253
+
254
+ ### Authorization
255
+
256
+ [apiToken](../README.md#apiToken)
257
+
258
+ ### HTTP request headers
259
+
260
+ - **Content-Type**: Not defined
261
+ - **Accept**: application/json
262
+
263
+
264
+ ### HTTP response details
265
+ | Status code | Description | Response headers |
266
+ |-------------|-------------|------------------|
267
+ |**200** | Success response | - |
268
+ |**401** | Unauthenticated response | - |
269
+ |**500** | Error response | - |
270
+
271
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
272
+
@@ -0,0 +1,32 @@
1
+ # GPUV1InstanceInstanceListResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | GPU instance ID | [optional] [default to undefined]
9
+ **name** | **string** | | [optional] [default to undefined]
10
+ **status** | **string** | | [optional] [default to undefined]
11
+ **action_lock** | **string** | Whether an action is in progress on the instance | [optional] [default to undefined]
12
+ **pool** | [**GPUV1PoolPoolResource**](GPUV1PoolPoolResource.md) | | [optional] [default to undefined]
13
+ **pool_instance** | [**GPUV1PoolPoolInstanceResource**](GPUV1PoolPoolInstanceResource.md) | | [optional] [default to undefined]
14
+ **os_template** | [**GPUV1OsTemplateOsTemplateResource**](GPUV1OsTemplateOsTemplateResource.md) | | [optional] [default to undefined]
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { GPUV1InstanceInstanceListResource } from '@hostinger/sdk';
20
+
21
+ const instance: GPUV1InstanceInstanceListResource = {
22
+ id,
23
+ name,
24
+ status,
25
+ action_lock,
26
+ pool,
27
+ pool_instance,
28
+ os_template,
29
+ };
30
+ ```
31
+
32
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,34 @@
1
+ # GPUV1InstanceInstanceResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | GPU instance ID | [optional] [default to undefined]
9
+ **name** | **string** | | [optional] [default to undefined]
10
+ **status** | **string** | | [optional] [default to undefined]
11
+ **action_lock** | **string** | Whether an action is in progress on the instance | [optional] [default to undefined]
12
+ **pool** | [**GPUV1PoolPoolResource**](GPUV1PoolPoolResource.md) | | [optional] [default to undefined]
13
+ **pool_instance** | [**GPUV1PoolPoolInstanceResource**](GPUV1PoolPoolInstanceResource.md) | | [optional] [default to undefined]
14
+ **os_template** | [**GPUV1OsTemplateOsTemplateResource**](GPUV1OsTemplateOsTemplateResource.md) | | [optional] [default to undefined]
15
+ **ssh_keys** | [**Array&lt;GPUV1SshKeySshKeyResource&gt;**](GPUV1SshKeySshKeyResource.md) | Array of [&#x60;GPU.V1.SshKey.SshKeyResource&#x60;](#model/gpuv1sshkeysshkeyresource) | [optional] [default to undefined]
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import { GPUV1InstanceInstanceResource } from '@hostinger/sdk';
21
+
22
+ const instance: GPUV1InstanceInstanceResource = {
23
+ id,
24
+ name,
25
+ status,
26
+ action_lock,
27
+ pool,
28
+ pool_instance,
29
+ os_template,
30
+ ssh_keys,
31
+ };
32
+ ```
33
+
34
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,26 @@
1
+ # GPUV1InstanceStoreRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **pool_instance_id** | **number** | Instance type ID from the pool instance types list | [default to undefined]
9
+ **os_template_id** | **number** | OS template ID available for the selected instance type | [default to undefined]
10
+ **name** | **string** | Instance name, unique among your instances. Letters, numbers, dashes and underscores only | [default to undefined]
11
+ **public_keys** | **Array&lt;string&gt;** | SSH public keys to add to the instance | [optional] [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { GPUV1InstanceStoreRequest } from '@hostinger/sdk';
17
+
18
+ const instance: GPUV1InstanceStoreRequest = {
19
+ pool_instance_id,
20
+ os_template_id,
21
+ name,
22
+ public_keys,
23
+ };
24
+ ```
25
+
26
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,30 @@
1
+ # GPUV1MetricsMetricsResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **timestamp** | **number** | Unix timestamp of the measurement | [optional] [default to undefined]
9
+ **cpu_percentage** | **number** | CPU utilisation in percent | [optional] [default to undefined]
10
+ **memory_used** | **number** | Used memory in bytes | [optional] [default to undefined]
11
+ **gpu_percentage** | **number** | GPU utilisation in percent | [optional] [default to undefined]
12
+ **gpu_memory_used** | **number** | Used GPU memory in bytes | [optional] [default to undefined]
13
+ **gpu_tflops** | **number** | GPU throughput in TFLOPS | [optional] [default to undefined]
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import { GPUV1MetricsMetricsResource } from '@hostinger/sdk';
19
+
20
+ const instance: GPUV1MetricsMetricsResource = {
21
+ timestamp,
22
+ cpu_percentage,
23
+ memory_used,
24
+ gpu_percentage,
25
+ gpu_memory_used,
26
+ gpu_tflops,
27
+ };
28
+ ```
29
+
30
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,24 @@
1
+ # GPUV1SshKeySshKeyResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | SSH key ID | [optional] [default to undefined]
9
+ **name** | **string** | | [optional] [default to undefined]
10
+ **public_key** | **string** | | [optional] [default to undefined]
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { GPUV1SshKeySshKeyResource } from '@hostinger/sdk';
16
+
17
+ const instance: GPUV1SshKeySshKeyResource = {
18
+ id,
19
+ name,
20
+ public_key,
21
+ };
22
+ ```
23
+
24
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.14.2
6
+ * API Version: 2.15.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-sdk",
3
- "version": "2.14.2",
3
+ "version": "2.15.0",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {