@hostinger/sdk 1.60.1 → 1.61.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 +371 -21
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +231 -21
- package/dist/api.js +301 -23
- 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 +231 -21
- package/dist/esm/api.js +295 -21
- 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/VPSPublicKeysApi.md +4 -4
- package/docs/VPSSSHKeysApi.md +179 -0
- package/docs/VPSV1SshKeyDestroyRequest.md +20 -0
- package/docs/VPSV1SshKeySshKeyResource.md +26 -0
- package/docs/VPSV1SshKeyStoreRequest.md +20 -0
- package/docs/VPSVirtualMachineApi.md +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/docs/VPSPublicKeysApi.md
CHANGED
|
@@ -12,7 +12,7 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
12
12
|
# **attachPublicKeyV1**
|
|
13
13
|
> VPSV1ActionActionResource attachPublicKeyV1(vPSV1PublicKeyAttachRequest)
|
|
14
14
|
|
|
15
|
-
Attach existing public keys from your account to a specified virtual machine. Multiple keys can be attached to a single virtual machine. Use this endpoint to enable SSH key authentication for VPS instances.
|
|
15
|
+
Deprecated: use `POST /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys` instead. Attach existing public keys from your account to a specified virtual machine. Multiple keys can be attached to a single virtual machine. Use this endpoint to enable SSH key authentication for VPS instances.
|
|
16
16
|
|
|
17
17
|
### Example
|
|
18
18
|
|
|
@@ -70,7 +70,7 @@ const { status, data } = await apiInstance.attachPublicKeyV1(
|
|
|
70
70
|
# **createPublicKeyV1**
|
|
71
71
|
> VPSV1PublicKeyPublicKeyResource createPublicKeyV1(vPSV1PublicKeyStoreRequest)
|
|
72
72
|
|
|
73
|
-
Add a new public key to your account. Use this endpoint to register SSH keys for VPS authentication.
|
|
73
|
+
Deprecated: account-level public keys have no direct replacement. Root SSH keys are now managed per virtual machine via `POST /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys`. Add a new public key to your account. Use this endpoint to register SSH keys for VPS authentication.
|
|
74
74
|
|
|
75
75
|
### Example
|
|
76
76
|
|
|
@@ -125,7 +125,7 @@ const { status, data } = await apiInstance.createPublicKeyV1(
|
|
|
125
125
|
# **deletePublicKeyV1**
|
|
126
126
|
> CommonSuccessEmptyResource deletePublicKeyV1()
|
|
127
127
|
|
|
128
|
-
Delete a public key from your account. **Deleting public key from account does not remove it from virtual machine** Use this endpoint to remove unused SSH keys from account.
|
|
128
|
+
Deprecated: account-level public keys have no direct replacement. Root SSH keys are now managed per virtual machine via `DELETE /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys`. Delete a public key from your account. **Deleting public key from account does not remove it from virtual machine** Use this endpoint to remove unused SSH keys from account.
|
|
129
129
|
|
|
130
130
|
### Example
|
|
131
131
|
|
|
@@ -178,7 +178,7 @@ const { status, data } = await apiInstance.deletePublicKeyV1(
|
|
|
178
178
|
# **getPublicKeysV1**
|
|
179
179
|
> VPSV1PublicKeyListResponse getPublicKeysV1()
|
|
180
180
|
|
|
181
|
-
Retrieve public keys associated with your account. Use this endpoint to view available SSH keys for VPS authentication.
|
|
181
|
+
Deprecated: account-level public keys have no direct replacement. Root SSH keys are now managed per virtual machine via `GET /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys`. Retrieve public keys associated with your account. Use this endpoint to view available SSH keys for VPS authentication.
|
|
182
182
|
|
|
183
183
|
### Example
|
|
184
184
|
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# VPSSSHKeysApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**addVirtualMachineSSHKeysV1**](#addvirtualmachinesshkeysv1) | **POST** /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys | Add virtual machine SSH keys|
|
|
8
|
+
|[**listVirtualMachineSSHKeysV1**](#listvirtualmachinesshkeysv1) | **GET** /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys | List virtual machine SSH keys|
|
|
9
|
+
|[**removeVirtualMachineSSHKeysV1**](#removevirtualmachinesshkeysv1) | **DELETE** /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys | Remove virtual machine SSH keys|
|
|
10
|
+
|
|
11
|
+
# **addVirtualMachineSSHKeysV1**
|
|
12
|
+
> Array<VPSV1SshKeySshKeyResource> addVirtualMachineSSHKeysV1(vPSV1SshKeyStoreRequest)
|
|
13
|
+
|
|
14
|
+
Add one or more SSH public keys to a specified virtual machine. Keys are added to the `root` user and can be used for passwordless SSH authentication. Returns the complete list of SSH keys currently configured on the virtual machine. Use this endpoint to enable SSH key authentication for VPS instances.
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import {
|
|
20
|
+
VPSSSHKeysApi,
|
|
21
|
+
Configuration,
|
|
22
|
+
VPSV1SshKeyStoreRequest
|
|
23
|
+
} from '@hostinger/sdk';
|
|
24
|
+
|
|
25
|
+
const configuration = new Configuration();
|
|
26
|
+
const apiInstance = new VPSSSHKeysApi(configuration);
|
|
27
|
+
|
|
28
|
+
let virtualMachineId: number; //Virtual Machine ID (default to undefined)
|
|
29
|
+
let vPSV1SshKeyStoreRequest: VPSV1SshKeyStoreRequest; //
|
|
30
|
+
|
|
31
|
+
const { status, data } = await apiInstance.addVirtualMachineSSHKeysV1(
|
|
32
|
+
virtualMachineId,
|
|
33
|
+
vPSV1SshKeyStoreRequest
|
|
34
|
+
);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Parameters
|
|
38
|
+
|
|
39
|
+
|Name | Type | Description | Notes|
|
|
40
|
+
|------------- | ------------- | ------------- | -------------|
|
|
41
|
+
| **vPSV1SshKeyStoreRequest** | **VPSV1SshKeyStoreRequest**| | |
|
|
42
|
+
| **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Return type
|
|
46
|
+
|
|
47
|
+
**Array<VPSV1SshKeySshKeyResource>**
|
|
48
|
+
|
|
49
|
+
### Authorization
|
|
50
|
+
|
|
51
|
+
[apiToken](../README.md#apiToken)
|
|
52
|
+
|
|
53
|
+
### HTTP request headers
|
|
54
|
+
|
|
55
|
+
- **Content-Type**: application/json
|
|
56
|
+
- **Accept**: application/json
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### HTTP response details
|
|
60
|
+
| Status code | Description | Response headers |
|
|
61
|
+
|-------------|-------------|------------------|
|
|
62
|
+
|**200** | Success response | - |
|
|
63
|
+
|**422** | Validation error response | - |
|
|
64
|
+
|**401** | Unauthenticated response | - |
|
|
65
|
+
|**500** | Error response | - |
|
|
66
|
+
|
|
67
|
+
[[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)
|
|
68
|
+
|
|
69
|
+
# **listVirtualMachineSSHKeysV1**
|
|
70
|
+
> Array<VPSV1SshKeySshKeyResource> listVirtualMachineSSHKeysV1()
|
|
71
|
+
|
|
72
|
+
Retrieve SSH public keys currently configured on a specified virtual machine. Only keys of the `root` user are listed. Use this endpoint to view SSH keys that can be used for authentication on VPS instances.
|
|
73
|
+
|
|
74
|
+
### Example
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
import {
|
|
78
|
+
VPSSSHKeysApi,
|
|
79
|
+
Configuration
|
|
80
|
+
} from '@hostinger/sdk';
|
|
81
|
+
|
|
82
|
+
const configuration = new Configuration();
|
|
83
|
+
const apiInstance = new VPSSSHKeysApi(configuration);
|
|
84
|
+
|
|
85
|
+
let virtualMachineId: number; //Virtual Machine ID (default to undefined)
|
|
86
|
+
|
|
87
|
+
const { status, data } = await apiInstance.listVirtualMachineSSHKeysV1(
|
|
88
|
+
virtualMachineId
|
|
89
|
+
);
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Parameters
|
|
93
|
+
|
|
94
|
+
|Name | Type | Description | Notes|
|
|
95
|
+
|------------- | ------------- | ------------- | -------------|
|
|
96
|
+
| **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### Return type
|
|
100
|
+
|
|
101
|
+
**Array<VPSV1SshKeySshKeyResource>**
|
|
102
|
+
|
|
103
|
+
### Authorization
|
|
104
|
+
|
|
105
|
+
[apiToken](../README.md#apiToken)
|
|
106
|
+
|
|
107
|
+
### HTTP request headers
|
|
108
|
+
|
|
109
|
+
- **Content-Type**: Not defined
|
|
110
|
+
- **Accept**: application/json
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### HTTP response details
|
|
114
|
+
| Status code | Description | Response headers |
|
|
115
|
+
|-------------|-------------|------------------|
|
|
116
|
+
|**200** | Success response | - |
|
|
117
|
+
|**401** | Unauthenticated response | - |
|
|
118
|
+
|**500** | Error response | - |
|
|
119
|
+
|
|
120
|
+
[[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)
|
|
121
|
+
|
|
122
|
+
# **removeVirtualMachineSSHKeysV1**
|
|
123
|
+
> Array<VPSV1SshKeySshKeyResource> removeVirtualMachineSSHKeysV1(vPSV1SshKeyDestroyRequest)
|
|
124
|
+
|
|
125
|
+
Remove one or more SSH public keys from a specified virtual machine. Removed keys can no longer be used to authenticate via SSH as the `root` user. Returns the remaining list of SSH keys configured on the virtual machine. Use this endpoint to revoke SSH key access to VPS instances.
|
|
126
|
+
|
|
127
|
+
### Example
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
import {
|
|
131
|
+
VPSSSHKeysApi,
|
|
132
|
+
Configuration,
|
|
133
|
+
VPSV1SshKeyDestroyRequest
|
|
134
|
+
} from '@hostinger/sdk';
|
|
135
|
+
|
|
136
|
+
const configuration = new Configuration();
|
|
137
|
+
const apiInstance = new VPSSSHKeysApi(configuration);
|
|
138
|
+
|
|
139
|
+
let virtualMachineId: number; //Virtual Machine ID (default to undefined)
|
|
140
|
+
let vPSV1SshKeyDestroyRequest: VPSV1SshKeyDestroyRequest; //
|
|
141
|
+
|
|
142
|
+
const { status, data } = await apiInstance.removeVirtualMachineSSHKeysV1(
|
|
143
|
+
virtualMachineId,
|
|
144
|
+
vPSV1SshKeyDestroyRequest
|
|
145
|
+
);
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Parameters
|
|
149
|
+
|
|
150
|
+
|Name | Type | Description | Notes|
|
|
151
|
+
|------------- | ------------- | ------------- | -------------|
|
|
152
|
+
| **vPSV1SshKeyDestroyRequest** | **VPSV1SshKeyDestroyRequest**| | |
|
|
153
|
+
| **virtualMachineId** | [**number**] | Virtual Machine ID | defaults to undefined|
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### Return type
|
|
157
|
+
|
|
158
|
+
**Array<VPSV1SshKeySshKeyResource>**
|
|
159
|
+
|
|
160
|
+
### Authorization
|
|
161
|
+
|
|
162
|
+
[apiToken](../README.md#apiToken)
|
|
163
|
+
|
|
164
|
+
### HTTP request headers
|
|
165
|
+
|
|
166
|
+
- **Content-Type**: application/json
|
|
167
|
+
- **Accept**: application/json
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
### HTTP response details
|
|
171
|
+
| Status code | Description | Response headers |
|
|
172
|
+
|-------------|-------------|------------------|
|
|
173
|
+
|**200** | Success response | - |
|
|
174
|
+
|**422** | Validation error response | - |
|
|
175
|
+
|**401** | Unauthenticated response | - |
|
|
176
|
+
|**500** | Error response | - |
|
|
177
|
+
|
|
178
|
+
[[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)
|
|
179
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# VPSV1SshKeyDestroyRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**keys** | **Array<string>** | SSH public keys in OpenSSH format to remove | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { VPSV1SshKeyDestroyRequest } from '@hostinger/sdk';
|
|
14
|
+
|
|
15
|
+
const instance: VPSV1SshKeyDestroyRequest = {
|
|
16
|
+
keys,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[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
|
+
# VPSV1SshKeySshKeyResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**key** | **string** | SSH public key in OpenSSH format | [optional] [default to undefined]
|
|
9
|
+
**type** | **string** | SSH key type | [optional] [default to undefined]
|
|
10
|
+
**data** | **string** | SSH key data (base64 encoded public key) | [optional] [default to undefined]
|
|
11
|
+
**name** | **string** | SSH key comment/name | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { VPSV1SshKeySshKeyResource } from '@hostinger/sdk';
|
|
17
|
+
|
|
18
|
+
const instance: VPSV1SshKeySshKeyResource = {
|
|
19
|
+
key,
|
|
20
|
+
type,
|
|
21
|
+
data,
|
|
22
|
+
name,
|
|
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,20 @@
|
|
|
1
|
+
# VPSV1SshKeyStoreRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**keys** | **Array<string>** | SSH public keys in OpenSSH format to add | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { VPSV1SshKeyStoreRequest } from '@hostinger/sdk';
|
|
14
|
+
|
|
15
|
+
const instance: VPSV1SshKeyStoreRequest = {
|
|
16
|
+
keys,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -23,7 +23,7 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
23
23
|
# **getAttachedPublicKeysV1**
|
|
24
24
|
> VPSV1PublicKeyListResponse getAttachedPublicKeysV1()
|
|
25
25
|
|
|
26
|
-
Retrieve public keys attached to a specified virtual machine. Use this endpoint to view SSH keys configured for specific VPS instances.
|
|
26
|
+
Deprecated: use `GET /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys` instead. Retrieve public keys attached to a specified virtual machine. Use this endpoint to view SSH keys configured for specific VPS instances.
|
|
27
27
|
|
|
28
28
|
### Example
|
|
29
29
|
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.61.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
|