hostinger-api-sdk 2.6.2 → 2.7.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 +603 -11
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +433 -11
- package/dist/api.js +380 -15
- 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 +433 -11
- package/dist/esm/api.js +369 -9
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/GPUCatalogApi.md +219 -0
- package/docs/GPUV1OsTemplateOsTemplateResource.md +30 -0
- package/docs/GPUV1PoolPoolGroupResource.md +30 -0
- package/docs/GPUV1PoolPoolInstanceResource.md +32 -0
- package/docs/GPUV1PoolPoolResource.md +30 -0
- package/docs/GPUV1RegionRegionResource.md +26 -0
- package/docs/HostingV1OnboardingsStartOnboardingRequest.md +1 -1
- package/docs/HostingWebsitesApi.md +1 -1
- package/docs/WordPressInstallationsApi.md +1 -1
- package/docs/WordPressV1InstallationsInstallWordPressRequest.md +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# GPUCatalogApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**getPoolGroupsV1**](#getpoolgroupsv1) | **GET** /api/gpu/v1/pools/groups | Get pool groups|
|
|
8
|
+
|[**getPoolInstanceTypesV1**](#getpoolinstancetypesv1) | **GET** /api/gpu/v1/pools/{poolId}/instances | Get pool instance types|
|
|
9
|
+
|[**getPoolListV1**](#getpoollistv1) | **GET** /api/gpu/v1/pools | Get pool list|
|
|
10
|
+
|[**getPoolOSTemplatesV1**](#getpoolostemplatesv1) | **GET** /api/gpu/v1/pools/{poolId}/instances/{poolInstanceId}/os-templates | Get pool OS templates|
|
|
11
|
+
|
|
12
|
+
# **getPoolGroupsV1**
|
|
13
|
+
> Array<GPUV1PoolPoolGroupResource> getPoolGroupsV1()
|
|
14
|
+
|
|
15
|
+
Retrieve GPU pool groups, ordered by name. Each group bundles the pools of one GPU model and lists its currently available pools, whether any of them is available and the lowest hourly price among its instance types. The price is returned even when the group is out of stock. Use this endpoint to show which GPU models can be ordered and from what price.
|
|
16
|
+
|
|
17
|
+
### Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import {
|
|
21
|
+
GPUCatalogApi,
|
|
22
|
+
Configuration
|
|
23
|
+
} from '@hostinger/sdk';
|
|
24
|
+
|
|
25
|
+
const configuration = new Configuration();
|
|
26
|
+
const apiInstance = new GPUCatalogApi(configuration);
|
|
27
|
+
|
|
28
|
+
let currency: 'USD' | 'ARS' | 'AMD' | 'AUD' | 'AZN' | 'BDT' | 'BRL' | 'BTC' | 'BYN' | 'CAD' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CZK' | 'DKK' | 'EGP' | 'EUR' | 'GBP' | 'GEL' | 'HKD' | 'HRK' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'JPY' | 'KGS' | 'KRW' | 'KZT' | 'MAD' | 'MXN' | 'MYR' | 'NGN' | 'NOK' | 'NZD' | 'PEN' | 'PHP' | 'PKR' | 'PLN' | 'SEK' | 'SGD' | 'THB' | 'TJS' | 'TRY' | 'TWD' | 'UAH' | 'VND' | 'ZAR'; //Currency of the returned prices, `USD` by default (optional) (default to undefined)
|
|
29
|
+
|
|
30
|
+
const { status, data } = await apiInstance.getPoolGroupsV1(
|
|
31
|
+
currency
|
|
32
|
+
);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Parameters
|
|
36
|
+
|
|
37
|
+
|Name | Type | Description | Notes|
|
|
38
|
+
|------------- | ------------- | ------------- | -------------|
|
|
39
|
+
| **currency** | [**'USD' | 'ARS' | 'AMD' | 'AUD' | 'AZN' | 'BDT' | 'BRL' | 'BTC' | 'BYN' | 'CAD' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CZK' | 'DKK' | 'EGP' | 'EUR' | 'GBP' | 'GEL' | 'HKD' | 'HRK' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'JPY' | 'KGS' | 'KRW' | 'KZT' | 'MAD' | 'MXN' | 'MYR' | 'NGN' | 'NOK' | 'NZD' | 'PEN' | 'PHP' | 'PKR' | 'PLN' | 'SEK' | 'SGD' | 'THB' | 'TJS' | 'TRY' | 'TWD' | 'UAH' | 'VND' | 'ZAR'**]**Array<'USD' | 'ARS' | 'AMD' | 'AUD' | 'AZN' | 'BDT' | 'BRL' | 'BTC' | 'BYN' | 'CAD' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CZK' | 'DKK' | 'EGP' | 'EUR' | 'GBP' | 'GEL' | 'HKD' | 'HRK' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'JPY' | 'KGS' | 'KRW' | 'KZT' | 'MAD' | 'MXN' | 'MYR' | 'NGN' | 'NOK' | 'NZD' | 'PEN' | 'PHP' | 'PKR' | 'PLN' | 'SEK' | 'SGD' | 'THB' | 'TJS' | 'TRY' | 'TWD' | 'UAH' | 'VND' | 'ZAR'>** | Currency of the returned prices, `USD` by default | (optional) defaults to undefined|
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Return type
|
|
43
|
+
|
|
44
|
+
**Array<GPUV1PoolPoolGroupResource>**
|
|
45
|
+
|
|
46
|
+
### Authorization
|
|
47
|
+
|
|
48
|
+
[apiToken](../README.md#apiToken)
|
|
49
|
+
|
|
50
|
+
### HTTP request headers
|
|
51
|
+
|
|
52
|
+
- **Content-Type**: Not defined
|
|
53
|
+
- **Accept**: application/json
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### HTTP response details
|
|
57
|
+
| Status code | Description | Response headers |
|
|
58
|
+
|-------------|-------------|------------------|
|
|
59
|
+
|**200** | Success response | - |
|
|
60
|
+
|**401** | Unauthenticated response | - |
|
|
61
|
+
|**500** | Error response | - |
|
|
62
|
+
|
|
63
|
+
[[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)
|
|
64
|
+
|
|
65
|
+
# **getPoolInstanceTypesV1**
|
|
66
|
+
> Array<GPUV1PoolPoolInstanceResource> getPoolInstanceTypesV1()
|
|
67
|
+
|
|
68
|
+
Retrieve the instance types offered by a specified GPU pool, ordered by CPU core count. Each instance type describes its CPU, memory and storage, and its hourly price. Only instance types that can currently be ordered are returned. Use this endpoint to choose the `pool_instance_id` for a new GPU instance.
|
|
69
|
+
|
|
70
|
+
### Example
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import {
|
|
74
|
+
GPUCatalogApi,
|
|
75
|
+
Configuration
|
|
76
|
+
} from '@hostinger/sdk';
|
|
77
|
+
|
|
78
|
+
const configuration = new Configuration();
|
|
79
|
+
const apiInstance = new GPUCatalogApi(configuration);
|
|
80
|
+
|
|
81
|
+
let poolId: number; //GPU pool ID (default to undefined)
|
|
82
|
+
|
|
83
|
+
const { status, data } = await apiInstance.getPoolInstanceTypesV1(
|
|
84
|
+
poolId
|
|
85
|
+
);
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Parameters
|
|
89
|
+
|
|
90
|
+
|Name | Type | Description | Notes|
|
|
91
|
+
|------------- | ------------- | ------------- | -------------|
|
|
92
|
+
| **poolId** | [**number**] | GPU pool ID | defaults to undefined|
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### Return type
|
|
96
|
+
|
|
97
|
+
**Array<GPUV1PoolPoolInstanceResource>**
|
|
98
|
+
|
|
99
|
+
### Authorization
|
|
100
|
+
|
|
101
|
+
[apiToken](../README.md#apiToken)
|
|
102
|
+
|
|
103
|
+
### HTTP request headers
|
|
104
|
+
|
|
105
|
+
- **Content-Type**: Not defined
|
|
106
|
+
- **Accept**: application/json
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### HTTP response details
|
|
110
|
+
| Status code | Description | Response headers |
|
|
111
|
+
|-------------|-------------|------------------|
|
|
112
|
+
|**200** | Success response | - |
|
|
113
|
+
|**401** | Unauthenticated response | - |
|
|
114
|
+
|**500** | Error response | - |
|
|
115
|
+
|
|
116
|
+
[[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)
|
|
117
|
+
|
|
118
|
+
# **getPoolListV1**
|
|
119
|
+
> Array<GPUV1PoolPoolResource> getPoolListV1()
|
|
120
|
+
|
|
121
|
+
Retrieve all available GPU pools, ordered by name. A pool serves GPU accelerators of one model from a single region. Use this endpoint to choose a pool before listing its instance types.
|
|
122
|
+
|
|
123
|
+
### Example
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
import {
|
|
127
|
+
GPUCatalogApi,
|
|
128
|
+
Configuration
|
|
129
|
+
} from '@hostinger/sdk';
|
|
130
|
+
|
|
131
|
+
const configuration = new Configuration();
|
|
132
|
+
const apiInstance = new GPUCatalogApi(configuration);
|
|
133
|
+
|
|
134
|
+
const { status, data } = await apiInstance.getPoolListV1();
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Parameters
|
|
138
|
+
This endpoint does not have any parameters.
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### Return type
|
|
142
|
+
|
|
143
|
+
**Array<GPUV1PoolPoolResource>**
|
|
144
|
+
|
|
145
|
+
### Authorization
|
|
146
|
+
|
|
147
|
+
[apiToken](../README.md#apiToken)
|
|
148
|
+
|
|
149
|
+
### HTTP request headers
|
|
150
|
+
|
|
151
|
+
- **Content-Type**: Not defined
|
|
152
|
+
- **Accept**: application/json
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
### HTTP response details
|
|
156
|
+
| Status code | Description | Response headers |
|
|
157
|
+
|-------------|-------------|------------------|
|
|
158
|
+
|**200** | Success response | - |
|
|
159
|
+
|**401** | Unauthenticated response | - |
|
|
160
|
+
|**500** | Error response | - |
|
|
161
|
+
|
|
162
|
+
[[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)
|
|
163
|
+
|
|
164
|
+
# **getPoolOSTemplatesV1**
|
|
165
|
+
> Array<GPUV1OsTemplateOsTemplateResource> getPoolOSTemplatesV1()
|
|
166
|
+
|
|
167
|
+
Retrieve the OS templates that can be installed on a specified GPU pool instance type. Use this endpoint to choose the `os_template_id` for a new GPU instance.
|
|
168
|
+
|
|
169
|
+
### Example
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
import {
|
|
173
|
+
GPUCatalogApi,
|
|
174
|
+
Configuration
|
|
175
|
+
} from '@hostinger/sdk';
|
|
176
|
+
|
|
177
|
+
const configuration = new Configuration();
|
|
178
|
+
const apiInstance = new GPUCatalogApi(configuration);
|
|
179
|
+
|
|
180
|
+
let poolId: number; //GPU pool ID (default to undefined)
|
|
181
|
+
let poolInstanceId: number; //GPU pool instance type ID (default to undefined)
|
|
182
|
+
|
|
183
|
+
const { status, data } = await apiInstance.getPoolOSTemplatesV1(
|
|
184
|
+
poolId,
|
|
185
|
+
poolInstanceId
|
|
186
|
+
);
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Parameters
|
|
190
|
+
|
|
191
|
+
|Name | Type | Description | Notes|
|
|
192
|
+
|------------- | ------------- | ------------- | -------------|
|
|
193
|
+
| **poolId** | [**number**] | GPU pool ID | defaults to undefined|
|
|
194
|
+
| **poolInstanceId** | [**number**] | GPU pool instance type ID | defaults to undefined|
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### Return type
|
|
198
|
+
|
|
199
|
+
**Array<GPUV1OsTemplateOsTemplateResource>**
|
|
200
|
+
|
|
201
|
+
### Authorization
|
|
202
|
+
|
|
203
|
+
[apiToken](../README.md#apiToken)
|
|
204
|
+
|
|
205
|
+
### HTTP request headers
|
|
206
|
+
|
|
207
|
+
- **Content-Type**: Not defined
|
|
208
|
+
- **Accept**: application/json
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
### HTTP response details
|
|
212
|
+
| Status code | Description | Response headers |
|
|
213
|
+
|-------------|-------------|------------------|
|
|
214
|
+
|**200** | Success response | - |
|
|
215
|
+
|**401** | Unauthenticated response | - |
|
|
216
|
+
|**500** | Error response | - |
|
|
217
|
+
|
|
218
|
+
[[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)
|
|
219
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# GPUV1OsTemplateOsTemplateResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **number** | OS template ID | [optional] [default to undefined]
|
|
9
|
+
**name** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**kb_url** | **string** | Knowledge base article about the template | [optional] [default to undefined]
|
|
11
|
+
**image** | **string** | Icon image ID | [optional] [default to undefined]
|
|
12
|
+
**dark_image_id** | **string** | Dark theme icon image ID | [optional] [default to undefined]
|
|
13
|
+
**light_image_id** | **string** | Light theme icon image ID | [optional] [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { GPUV1OsTemplateOsTemplateResource } from '@hostinger/sdk';
|
|
19
|
+
|
|
20
|
+
const instance: GPUV1OsTemplateOsTemplateResource = {
|
|
21
|
+
id,
|
|
22
|
+
name,
|
|
23
|
+
kb_url,
|
|
24
|
+
image,
|
|
25
|
+
dark_image_id,
|
|
26
|
+
light_image_id,
|
|
27
|
+
};
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# GPUV1PoolPoolGroupResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **number** | GPU pool group ID | [optional] [default to undefined]
|
|
9
|
+
**name** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**vram** | **number** | Total VRAM in bytes | [optional] [default to undefined]
|
|
11
|
+
**is_available** | **boolean** | Whether the group has any available pools | [optional] [default to undefined]
|
|
12
|
+
**min_price_per_hour** | **number** | Lowest hourly price of the group instance types, in the requested currency | [optional] [default to undefined]
|
|
13
|
+
**pools** | [**Array<GPUV1PoolPoolResource>**](GPUV1PoolPoolResource.md) | Array of [`GPU.V1.Pool.PoolResource`](#model/gpuv1poolpoolresource) | [optional] [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { GPUV1PoolPoolGroupResource } from '@hostinger/sdk';
|
|
19
|
+
|
|
20
|
+
const instance: GPUV1PoolPoolGroupResource = {
|
|
21
|
+
id,
|
|
22
|
+
name,
|
|
23
|
+
vram,
|
|
24
|
+
is_available,
|
|
25
|
+
min_price_per_hour,
|
|
26
|
+
pools,
|
|
27
|
+
};
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# GPUV1PoolPoolInstanceResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **number** | GPU pool instance type ID | [optional] [default to undefined]
|
|
9
|
+
**name** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**description** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**cpu_cores** | **number** | Number of CPU cores | [optional] [default to undefined]
|
|
12
|
+
**ram** | **number** | Total RAM in bytes | [optional] [default to undefined]
|
|
13
|
+
**storage** | **number** | Total storage in bytes | [optional] [default to undefined]
|
|
14
|
+
**price_per_hour** | **number** | Hourly price in cents (USD) | [optional] [default to undefined]
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { GPUV1PoolPoolInstanceResource } from '@hostinger/sdk';
|
|
20
|
+
|
|
21
|
+
const instance: GPUV1PoolPoolInstanceResource = {
|
|
22
|
+
id,
|
|
23
|
+
name,
|
|
24
|
+
description,
|
|
25
|
+
cpu_cores,
|
|
26
|
+
ram,
|
|
27
|
+
storage,
|
|
28
|
+
price_per_hour,
|
|
29
|
+
};
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# GPUV1PoolPoolResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **number** | GPU pool ID | [optional] [default to undefined]
|
|
9
|
+
**name** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**gpus** | **number** | Number of GPUs | [optional] [default to undefined]
|
|
11
|
+
**vram** | **number** | Total VRAM in bytes | [optional] [default to undefined]
|
|
12
|
+
**is_available** | **boolean** | Whether the pool has available instances for booking | [optional] [default to undefined]
|
|
13
|
+
**region** | [**GPUV1RegionRegionResource**](GPUV1RegionRegionResource.md) | | [optional] [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { GPUV1PoolPoolResource } from '@hostinger/sdk';
|
|
19
|
+
|
|
20
|
+
const instance: GPUV1PoolPoolResource = {
|
|
21
|
+
id,
|
|
22
|
+
name,
|
|
23
|
+
gpus,
|
|
24
|
+
vram,
|
|
25
|
+
is_available,
|
|
26
|
+
region,
|
|
27
|
+
};
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# GPUV1RegionRegionResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **number** | Region ID | [optional] [default to undefined]
|
|
9
|
+
**name** | **string** | Region name | [optional] [default to undefined]
|
|
10
|
+
**city** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**country** | **string** | ISO 3166-1 alpha-2 country code | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { GPUV1RegionRegionResource } from '@hostinger/sdk';
|
|
17
|
+
|
|
18
|
+
const instance: GPUV1RegionRegionResource = {
|
|
19
|
+
id,
|
|
20
|
+
name,
|
|
21
|
+
city,
|
|
22
|
+
country,
|
|
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)
|
|
@@ -7,7 +7,7 @@ Website type, domain and WordPress settings for a new website setup
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
9
|
**type** | **string** | Website type. Omit or `null` for an empty website. `wordpress` installs WordPress in the website root and requires `wordpress`. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory with generated credentials. `headless_empty` installs nothing, so WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless`. | [optional] [default to undefined]
|
|
10
|
-
**domain** | **string** | Customer-owned domain
|
|
10
|
+
**domain** | **string** | Customer-owned domain. Omit or `null` to set the website up on a generated temporary free subdomain. Cannot start with \"www.\" and can have at most one subdomain level, e.g. `blog.example.com`. A free subdomain generated through `POST /api/hosting/v1/domains/free-subdomains` in the last 24 hours is also accepted. | [optional] [default to undefined]
|
|
11
11
|
**datacenter_code** | **string** | Datacenter for the hosting account when the order does not have one yet. Omit to use the order\'s default datacenter. Ignored when the order already has a hosting account. List available datacenters to find valid codes. | [optional] [default to undefined]
|
|
12
12
|
**wordpress** | [**HostingV1OnboardingsStartOnboardingRequestWordpress**](HostingV1OnboardingsStartOnboardingRequestWordpress.md) | | [optional] [default to undefined]
|
|
13
13
|
|
|
@@ -316,7 +316,7 @@ const { status, data } = await apiInstance.listWebsitesV1(
|
|
|
316
316
|
# **startWebsiteSetupV1**
|
|
317
317
|
> HostingV1OnboardingsOnboardingResource startWebsiteSetupV1(hostingV1OnboardingsStartOnboardingRequest)
|
|
318
318
|
|
|
319
|
-
Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint (`hosting_websites_list-setups`) with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. `headless_empty` installs nothing: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless`. Omit `domain` to set the website up on a generated temporary free subdomain
|
|
319
|
+
Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint (`hosting_websites_list-setups`) with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. `headless_empty` installs nothing: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless`. Omit `domain` to set the website up on a generated temporary free subdomain; the created setup returns it as `domain`. REST clients that need to know the free subdomain before the call, so a timed-out call can be looked up and retried on the same domain, can generate one through `POST /api/hosting/v1/domains/free-subdomains` and send it as `domain`. It is accepted for 24 hours, only from the client that generated it. When the order has no hosting account yet, the setup creates one first, in the datacenter given by `datacenter_code` or the order\'s default datacenter when it is omitted. Returns 404 when the order does not exist or is not accessible to the authenticated client, and 409 with a `Retry-After` header while a setup for the same domain is still running.
|
|
320
320
|
|
|
321
321
|
### Example
|
|
322
322
|
|
|
@@ -307,7 +307,7 @@ const { status, data } = await apiInstance.importWordPressWebsiteV1(
|
|
|
307
307
|
# **installWordPressV1**
|
|
308
308
|
> CommonSuccessEmptyResource installWordPressV1(wordPressV1InstallationsInstallWordPressRequest)
|
|
309
309
|
|
|
310
|
-
Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`
|
|
310
|
+
Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`hosting_websites_create`) and poll GET /api/hosting/v1/onboardings (`hosting_websites_list-setups`) with the `domain` filter until its `status` is `completed`. Send `type: headless` to turn a headless website (for example one created by `hosting_websites_create` with `type: headless_empty`) into a headless WordPress website: WordPress is installed into the `cms` directory with the Hostinger headless MU plugin and the website is marked as a headless WordPress website. `directory` is not allowed with it. The target website must already be headless: the headless install rewrites the root `.htaccess`, so on any other website the request is rejected with 422. Call GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain before proceeding to check whether WordPress is already installed on the target domain/path. If WordPress already exists and `overwrite` is false (the default), the async job will fail. This operation is asynchronous: a successful response only means the install job has been queued, not that WordPress is ready. Installation typically takes 1-2 minutes. Poll GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain to track progress. When the installation appears in that list, WordPress is ready. Returns 422 when the account already uses all the databases its plan allows, unless `database.name` is an existing database on the account.
|
|
311
311
|
|
|
312
312
|
### Example
|
|
313
313
|
|
|
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**domain** | **string** | Domain of the existing website where WordPress will be installed | [default to undefined]
|
|
9
9
|
**site_title** | **string** | Title of the WordPress site | [default to undefined]
|
|
10
10
|
**language** | **string** | WordPress locale. Defaults to en_US when omitted. | [optional] [default to undefined]
|
|
11
|
-
**type** | **string** | Installation kind; `default` when omitted. `headless` installs WordPress into the `cms` directory with the Hostinger headless MU plugin and marks the website as a headless WordPress website. Accepted only for a website that is already headless, e.g. one created by `POST /api/hosting/v1/orders/{order_id}/onboardings` (`
|
|
11
|
+
**type** | **string** | Installation kind; `default` when omitted. `headless` installs WordPress into the `cms` directory with the Hostinger headless MU plugin and marks the website as a headless WordPress website. Accepted only for a website that is already headless, e.g. one created by `POST /api/hosting/v1/orders/{order_id}/onboardings` (`hosting_websites_create`) with `type: headless_empty`; any other website is rejected with 422. | [optional] [default to undefined]
|
|
12
12
|
**directory** | **string** | Installation subdirectory relative to the document root; omit for the root. Not allowed with `type: headless`, which always installs into `cms`. | [optional] [default to undefined]
|
|
13
13
|
**overwrite** | **boolean** | When false (default), does not replace an existing installation. If WordPress is already installed on the domain/path, the async install job fails unless true. | [optional] [default to undefined]
|
|
14
14
|
**auto_updates** | **string** | WordPress core auto-update policy | [optional] [default to undefined]
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.7.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
|