hostinger-api-sdk 2.14.1 → 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.
- package/README.md +2 -2
- package/api.ts +684 -9
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +467 -9
- package/dist/api.js +432 -22
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +467 -9
- package/dist/esm/api.js +415 -9
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/GPUInstancesApi.md +272 -0
- package/docs/GPUV1InstanceInstanceListResource.md +32 -0
- package/docs/GPUV1InstanceInstanceResource.md +34 -0
- package/docs/GPUV1InstanceStoreRequest.md +26 -0
- package/docs/GPUV1MetricsMetricsResource.md +30 -0
- package/docs/GPUV1SshKeySshKeyResource.md +24 -0
- package/docs/HostingPocketBaseApi.md +2 -2
- package/docs/HostingV1PocketBaseBackendResource.md +4 -0
- package/docs/HostingV1PocketBaseInstanceResource.md +4 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 2.
|
|
7
|
+
* API Version: 2.15.0
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -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<GPUV1SshKeySshKeyResource>**](GPUV1SshKeySshKeyResource.md) | Array of [`GPU.V1.SshKey.SshKeyResource`](#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<string>** | 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)
|
|
@@ -136,7 +136,7 @@ const { status, data } = await apiInstance.deletePocketBaseBackendV1(
|
|
|
136
136
|
# **getPocketBaseBackendV1**
|
|
137
137
|
> HostingV1PocketBaseBackendResource getPocketBaseBackendV1()
|
|
138
138
|
|
|
139
|
-
Returns the PocketBase backend of a website: its REST API and dashboard URLs, live state and version. A PocketBase backend gives the website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain under `/api` and `/_`. Returns 404 when the website has no PocketBase backend. The superuser password is only shown once, when it is set, and is never returned here. If it is lost, set a new one with the `Set PocketBase superuser` endpoint. The instance sleeps when idle and wakes on the first request, so `asleep` is a normal state and the first call to a sleeping instance can take a few seconds. `starting`, `running` and `stopping` are healthy
|
|
139
|
+
Returns the PocketBase backend of a website: its REST API and dashboard URLs, live state and version. A PocketBase backend gives the website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain under `/api` and `/_`. Returns 404 when the website has no PocketBase backend. The superuser password is only shown once, when it is set, and is never returned here. If it is lost, set a new one with the `Set PocketBase superuser` endpoint. The instance sleeps when idle and wakes on the first request, so `asleep` is a normal state and the first call to a sleeping instance can take a few seconds. `starting`, `running` and `stopping` are healthy. `failed` means the last start did not succeed. Hostinger starts it again on its own after `retry_after_seconds`, and the data is intact: wait and call again, do not delete the backend. `failure_reason` says why: `process_limit` means the hosting account has no free process slots, usually because its Node.js apps are running. `unregistered` means the instance is broken. `missing` means its files are gone from the server, and creating the PocketBase backend again sets up a new, empty one. `state` is null when the server could not be reached; retry later. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
140
140
|
|
|
141
141
|
### Example
|
|
142
142
|
|
|
@@ -194,7 +194,7 @@ const { status, data } = await apiInstance.getPocketBaseBackendV1(
|
|
|
194
194
|
# **listAccountPocketBaseBackendsV1**
|
|
195
195
|
> Array<HostingV1PocketBaseInstanceResource> listAccountPocketBaseBackendsV1()
|
|
196
196
|
|
|
197
|
-
Lists the PocketBase backends of all websites of a hosting account with their URLs, live state, version and disk usage. A PocketBase backend gives a website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain. An empty list means no website of the account has a PocketBase backend. States: `asleep` is normal (the instance sleeps when idle and wakes on the first request); `starting`, `running` and `stopping` are healthy
|
|
197
|
+
Lists the PocketBase backends of all websites of a hosting account with their URLs, live state, version and disk usage. A PocketBase backend gives a website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain. An empty list means no website of the account has a PocketBase backend. States: `asleep` is normal (the instance sleeps when idle and wakes on the first request); `starting`, `running` and `stopping` are healthy. `failed` means the last start did not succeed. Hostinger starts it again on its own after `retry_after_seconds`, and the data is intact: wait and call again, do not delete the backend. `failure_reason` says why: `process_limit` means the hosting account has no free process slots, usually because its Node.js apps are running. `unregistered` means the instance is broken. `missing` means its files are gone from the server, and creating the PocketBase backend again sets up a new, empty one. `state` is null when the server could not be reached; retry later. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
198
198
|
|
|
199
199
|
### Example
|
|
200
200
|
|
|
@@ -10,6 +10,8 @@ Name | Type | Description | Notes
|
|
|
10
10
|
**api_url** | **string** | Base URL of the PocketBase REST API | [default to undefined]
|
|
11
11
|
**admin_url** | **string** | URL of the PocketBase dashboard | [default to undefined]
|
|
12
12
|
**state** | **string** | Live process state. The instance sleeps when idle and wakes on the first request. Null when the server could not be reached. | [default to undefined]
|
|
13
|
+
**failure_reason** | **string** | Why the last start did not succeed, set only while `state` is `failed`. `process_limit` means the hosting account has no free process slots, usually because its Node.js apps are running; `start_failed` is any other cause. | [default to undefined]
|
|
14
|
+
**retry_after_seconds** | **number** | Seconds until Hostinger tries to start the instance again, set only while `state` is `failed`. Null when the next try is due now. | [default to undefined]
|
|
13
15
|
**version** | **string** | PocketBase version | [default to undefined]
|
|
14
16
|
**next_steps** | **Array<string>** | What to do next with this backend | [default to undefined]
|
|
15
17
|
|
|
@@ -24,6 +26,8 @@ const instance: HostingV1PocketBaseBackendResource = {
|
|
|
24
26
|
api_url,
|
|
25
27
|
admin_url,
|
|
26
28
|
state,
|
|
29
|
+
failure_reason,
|
|
30
|
+
retry_after_seconds,
|
|
27
31
|
version,
|
|
28
32
|
next_steps,
|
|
29
33
|
};
|
|
@@ -10,6 +10,8 @@ Name | Type | Description | Notes
|
|
|
10
10
|
**api_url** | **string** | Base URL of the PocketBase REST API | [default to undefined]
|
|
11
11
|
**admin_url** | **string** | URL of the PocketBase dashboard | [default to undefined]
|
|
12
12
|
**state** | **string** | Live process state. The instance sleeps when idle and wakes on the first request. Null when the server could not be reached. | [default to undefined]
|
|
13
|
+
**failure_reason** | **string** | Why the last start did not succeed, set only while `state` is `failed`. `process_limit` means the hosting account has no free process slots, usually because its Node.js apps are running; `start_failed` is any other cause. | [default to undefined]
|
|
14
|
+
**retry_after_seconds** | **number** | Seconds until Hostinger tries to start the instance again, set only while `state` is `failed`. Null when the next try is due now. | [default to undefined]
|
|
13
15
|
**version** | **string** | PocketBase version | [default to undefined]
|
|
14
16
|
**disk_usage_kb** | **number** | Disk space used by the instance data, in KB | [default to undefined]
|
|
15
17
|
|
|
@@ -24,6 +26,8 @@ const instance: HostingV1PocketBaseInstanceResource = {
|
|
|
24
26
|
api_url,
|
|
25
27
|
admin_url,
|
|
26
28
|
state,
|
|
29
|
+
failure_reason,
|
|
30
|
+
retry_after_seconds,
|
|
27
31
|
version,
|
|
28
32
|
disk_usage_kb,
|
|
29
33
|
};
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 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
|