hostinger-api-sdk 0.0.9 → 0.0.10

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.
Files changed (119) hide show
  1. package/README.md +2 -2
  2. package/api.ts +1777 -215
  3. package/base.ts +1 -1
  4. package/common.ts +1 -1
  5. package/configuration.ts +2 -2
  6. package/dist/api.d.ts +1097 -164
  7. package/dist/api.js +1170 -37
  8. package/dist/base.d.ts +1 -1
  9. package/dist/base.js +1 -1
  10. package/dist/common.d.ts +1 -1
  11. package/dist/common.js +1 -1
  12. package/dist/configuration.d.ts +1 -1
  13. package/dist/configuration.js +2 -2
  14. package/dist/esm/api.d.ts +1097 -164
  15. package/dist/esm/api.js +1155 -31
  16. package/dist/esm/base.d.ts +1 -1
  17. package/dist/esm/base.js +1 -1
  18. package/dist/esm/common.d.ts +1 -1
  19. package/dist/esm/common.js +1 -1
  20. package/dist/esm/configuration.d.ts +1 -1
  21. package/dist/esm/configuration.js +2 -2
  22. package/dist/esm/index.d.ts +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +1 -1
  26. package/docs/BillingCatalogApi.md +54 -0
  27. package/docs/BillingOrdersApi.md +63 -0
  28. package/docs/BillingPaymentMethodsApi.md +162 -0
  29. package/docs/BillingSubscriptionsApi.md +113 -0
  30. package/docs/BillingV1CatalogCatalogItemPriceResource.md +32 -0
  31. package/docs/BillingV1CatalogCatalogItemResource.md +26 -0
  32. package/docs/BillingV1OrderOrderBillingAddressResource.md +40 -0
  33. package/docs/BillingV1OrderOrderResource.md +36 -0
  34. package/docs/BillingV1OrderStoreRequest.md +24 -0
  35. package/docs/BillingV1OrderStoreRequestItemsInner.md +22 -0
  36. package/docs/BillingV1PaymentMethodPaymentMethodResource.md +36 -0
  37. package/docs/BillingV1SubscriptionCancelRequest.md +22 -0
  38. package/docs/BillingV1SubscriptionSubscriptionResource.md +42 -0
  39. package/docs/CommonSchemaErrorResponseSchema.md +22 -0
  40. package/docs/CommonSchemaPaginationMetaSchema.md +24 -0
  41. package/docs/CommonSchemaUnauthorizedResponseSchema.md +22 -0
  42. package/docs/CommonSchemaUnprocessableContentResponseSchema.md +24 -0
  43. package/docs/CommonSchemaUnprocessableContentResponseSchemaErrors.md +22 -0
  44. package/docs/CommonSuccessEmptyResource.md +20 -0
  45. package/docs/DNSSnapshotApi.md +175 -0
  46. package/docs/DNSV1SnapshotSnapshotResource.md +24 -0
  47. package/docs/DNSV1SnapshotSnapshotWithContentResource.md +26 -0
  48. package/docs/DNSV1ZoneDestroyRequest.md +20 -0
  49. package/docs/DNSV1ZoneDestroyRequestFiltersInner.md +22 -0
  50. package/docs/DNSV1ZoneNameRecordResource.md +22 -0
  51. package/docs/DNSV1ZoneRecordResource.md +26 -0
  52. package/docs/DNSV1ZoneResetRequest.md +24 -0
  53. package/docs/DNSV1ZoneUpdateRequest.md +22 -0
  54. package/docs/DNSV1ZoneUpdateRequestZoneInner.md +26 -0
  55. package/docs/DNSV1ZoneUpdateRequestZoneInnerRecordsInner.md +20 -0
  56. package/docs/DNSZoneApi.md +297 -0
  57. package/docs/DomainsAvailabilityApi.md +63 -0
  58. package/docs/DomainsForwardingApi.md +171 -0
  59. package/docs/DomainsPortfolioApi.md +439 -0
  60. package/docs/DomainsV1AvailabilityAvailabilityRequest.md +24 -0
  61. package/docs/DomainsV1AvailabilityAvailabilityResource.md +26 -0
  62. package/docs/DomainsV1DomainDomainExtendedResource.md +48 -0
  63. package/docs/DomainsV1DomainDomainExtendedResourceDomainContacts.md +27 -0
  64. package/docs/DomainsV1DomainDomainExtendedResourceNameServers.md +23 -0
  65. package/docs/DomainsV1DomainDomainResource.md +30 -0
  66. package/docs/DomainsV1ForwardingForwardingResource.md +28 -0
  67. package/docs/DomainsV1ForwardingStoreRequest.md +24 -0
  68. package/docs/DomainsV1PortfolioPurchaseRequest.md +30 -0
  69. package/docs/DomainsV1PortfolioPurchaseRequestDomainContacts.md +27 -0
  70. package/docs/DomainsV1PortfolioUpdateNameserversRequest.md +26 -0
  71. package/docs/DomainsV1WHOISProfileResource.md +34 -0
  72. package/docs/DomainsV1WHOISStoreRequest.md +28 -0
  73. package/docs/DomainsWHOISApi.md +279 -0
  74. package/docs/VPSActionsApi.md +121 -0
  75. package/docs/VPSBackupsApi.md +178 -0
  76. package/docs/VPSDataCentersApi.md +54 -0
  77. package/docs/VPSFirewallApi.md +577 -0
  78. package/docs/VPSGetActionListV1200Response.md +22 -0
  79. package/docs/VPSGetBackupListV1200Response.md +22 -0
  80. package/docs/VPSGetFirewallListV1200Response.md +22 -0
  81. package/docs/VPSGetPostInstallScriptListV1200Response.md +22 -0
  82. package/docs/VPSGetPublicKeyListV1200Response.md +22 -0
  83. package/docs/VPSMalwareScannerApi.md +172 -0
  84. package/docs/VPSOSTemplatesApi.md +108 -0
  85. package/docs/VPSPTRRecordsApi.md +115 -0
  86. package/docs/VPSPostInstallScriptsApi.md +284 -0
  87. package/docs/VPSPublicKeysApi.md +230 -0
  88. package/docs/VPSRecoveryApi.md +120 -0
  89. package/docs/VPSSnapshotsApi.md +223 -0
  90. package/docs/VPSV1ActionActionResource.md +28 -0
  91. package/docs/VPSV1BackupBackupResource.md +24 -0
  92. package/docs/VPSV1DataCenterDataCenterResource.md +28 -0
  93. package/docs/VPSV1FirewallFirewallResource.md +30 -0
  94. package/docs/VPSV1FirewallFirewallRuleResource.md +30 -0
  95. package/docs/VPSV1FirewallRulesStoreRequest.md +26 -0
  96. package/docs/VPSV1FirewallStoreRequest.md +20 -0
  97. package/docs/VPSV1IPAddressIPAddressResource.md +24 -0
  98. package/docs/VPSV1MalwareMetricsResource.md +30 -0
  99. package/docs/VPSV1MetricsMetricsCollection.md +30 -0
  100. package/docs/VPSV1MetricsMetricsResource.md +22 -0
  101. package/docs/VPSV1PostInstallScriptPostInstallScriptResource.md +28 -0
  102. package/docs/VPSV1PostInstallScriptStoreRequest.md +22 -0
  103. package/docs/VPSV1PublicKeyAttachRequest.md +20 -0
  104. package/docs/VPSV1PublicKeyPublicKeyResource.md +24 -0
  105. package/docs/VPSV1PublicKeyStoreRequest.md +22 -0
  106. package/docs/VPSV1SnapshotSnapshotResource.md +24 -0
  107. package/docs/VPSV1TemplateTemplateResource.md +26 -0
  108. package/docs/VPSV1VirtualMachineHostnameUpdateRequest.md +20 -0
  109. package/docs/VPSV1VirtualMachineNameserversUpdateRequest.md +22 -0
  110. package/docs/VPSV1VirtualMachinePanelPasswordUpdateRequest.md +20 -0
  111. package/docs/VPSV1VirtualMachineRecoveryStartRequest.md +20 -0
  112. package/docs/VPSV1VirtualMachineRecreateRequest.md +24 -0
  113. package/docs/VPSV1VirtualMachineRootPasswordUpdateRequest.md +20 -0
  114. package/docs/VPSV1VirtualMachineSetupRequest.md +38 -0
  115. package/docs/VPSV1VirtualMachineSetupRequestPublicKey.md +22 -0
  116. package/docs/VPSV1VirtualMachineVirtualMachineResource.md +52 -0
  117. package/docs/VPSVirtualMachineApi.md +796 -0
  118. package/index.ts +1 -1
  119. package/package.json +1 -1
