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