@@ -0,0 +1,796 @@
1
+ # VPSVirtualMachineApi
2
+
3
+ All URIs are relative to *https://developers.hostinger.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**getAttachedPublicKeysV1**](#getattachedpublickeysv1) | **GET** /api/vps/v1/virtual-machines/{virtualMachineId}/public-keys | Get attached public keys|
8
+ |[**getMetricsV1**](#getmetricsv1) | **GET** /api/vps/v1/virtual-machines/{virtualMachineId}/metrics | Get metrics|
9
+ |[**getVirtualMachineListV1**](#getvirtualmachinelistv1) | **GET** /api/vps/v1/virtual-machines | Get virtual machine list|
10
+ |[**getVirtualMachineV1**](#getvirtualmachinev1) | **GET** /api/vps/v1/virtual-machines/{virtualMachineId} | Get virtual machine|
11
+ |[**recreateVirtualMachineV1**](#recreatevirtualmachinev1) | **POST** /api/vps/v1/virtual-machines/{virtualMachineId}/recreate | Recreate virtual machine|
12
+ |[**resetHostnameV1**](#resethostnamev1) | **DELETE** /api/vps/v1/virtual-machines/{virtualMachineId}/hostname | Reset hostname|
13
+ |[**restartVirtualMachineV1**](#restartvirtualmachinev1) | **POST** /api/vps/v1/virtual-machines/{virtualMachineId}/restart | Restart virtual machine|
14
+ |[**setHostnameV1**](#sethostnamev1) | **PUT** /api/vps/v1/virtual-machines/{virtualMachineId}/hostname | Set hostname|
15
+ |[**setNameserversV1**](#setnameserversv1) | **PUT** /api/vps/v1/virtual-machines/{virtualMachineId}/nameservers | Set nameservers|
16
+ |[**setPanelPasswordV1**](#setpanelpasswordv1) | **PUT** /api/vps/v1/virtual-machines/{virtualMachineId}/panel-password | Set panel password|
17
+ |[**setRootPasswordV1**](#setrootpasswordv1) | **PUT** /api/vps/v1/virtual-machines/{virtualMachineId}/root-password | Set root password|
18
+ |[**setupNewVirtualMachineV1**](#setupnewvirtualmachinev1) | **POST** /api/vps/v1/virtual-machines/{virtualMachineId}/setup | Setup new virtual machine|
19
+ |[**startVirtualMachineV1**](#startvirtualmachinev1) | **POST** /api/vps/v1/virtual-machines/{virtualMachineId}/start | Start virtual machine|
20
+ |[**stopVirtualMachineV1**](#stopvirtualmachinev1) | **POST** /api/vps/v1/virtual-machines/{virtualMachineId}/stop | Stop virtual machine|
21
+
22
+ # **getAttachedPublicKeysV1**
23
+ > VPSGetPublicKeyListV1200Response getAttachedPublicKeysV1()
24
+
25
+ This endpoint retrieves a list of public keys attached to a specified virtual machine.
26
+
27
+ ### Example
28
+
29
+ ```typescript
30
+ import {
31
+ VPSVirtualMachineApi,
32
+ Configuration
33
+ } from 'hostinger-api-sdk';
34
+
35
+ const configuration = new Configuration();
36
+ const apiInstance = new VPSVirtualMachineApi(configuration);
37
+
38
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
39
+ let page: number; //Page number (optional) (default to undefined)
40
+
41
+ const { status, data } = await apiInstance.getAttachedPublicKeysV1(
42
+ virtualMachineId,
43
+ page
44
+ );
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+ |Name | Type | Description | Notes|
50
+ |------------- | ------------- | ------------- | -------------|
51
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
52
+ | **page** | [**number**] | Page number | (optional) defaults to undefined|
53
+
54
+
55
+ ### Return type
56
+
57
+ **VPSGetPublicKeyListV1200Response**
58
+
59
+ ### Authorization
60
+
61
+ [apiToken](../README.md#apiToken)
62
+
63
+ ### HTTP request headers
64
+
65
+ - **Content-Type**: Not defined
66
+ - **Accept**: application/json
67
+
68
+
69
+ ### HTTP response details
70
+ | Status code | Description | Response headers |
71
+ |-------------|-------------|------------------|
72
+ |**200** | Success response | - |
73
+ |**401** | Unauthenticated | - |
74
+ |**500** | Error response | - |
75
+
76
+ [[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)
77
+
78
+ # **getMetricsV1**
79
+ > VPSV1MetricsMetricsCollection getMetricsV1()
80
+
81
+ This endpoint retrieves the historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime
82
+
83
+ ### Example
84
+
85
+ ```typescript
86
+ import {
87
+ VPSVirtualMachineApi,
88
+ Configuration
89
+ } from 'hostinger-api-sdk';
90
+
91
+ const configuration = new Configuration();
92
+ const apiInstance = new VPSVirtualMachineApi(configuration);
93
+
94
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
95
+ let dateFrom: string; //the date-time notation as defined by RFC 3339, section 5.6 (default to undefined)
96
+ let dateTo: string; //the date-time notation as defined by RFC 3339, section 5.6 (default to undefined)
97
+
98
+ const { status, data } = await apiInstance.getMetricsV1(
99
+ virtualMachineId,
100
+ dateFrom,
101
+ dateTo
102
+ );
103
+ ```
104
+
105
+ ### Parameters
106
+
107
+ |Name | Type | Description | Notes|
108
+ |------------- | ------------- | ------------- | -------------|
109
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
110
+ | **dateFrom** | [**string**] | the date-time notation as defined by RFC 3339, section 5.6 | defaults to undefined|
111
+ | **dateTo** | [**string**] | the date-time notation as defined by RFC 3339, section 5.6 | defaults to undefined|
112
+
113
+
114
+ ### Return type
115
+
116
+ **VPSV1MetricsMetricsCollection**
117
+
118
+ ### Authorization
119
+
120
+ [apiToken](../README.md#apiToken)
121
+
122
+ ### HTTP request headers
123
+
124
+ - **Content-Type**: Not defined
125
+ - **Accept**: application/json
126
+
127
+
128
+ ### HTTP response details
129
+ | Status code | Description | Response headers |
130
+ |-------------|-------------|------------------|
131
+ |**200** | Success response | - |
132
+ |**422** | Validation error response | - |
133
+ |**401** | Unauthenticated | - |
134
+ |**500** | Error response | - |
135
+
136
+ [[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)
137
+
138
+ # **getVirtualMachineListV1**
139
+ > Array<VPSV1VirtualMachineVirtualMachineResource> getVirtualMachineListV1()
140
+
141
+ This endpoint retrieves a list of all available virtual machines.
142
+
143
+ ### Example
144
+
145
+ ```typescript
146
+ import {
147
+ VPSVirtualMachineApi,
148
+ Configuration
149
+ } from 'hostinger-api-sdk';
150
+
151
+ const configuration = new Configuration();
152
+ const apiInstance = new VPSVirtualMachineApi(configuration);
153
+
154
+ const { status, data } = await apiInstance.getVirtualMachineListV1();
155
+ ```
156
+
157
+ ### Parameters
158
+ This endpoint does not have any parameters.
159
+
160
+
161
+ ### Return type
162
+
163
+ **Array<VPSV1VirtualMachineVirtualMachineResource>**
164
+
165
+ ### Authorization
166
+
167
+ [apiToken](../README.md#apiToken)
168
+
169
+ ### HTTP request headers
170
+
171
+ - **Content-Type**: Not defined
172
+ - **Accept**: application/json
173
+
174
+
175
+ ### HTTP response details
176
+ | Status code | Description | Response headers |
177
+ |-------------|-------------|------------------|
178
+ |**200** | Success response | - |
179
+ |**401** | Unauthenticated | - |
180
+ |**500** | Error response | - |
181
+
182
+ [[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)
183
+
184
+ # **getVirtualMachineV1**
185
+ > VPSV1VirtualMachineVirtualMachineResource getVirtualMachineV1()
186
+
187
+ This endpoint retrieves detailed information about a specified virtual machine.
188
+
189
+ ### Example
190
+
191
+ ```typescript
192
+ import {
193
+ VPSVirtualMachineApi,
194
+ Configuration
195
+ } from 'hostinger-api-sdk';
196
+
197
+ const configuration = new Configuration();
198
+ const apiInstance = new VPSVirtualMachineApi(configuration);
199
+
200
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
201
+
202
+ const { status, data } = await apiInstance.getVirtualMachineV1(
203
+ virtualMachineId
204
+ );
205
+ ```
206
+
207
+ ### Parameters
208
+
209
+ |Name | Type | Description | Notes|
210
+ |------------- | ------------- | ------------- | -------------|
211
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
212
+
213
+
214
+ ### Return type
215
+
216
+ **VPSV1VirtualMachineVirtualMachineResource**
217
+
218
+ ### Authorization
219
+
220
+ [apiToken](../README.md#apiToken)
221
+
222
+ ### HTTP request headers
223
+
224
+ - **Content-Type**: Not defined
225
+ - **Accept**: application/json
226
+
227
+
228
+ ### HTTP response details
229
+ | Status code | Description | Response headers |
230
+ |-------------|-------------|------------------|
231
+ |**200** | Success response | - |
232
+ |**401** | Unauthenticated | - |
233
+ |**500** | Error response | - |
234
+
235
+ [[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)
236
+
237
+ # **recreateVirtualMachineV1**
238
+ > VPSV1ActionActionResource recreateVirtualMachineV1(vPSV1VirtualMachineRecreateRequest)
239
+
240
+ This endpoint will recreate a virtual machine from scratch. The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. Snapshots, if there are any, will be deleted. ## Password Requirements Password will be checked against leaked password databases. Requirements for the password are: - At least 8 characters long - At least one uppercase letter - At least one lowercase letter - At least one number - Is not leaked publicly **This operation is irreversible and will result in the loss of all data stored on the virtual machine!**
241
+
242
+ ### Example
243
+
244
+ ```typescript
245
+ import {
246
+ VPSVirtualMachineApi,
247
+ Configuration,
248
+ VPSV1VirtualMachineRecreateRequest
249
+ } from 'hostinger-api-sdk';
250
+
251
+ const configuration = new Configuration();
252
+ const apiInstance = new VPSVirtualMachineApi(configuration);
253
+
254
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
255
+ let vPSV1VirtualMachineRecreateRequest: VPSV1VirtualMachineRecreateRequest; //
256
+
257
+ const { status, data } = await apiInstance.recreateVirtualMachineV1(
258
+ virtualMachineId,
259
+ vPSV1VirtualMachineRecreateRequest
260
+ );
261
+ ```
262
+
263
+ ### Parameters
264
+
265
+ |Name | Type | Description | Notes|
266
+ |------------- | ------------- | ------------- | -------------|
267
+ | **vPSV1VirtualMachineRecreateRequest** | **VPSV1VirtualMachineRecreateRequest**| | |
268
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
269
+
270
+
271
+ ### Return type
272
+
273
+ **VPSV1ActionActionResource**
274
+
275
+ ### Authorization
276
+
277
+ [apiToken](../README.md#apiToken)
278
+
279
+ ### HTTP request headers
280
+
281
+ - **Content-Type**: application/json
282
+ - **Accept**: application/json
283
+
284
+
285
+ ### HTTP response details
286
+ | Status code | Description | Response headers |
287
+ |-------------|-------------|------------------|
288
+ |**200** | Success response | - |
289
+ |**422** | Validation error response | - |
290
+ |**401** | Unauthenticated | - |
291
+ |**500** | Error response | - |
292
+
293
+ [[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)
294
+
295
+ # **resetHostnameV1**
296
+ > VPSV1ActionActionResource resetHostnameV1()
297
+
298
+ This endpoint resets the hostname and PTR record of a specified virtual machine to the default value.
299
+
300
+ ### Example
301
+
302
+ ```typescript
303
+ import {
304
+ VPSVirtualMachineApi,
305
+ Configuration
306
+ } from 'hostinger-api-sdk';
307
+
308
+ const configuration = new Configuration();
309
+ const apiInstance = new VPSVirtualMachineApi(configuration);
310
+
311
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
312
+
313
+ const { status, data } = await apiInstance.resetHostnameV1(
314
+ virtualMachineId
315
+ );
316
+ ```
317
+
318
+ ### Parameters
319
+
320
+ |Name | Type | Description | Notes|
321
+ |------------- | ------------- | ------------- | -------------|
322
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
323
+
324
+
325
+ ### Return type
326
+
327
+ **VPSV1ActionActionResource**
328
+
329
+ ### Authorization
330
+
331
+ [apiToken](../README.md#apiToken)
332
+
333
+ ### HTTP request headers
334
+
335
+ - **Content-Type**: Not defined
336
+ - **Accept**: application/json
337
+
338
+
339
+ ### HTTP response details
340
+ | Status code | Description | Response headers |
341
+ |-------------|-------------|------------------|
342
+ |**200** | Success response | - |
343
+ |**401** | Unauthenticated | - |
344
+ |**500** | Error response | - |
345
+
346
+ [[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)
347
+
348
+ # **restartVirtualMachineV1**
349
+ > VPSV1ActionActionResource restartVirtualMachineV1()
350
+
351
+ This endpoint restarts a specified virtual machine. This is equivalent to fully stopping and starting the virtual machine. If the virtual machine was stopped, it will be started.
352
+
353
+ ### Example
354
+
355
+ ```typescript
356
+ import {
357
+ VPSVirtualMachineApi,
358
+ Configuration
359
+ } from 'hostinger-api-sdk';
360
+
361
+ const configuration = new Configuration();
362
+ const apiInstance = new VPSVirtualMachineApi(configuration);
363
+
364
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
365
+
366
+ const { status, data } = await apiInstance.restartVirtualMachineV1(
367
+ virtualMachineId
368
+ );
369
+ ```
370
+
371
+ ### Parameters
372
+
373
+ |Name | Type | Description | Notes|
374
+ |------------- | ------------- | ------------- | -------------|
375
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
376
+
377
+
378
+ ### Return type
379
+
380
+ **VPSV1ActionActionResource**
381
+
382
+ ### Authorization
383
+
384
+ [apiToken](../README.md#apiToken)
385
+
386
+ ### HTTP request headers
387
+
388
+ - **Content-Type**: Not defined
389
+ - **Accept**: application/json
390
+
391
+
392
+ ### HTTP response details
393
+ | Status code | Description | Response headers |
394
+ |-------------|-------------|------------------|
395
+ |**200** | Success response | - |
396
+ |**401** | Unauthenticated | - |
397
+ |**500** | Error response | - |
398
+
399
+ [[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)
400
+
401
+ # **setHostnameV1**
402
+ > VPSV1ActionActionResource setHostnameV1(vPSV1VirtualMachineHostnameUpdateRequest)
403
+
404
+ This endpoint sets the hostname for a specified virtual machine. Changing hostname does not update PTR record automatically. If you want your virtual machine to be reachable by a hostname, you need to point your domain A/AAAA records to virtual machine IP as well.
405
+
406
+ ### Example
407
+
408
+ ```typescript
409
+ import {
410
+ VPSVirtualMachineApi,
411
+ Configuration,
412
+ VPSV1VirtualMachineHostnameUpdateRequest
413
+ } from 'hostinger-api-sdk';
414
+
415
+ const configuration = new Configuration();
416
+ const apiInstance = new VPSVirtualMachineApi(configuration);
417
+
418
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
419
+ let vPSV1VirtualMachineHostnameUpdateRequest: VPSV1VirtualMachineHostnameUpdateRequest; //
420
+
421
+ const { status, data } = await apiInstance.setHostnameV1(
422
+ virtualMachineId,
423
+ vPSV1VirtualMachineHostnameUpdateRequest
424
+ );
425
+ ```
426
+
427
+ ### Parameters
428
+
429
+ |Name | Type | Description | Notes|
430
+ |------------- | ------------- | ------------- | -------------|
431
+ | **vPSV1VirtualMachineHostnameUpdateRequest** | **VPSV1VirtualMachineHostnameUpdateRequest**| | |
432
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
433
+
434
+
435
+ ### Return type
436
+
437
+ **VPSV1ActionActionResource**
438
+
439
+ ### Authorization
440
+
441
+ [apiToken](../README.md#apiToken)
442
+
443
+ ### HTTP request headers
444
+
445
+ - **Content-Type**: application/json
446
+ - **Accept**: application/json
447
+
448
+
449
+ ### HTTP response details
450
+ | Status code | Description | Response headers |
451
+ |-------------|-------------|------------------|
452
+ |**200** | Success response | - |
453
+ |**422** | Validation error response | - |
454
+ |**401** | Unauthenticated | - |
455
+ |**500** | Error response | - |
456
+
457
+ [[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)
458
+
459
+ # **setNameserversV1**
460
+ > VPSV1ActionActionResource setNameserversV1(vPSV1VirtualMachineNameserversUpdateRequest)
461
+
462
+ This endpoint sets the nameservers for a specified virtual machine. Be aware, that improper nameserver configuration can lead to the virtual machine being unable to resolve domain names.
463
+
464
+ ### Example
465
+
466
+ ```typescript
467
+ import {
468
+ VPSVirtualMachineApi,
469
+ Configuration,
470
+ VPSV1VirtualMachineNameserversUpdateRequest
471
+ } from 'hostinger-api-sdk';
472
+
473
+ const configuration = new Configuration();
474
+ const apiInstance = new VPSVirtualMachineApi(configuration);
475
+
476
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
477
+ let vPSV1VirtualMachineNameserversUpdateRequest: VPSV1VirtualMachineNameserversUpdateRequest; //
478
+
479
+ const { status, data } = await apiInstance.setNameserversV1(
480
+ virtualMachineId,
481
+ vPSV1VirtualMachineNameserversUpdateRequest
482
+ );
483
+ ```
484
+
485
+ ### Parameters
486
+
487
+ |Name | Type | Description | Notes|
488
+ |------------- | ------------- | ------------- | -------------|
489
+ | **vPSV1VirtualMachineNameserversUpdateRequest** | **VPSV1VirtualMachineNameserversUpdateRequest**| | |
490
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
491
+
492
+
493
+ ### Return type
494
+
495
+ **VPSV1ActionActionResource**
496
+
497
+ ### Authorization
498
+
499
+ [apiToken](../README.md#apiToken)
500
+
501
+ ### HTTP request headers
502
+
503
+ - **Content-Type**: application/json
504
+ - **Accept**: application/json
505
+
506
+
507
+ ### HTTP response details
508
+ | Status code | Description | Response headers |
509
+ |-------------|-------------|------------------|
510
+ |**200** | Success response | - |
511
+ |**422** | Validation error response | - |
512
+ |**401** | Unauthenticated | - |
513
+ |**500** | Error response | - |
514
+
515
+ [[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)
516
+
517
+ # **setPanelPasswordV1**
518
+ > VPSV1ActionActionResource setPanelPasswordV1(vPSV1VirtualMachinePanelPasswordUpdateRequest)
519
+
520
+ This endpoint sets the panel password for a specified virtual machine. If virtual machine does not use panel OS, the request will still be processed without any effect. Requirements for the password is the same as in the [recreate virtual machine endpoint](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines/{virtualMachineId}/recreate).
521
+
522
+ ### Example
523
+
524
+ ```typescript
525
+ import {
526
+ VPSVirtualMachineApi,
527
+ Configuration,
528
+ VPSV1VirtualMachinePanelPasswordUpdateRequest
529
+ } from 'hostinger-api-sdk';
530
+
531
+ const configuration = new Configuration();
532
+ const apiInstance = new VPSVirtualMachineApi(configuration);
533
+
534
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
535
+ let vPSV1VirtualMachinePanelPasswordUpdateRequest: VPSV1VirtualMachinePanelPasswordUpdateRequest; //
536
+
537
+ const { status, data } = await apiInstance.setPanelPasswordV1(
538
+ virtualMachineId,
539
+ vPSV1VirtualMachinePanelPasswordUpdateRequest
540
+ );
541
+ ```
542
+
543
+ ### Parameters
544
+
545
+ |Name | Type | Description | Notes|
546
+ |------------- | ------------- | ------------- | -------------|
547
+ | **vPSV1VirtualMachinePanelPasswordUpdateRequest** | **VPSV1VirtualMachinePanelPasswordUpdateRequest**| | |
548
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
549
+
550
+
551
+ ### Return type
552
+
553
+ **VPSV1ActionActionResource**
554
+
555
+ ### Authorization
556
+
557
+ [apiToken](../README.md#apiToken)
558
+
559
+ ### HTTP request headers
560
+
561
+ - **Content-Type**: application/json
562
+ - **Accept**: application/json
563
+
564
+
565
+ ### HTTP response details
566
+ | Status code | Description | Response headers |
567
+ |-------------|-------------|------------------|
568
+ |**200** | Success response | - |
569
+ |**422** | Validation error response | - |
570
+ |**401** | Unauthenticated | - |
571
+ |**500** | Error response | - |
572
+
573
+ [[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)
574
+
575
+ # **setRootPasswordV1**
576
+ > VPSV1ActionActionResource setRootPasswordV1(vPSV1VirtualMachineRootPasswordUpdateRequest)
577
+
578
+ This endpoint sets the root password for a specified virtual machine. Requirements for the password is the same as in the [recreate virtual machine endpoint](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines/{virtualMachineId}/recreate).
579
+
580
+ ### Example
581
+
582
+ ```typescript
583
+ import {
584
+ VPSVirtualMachineApi,
585
+ Configuration,
586
+ VPSV1VirtualMachineRootPasswordUpdateRequest
587
+ } from 'hostinger-api-sdk';
588
+
589
+ const configuration = new Configuration();
590
+ const apiInstance = new VPSVirtualMachineApi(configuration);
591
+
592
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
593
+ let vPSV1VirtualMachineRootPasswordUpdateRequest: VPSV1VirtualMachineRootPasswordUpdateRequest; //
594
+
595
+ const { status, data } = await apiInstance.setRootPasswordV1(
596
+ virtualMachineId,
597
+ vPSV1VirtualMachineRootPasswordUpdateRequest
598
+ );
599
+ ```
600
+
601
+ ### Parameters
602
+
603
+ |Name | Type | Description | Notes|
604
+ |------------- | ------------- | ------------- | -------------|
605
+ | **vPSV1VirtualMachineRootPasswordUpdateRequest** | **VPSV1VirtualMachineRootPasswordUpdateRequest**| | |
606
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
607
+
608
+
609
+ ### Return type
610
+
611
+ **VPSV1ActionActionResource**
612
+
613
+ ### Authorization
614
+
615
+ [apiToken](../README.md#apiToken)
616
+
617
+ ### HTTP request headers
618
+
619
+ - **Content-Type**: application/json
620
+ - **Accept**: application/json
621
+
622
+
623
+ ### HTTP response details
624
+ | Status code | Description | Response headers |
625
+ |-------------|-------------|------------------|
626
+ |**200** | Success response | - |
627
+ |**422** | Validation error response | - |
628
+ |**401** | Unauthenticated | - |
629
+ |**500** | Error response | - |
630
+
631
+ [[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)
632
+
633
+ # **setupNewVirtualMachineV1**
634
+ > VPSV1VirtualMachineVirtualMachineResource setupNewVirtualMachineV1(vPSV1VirtualMachineSetupRequest)
635
+
636
+ This endpoint will setup newly purchased virtual machine. Such virtual machines has `initial` state. New virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/billing-orders/POST/api/billing/v1/orders) endpoint.
637
+
638
+ ### Example
639
+
640
+ ```typescript
641
+ import {
642
+ VPSVirtualMachineApi,
643
+ Configuration,
644
+ VPSV1VirtualMachineSetupRequest
645
+ } from 'hostinger-api-sdk';
646
+
647
+ const configuration = new Configuration();
648
+ const apiInstance = new VPSVirtualMachineApi(configuration);
649
+
650
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
651
+ let vPSV1VirtualMachineSetupRequest: VPSV1VirtualMachineSetupRequest; //
652
+
653
+ const { status, data } = await apiInstance.setupNewVirtualMachineV1(
654
+ virtualMachineId,
655
+ vPSV1VirtualMachineSetupRequest
656
+ );
657
+ ```
658
+
659
+ ### Parameters
660
+
661
+ |Name | Type | Description | Notes|
662
+ |------------- | ------------- | ------------- | -------------|
663
+ | **vPSV1VirtualMachineSetupRequest** | **VPSV1VirtualMachineSetupRequest**| | |
664
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
665
+
666
+
667
+ ### Return type
668
+
669
+ **VPSV1VirtualMachineVirtualMachineResource**
670
+
671
+ ### Authorization
672
+
673
+ [apiToken](../README.md#apiToken)
674
+
675
+ ### HTTP request headers
676
+
677
+ - **Content-Type**: application/json
678
+ - **Accept**: application/json
679
+
680
+
681
+ ### HTTP response details
682
+ | Status code | Description | Response headers |
683
+ |-------------|-------------|------------------|
684
+ |**200** | Success response | - |
685
+ |**422** | Validation error response | - |
686
+ |**401** | Unauthenticated | - |
687
+ |**500** | Error response | - |
688
+
689
+ [[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)
690
+
691
+ # **startVirtualMachineV1**
692
+ > VPSV1ActionActionResource startVirtualMachineV1()
693
+
694
+ This endpoint starts a specified virtual machine. If the virtual machine is already running, the request will still be processed without any effect.
695
+
696
+ ### Example
697
+
698
+ ```typescript
699
+ import {
700
+ VPSVirtualMachineApi,
701
+ Configuration
702
+ } from 'hostinger-api-sdk';
703
+
704
+ const configuration = new Configuration();
705
+ const apiInstance = new VPSVirtualMachineApi(configuration);
706
+
707
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
708
+
709
+ const { status, data } = await apiInstance.startVirtualMachineV1(
710
+ virtualMachineId
711
+ );
712
+ ```
713
+
714
+ ### Parameters
715
+
716
+ |Name | Type | Description | Notes|
717
+ |------------- | ------------- | ------------- | -------------|
718
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
719
+
720
+
721
+ ### Return type
722
+
723
+ **VPSV1ActionActionResource**
724
+
725
+ ### Authorization
726
+
727
+ [apiToken](../README.md#apiToken)
728
+
729
+ ### HTTP request headers
730
+
731
+ - **Content-Type**: Not defined
732
+ - **Accept**: application/json
733
+
734
+
735
+ ### HTTP response details
736
+ | Status code | Description | Response headers |
737
+ |-------------|-------------|------------------|
738
+ |**200** | Success response | - |
739
+ |**401** | Unauthenticated | - |
740
+ |**500** | Error response | - |
741
+
742
+ [[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)
743
+
744
+ # **stopVirtualMachineV1**
745
+ > VPSV1ActionActionResource stopVirtualMachineV1()
746
+
747
+ This endpoint stops a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect.
748
+
749
+ ### Example
750
+
751
+ ```typescript
752
+ import {
753
+ VPSVirtualMachineApi,
754
+ Configuration
755
+ } from 'hostinger-api-sdk';
756
+
757
+ const configuration = new Configuration();
758
+ const apiInstance = new VPSVirtualMachineApi(configuration);
759
+
760
+ let virtualMachineId: number; //Virtual Machine ID (default to undefined)
761
+
762
+ const { status, data } = await apiInstance.stopVirtualMachineV1(
763
+ virtualMachineId
764
+ );
765
+ ```
766
+
767
+ ### Parameters
768
+
769
+ |Name | Type | Description | Notes|
770
+ |------------- | ------------- | ------------- | -------------|
771
+ | **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
772
+
773
+
774
+ ### Return type
775
+
776
+ **VPSV1ActionActionResource**
777
+
778
+ ### Authorization
779
+
780
+ [apiToken](../README.md#apiToken)
781
+
782
+ ### HTTP request headers
783
+
784
+ - **Content-Type**: Not defined
785
+ - **Accept**: application/json
786
+
787
+
788
+ ### HTTP response details
789
+ | Status code | Description | Response headers |
790
+ |-------------|-------------|------------------|
791
+ |**200** | Success response | - |
792
+ |**401** | Unauthenticated | - |
793
+ |**500** | Error response | - |
794
+
795
+ [[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)
796
+