hostinger-api-sdk 1.38.0 → 1.40.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 +1536 -32
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +1086 -30
- package/dist/api.js +902 -44
- 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 +1086 -30
- package/dist/esm/api.js +892 -34
- 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/AgencyHostingFilesApi.md +54 -0
- package/docs/AgencyHostingListAgencyPlanWebsitesV1200Response.md +22 -0
- package/docs/AgencyHostingV1WebsitesBuilderWebsiteDetailsResource.md +28 -0
- package/docs/AgencyHostingV1WebsitesH5gWebsiteDetailsResource.md +46 -0
- package/docs/AgencyHostingV1WebsitesPlanResource.md +25 -0
- package/docs/AgencyHostingV1WebsitesU4sWebsiteDetailsResource.md +36 -0
- package/docs/AgencyHostingV1WebsitesWebsiteListItemResource.md +37 -0
- package/docs/AgencyHostingV1WebsitesWebsiteListItemResourceDetails.md +59 -0
- package/docs/AgencyHostingWebsitesApi.md +69 -0
- package/docs/HostingDatabasesApi.md +2 -2
- package/docs/HostingFilesApi.md +56 -0
- package/docs/HostingNodeJSApi.md +124 -1
- package/docs/HostingV1FilesGenerateUploadUrlRequest.md +22 -0
- package/docs/HostingV1FilesUploadUrlResource.md +24 -0
- package/docs/HostingV1NodeJsBuildSettingsResource.md +34 -0
- package/docs/HostingV1NodeJsGetBuildSettingsRequest.md +20 -0
- package/docs/HostingV1NodeJsStartBuildRequest.md +36 -0
- package/docs/HostingV1NodeJsStartBuildRequestSourceOptions.md +21 -0
- package/docs/HostingV1WebsitesDeployArchiveRequest.md +20 -0
- package/docs/HostingWebsitesApi.md +69 -4
- package/docs/WordPressInstallationsApi.md +64 -2
- package/docs/WordPressPluginsApi.md +64 -2
- package/docs/WordPressThemesApi.md +62 -0
- package/docs/WordPressV1InstallationsImportWordPressRequest.md +22 -0
- package/docs/WordPressV1PluginsDeployPluginRequest.md +22 -0
- package/docs/WordPressV1ThemesDeployThemeRequest.md +24 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/docs/HostingNodeJSApi.md
CHANGED
|
@@ -6,15 +6,17 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
|[**createNodeJSBuildFromArchiveV1**](#createnodejsbuildfromarchivev1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/from-archive | Create NodeJS build from archive|
|
|
8
8
|
|[**getNodeJSBuildLogsV1**](#getnodejsbuildlogsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/logs | Get NodeJS build logs|
|
|
9
|
+
|[**getNodeJsBuildSettingsFromArchiveV1**](#getnodejsbuildsettingsfromarchivev1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/from-archive | Get Node.js build settings from archive|
|
|
9
10
|
|[**listNodeJSBuildsV1**](#listnodejsbuildsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds | List NodeJS builds|
|
|
10
11
|
|[**listNodeJsVulnerabilitiesV1**](#listnodejsvulnerabilitiesv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/vulnerabilities | List Node.js vulnerabilities|
|
|
11
12
|
|[**patchNodeJsVulnerabilitiesV1**](#patchnodejsvulnerabilitiesv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/vulnerabilities/patch | Patch Node.js vulnerabilities|
|
|
12
13
|
|[**restartNodeJsApplicationV1**](#restartnodejsapplicationv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/server/restart | Restart Node.js application|
|
|
14
|
+
|[**startNodeJsBuildV1**](#startnodejsbuildv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds | Start Node.js build|
|
|
13
15
|
|
|
14
16
|
# **createNodeJSBuildFromArchiveV1**
|
|
15
17
|
> HostingV1NodeJsBuildResource createNodeJSBuildFromArchiveV1(hostingV1NodeJsCreateFromArchiveRequest)
|
|
16
18
|
|
|
17
|
-
Upload a project archive, auto-detect build settings, and immediately start a Node.js build. This is the recommended single-step approach for deploying a Node.js application. The archive is uploaded to the website\'s file storage, build settings are auto-detected from the package.json inside the archive, and the build process starts automatically. Optional override fields take precedence over auto-detected values. Maximum archive size is 50MB. Before archiving, exclude `node_modules/` and any build output directories (e.g. `dist/`, `.next/`, `build/`) — they are not needed because the build process runs the install step automatically, and including them unnecessarily increases the archive size. This also helps keep the archive well under the 50MB limit. Example (zip): ``` zip -r archive.zip . --exclude \"node_modules/_*\" --exclude \"dist/_*\" ``` The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
|
|
19
|
+
Upload a project archive, auto-detect build settings, and immediately start a Node.js build. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. This is the recommended single-step approach for deploying a Node.js application. The archive is uploaded to the website\'s file storage, build settings are auto-detected from the package.json inside the archive, and the build process starts automatically. Optional override fields take precedence over auto-detected values. Maximum archive size is 50MB. Before archiving, exclude `node_modules/` and any build output directories (e.g. `dist/`, `.next/`, `build/`) — they are not needed because the build process runs the install step automatically, and including them unnecessarily increases the archive size. This also helps keep the archive well under the 50MB limit. Example (zip): ``` zip -r archive.zip . --exclude \"node_modules/_*\" --exclude \"dist/_*\" ``` The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
|
|
18
20
|
|
|
19
21
|
### Example
|
|
20
22
|
|
|
@@ -125,6 +127,66 @@ const { status, data } = await apiInstance.getNodeJSBuildLogsV1(
|
|
|
125
127
|
- **Accept**: application/json
|
|
126
128
|
|
|
127
129
|
|
|
130
|
+
### HTTP response details
|
|
131
|
+
| Status code | Description | Response headers |
|
|
132
|
+
|-------------|-------------|------------------|
|
|
133
|
+
|**200** | Success response | - |
|
|
134
|
+
|**422** | Validation error response | - |
|
|
135
|
+
|**401** | Unauthenticated response | - |
|
|
136
|
+
|**500** | Error response | - |
|
|
137
|
+
|
|
138
|
+
[[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)
|
|
139
|
+
|
|
140
|
+
# **getNodeJsBuildSettingsFromArchiveV1**
|
|
141
|
+
> HostingV1NodeJsBuildSettingsResource getNodeJsBuildSettingsFromArchiveV1()
|
|
142
|
+
|
|
143
|
+
Auto-detect Node.js build settings from a package.json inside an archive already on the server. Use this before calling `Start Node.js Build` to preview what settings will be used, or to let the user review and override values (framework, node version, root directory, output directory, build script) before committing to a build. The archive must already be present on the website\'s file storage. Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To upload an archive and start a build in one step without inspecting settings first, use the `Create Node.js Build from Archive` endpoint instead.
|
|
144
|
+
|
|
145
|
+
### Example
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
import {
|
|
149
|
+
HostingNodeJSApi,
|
|
150
|
+
Configuration
|
|
151
|
+
} from 'hostinger-api-sdk';
|
|
152
|
+
|
|
153
|
+
const configuration = new Configuration();
|
|
154
|
+
const apiInstance = new HostingNodeJSApi(configuration);
|
|
155
|
+
|
|
156
|
+
let username: string; // (default to undefined)
|
|
157
|
+
let domain: string; //Domain name (default to undefined)
|
|
158
|
+
let archivePath: string; //The path to the archive file relative to the document root of the vhost (default to undefined)
|
|
159
|
+
|
|
160
|
+
const { status, data } = await apiInstance.getNodeJsBuildSettingsFromArchiveV1(
|
|
161
|
+
username,
|
|
162
|
+
domain,
|
|
163
|
+
archivePath
|
|
164
|
+
);
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Parameters
|
|
168
|
+
|
|
169
|
+
|Name | Type | Description | Notes|
|
|
170
|
+
|------------- | ------------- | ------------- | -------------|
|
|
171
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
172
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
173
|
+
| **archivePath** | [**string**] | The path to the archive file relative to the document root of the vhost | defaults to undefined|
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
### Return type
|
|
177
|
+
|
|
178
|
+
**HostingV1NodeJsBuildSettingsResource**
|
|
179
|
+
|
|
180
|
+
### Authorization
|
|
181
|
+
|
|
182
|
+
[apiToken](../README.md#apiToken)
|
|
183
|
+
|
|
184
|
+
### HTTP request headers
|
|
185
|
+
|
|
186
|
+
- **Content-Type**: Not defined
|
|
187
|
+
- **Accept**: application/json
|
|
188
|
+
|
|
189
|
+
|
|
128
190
|
### HTTP response details
|
|
129
191
|
| Status code | Description | Response headers |
|
|
130
192
|
|-------------|-------------|------------------|
|
|
@@ -376,3 +438,64 @@ const { status, data } = await apiInstance.restartNodeJsApplicationV1(
|
|
|
376
438
|
|
|
377
439
|
[[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)
|
|
378
440
|
|
|
441
|
+
# **startNodeJsBuildV1**
|
|
442
|
+
> HostingV1NodeJsBuildResource startNodeJsBuildV1(hostingV1NodeJsStartBuildRequest)
|
|
443
|
+
|
|
444
|
+
Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. The `source_type` must be `archive` and `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. To upload an archive and start a build in one step, use the `Create Node.js Build from Archive` endpoint instead. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
|
|
445
|
+
|
|
446
|
+
### Example
|
|
447
|
+
|
|
448
|
+
```typescript
|
|
449
|
+
import {
|
|
450
|
+
HostingNodeJSApi,
|
|
451
|
+
Configuration,
|
|
452
|
+
HostingV1NodeJsStartBuildRequest
|
|
453
|
+
} from 'hostinger-api-sdk';
|
|
454
|
+
|
|
455
|
+
const configuration = new Configuration();
|
|
456
|
+
const apiInstance = new HostingNodeJSApi(configuration);
|
|
457
|
+
|
|
458
|
+
let username: string; // (default to undefined)
|
|
459
|
+
let domain: string; //Domain name (default to undefined)
|
|
460
|
+
let hostingV1NodeJsStartBuildRequest: HostingV1NodeJsStartBuildRequest; //
|
|
461
|
+
|
|
462
|
+
const { status, data } = await apiInstance.startNodeJsBuildV1(
|
|
463
|
+
username,
|
|
464
|
+
domain,
|
|
465
|
+
hostingV1NodeJsStartBuildRequest
|
|
466
|
+
);
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### Parameters
|
|
470
|
+
|
|
471
|
+
|Name | Type | Description | Notes|
|
|
472
|
+
|------------- | ------------- | ------------- | -------------|
|
|
473
|
+
| **hostingV1NodeJsStartBuildRequest** | **HostingV1NodeJsStartBuildRequest**| | |
|
|
474
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
475
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
### Return type
|
|
479
|
+
|
|
480
|
+
**HostingV1NodeJsBuildResource**
|
|
481
|
+
|
|
482
|
+
### Authorization
|
|
483
|
+
|
|
484
|
+
[apiToken](../README.md#apiToken)
|
|
485
|
+
|
|
486
|
+
### HTTP request headers
|
|
487
|
+
|
|
488
|
+
- **Content-Type**: application/json
|
|
489
|
+
- **Accept**: application/json
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
### HTTP response details
|
|
493
|
+
| Status code | Description | Response headers |
|
|
494
|
+
|-------------|-------------|------------------|
|
|
495
|
+
|**200** | Success response | - |
|
|
496
|
+
|**422** | Validation error response | - |
|
|
497
|
+
|**401** | Unauthenticated response | - |
|
|
498
|
+
|**500** | Error response | - |
|
|
499
|
+
|
|
500
|
+
[[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)
|
|
501
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# HostingV1FilesGenerateUploadUrlRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**username** | **string** | Account username | [default to undefined]
|
|
9
|
+
**domain** | **string** | Website domain | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { HostingV1FilesGenerateUploadUrlRequest } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: HostingV1FilesGenerateUploadUrlRequest = {
|
|
17
|
+
username,
|
|
18
|
+
domain,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# HostingV1FilesUploadUrlResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**url** | **string** | The TUS upload endpoint URL to send upload requests to | [default to undefined]
|
|
9
|
+
**auth_key** | **string** | Authentication token to pass as the `X-Auth` header in TUS upload requests | [default to undefined]
|
|
10
|
+
**rest_auth_key** | **string** | Authentication token to pass as the `X-Auth-Rest` header in TUS upload requests | [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { HostingV1FilesUploadUrlResource } from 'hostinger-api-sdk';
|
|
16
|
+
|
|
17
|
+
const instance: HostingV1FilesUploadUrlResource = {
|
|
18
|
+
url,
|
|
19
|
+
auth_key,
|
|
20
|
+
rest_auth_key,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# HostingV1NodeJsBuildSettingsResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**app_type** | **string** | Node.js application type | [default to undefined]
|
|
9
|
+
**node_version** | **number** | Node.js version | [default to undefined]
|
|
10
|
+
**root_directory** | **string** | Application root directory | [default to undefined]
|
|
11
|
+
**output_directory** | **string** | Build output directory | [default to undefined]
|
|
12
|
+
**build_script** | **string** | The npm script to run to build the application | [default to undefined]
|
|
13
|
+
**entry_file** | **string** | The main entry point file for the application | [default to undefined]
|
|
14
|
+
**package_manager** | **string** | Package manager | [default to undefined]
|
|
15
|
+
**available_scripts** | **Array<string>** | The scripts configured in the package.json file | [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { HostingV1NodeJsBuildSettingsResource } from 'hostinger-api-sdk';
|
|
21
|
+
|
|
22
|
+
const instance: HostingV1NodeJsBuildSettingsResource = {
|
|
23
|
+
app_type,
|
|
24
|
+
node_version,
|
|
25
|
+
root_directory,
|
|
26
|
+
output_directory,
|
|
27
|
+
build_script,
|
|
28
|
+
entry_file,
|
|
29
|
+
package_manager,
|
|
30
|
+
available_scripts,
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# HostingV1NodeJsGetBuildSettingsRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**archive_path** | **string** | The path to the archive file relative to the document root of the vhost | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { HostingV1NodeJsGetBuildSettingsRequest } from 'hostinger-api-sdk';
|
|
14
|
+
|
|
15
|
+
const instance: HostingV1NodeJsGetBuildSettingsRequest = {
|
|
16
|
+
archive_path,
|
|
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,36 @@
|
|
|
1
|
+
# HostingV1NodeJsStartBuildRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**node_version** | **number** | Node.js version | [default to undefined]
|
|
9
|
+
**app_type** | **string** | Node.js application type | [default to undefined]
|
|
10
|
+
**root_directory** | **string** | Application root directory (where package.json is located) relative to public_html | [default to undefined]
|
|
11
|
+
**output_directory** | **string** | Build output directory relative to the root directory | [default to undefined]
|
|
12
|
+
**build_script** | **string** | Build script that will be ran to build the application | [default to undefined]
|
|
13
|
+
**entry_file** | **string** | The main entry point file for the application | [optional] [default to undefined]
|
|
14
|
+
**package_manager** | **string** | Package manager | [optional] [default to undefined]
|
|
15
|
+
**source_type** | **string** | The source type of the files | [default to undefined]
|
|
16
|
+
**source_options** | [**HostingV1NodeJsStartBuildRequestSourceOptions**](HostingV1NodeJsStartBuildRequestSourceOptions.md) | | [default to undefined]
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { HostingV1NodeJsStartBuildRequest } from 'hostinger-api-sdk';
|
|
22
|
+
|
|
23
|
+
const instance: HostingV1NodeJsStartBuildRequest = {
|
|
24
|
+
node_version,
|
|
25
|
+
app_type,
|
|
26
|
+
root_directory,
|
|
27
|
+
output_directory,
|
|
28
|
+
build_script,
|
|
29
|
+
entry_file,
|
|
30
|
+
package_manager,
|
|
31
|
+
source_type,
|
|
32
|
+
source_options,
|
|
33
|
+
};
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[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,21 @@
|
|
|
1
|
+
# HostingV1NodeJsStartBuildRequestSourceOptions
|
|
2
|
+
|
|
3
|
+
Source-specific options
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**archive_path** | **string** | The path to the archive file relative to the document root of the vhost (required if source is \"archive\") | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { HostingV1NodeJsStartBuildRequestSourceOptions } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: HostingV1NodeJsStartBuildRequestSourceOptions = {
|
|
17
|
+
archive_path,
|
|
18
|
+
};
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
[[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
|
+
# HostingV1WebsitesDeployArchiveRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**archive_path** | **string** | Relative path to the archive file from website root directory | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { HostingV1WebsitesDeployArchiveRequest } from 'hostinger-api-sdk';
|
|
14
|
+
|
|
15
|
+
const instance: HostingV1WebsitesDeployArchiveRequest = {
|
|
16
|
+
archive_path,
|
|
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)
|
|
@@ -6,6 +6,7 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
|[**createWebsiteV1**](#createwebsitev1) | **POST** /api/hosting/v1/websites | Create website|
|
|
8
8
|
|[**deleteWebsiteV1**](#deletewebsitev1) | **DELETE** /api/hosting/v1/websites/{domain} | Delete website|
|
|
9
|
+
|[**deployStaticSiteArchiveV1**](#deploystaticsitearchivev1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/deploy | Deploy static site archive|
|
|
9
10
|
|[**listWebsitesV1**](#listwebsitesv1) | **GET** /api/hosting/v1/websites | List websites|
|
|
10
11
|
|
|
11
12
|
# **createWebsiteV1**
|
|
@@ -117,10 +118,71 @@ const { status, data } = await apiInstance.deleteWebsiteV1(
|
|
|
117
118
|
|
|
118
119
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
119
120
|
|
|
121
|
+
# **deployStaticSiteArchiveV1**
|
|
122
|
+
> CommonSuccessEmptyResource deployStaticSiteArchiveV1(hostingV1WebsitesDeployArchiveRequest)
|
|
123
|
+
|
|
124
|
+
Deploy a static application from an archive file. WARNING: this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. This endpoint allows you to deploy a static application from an archive file that has been uploaded to the website\'s directory. This only works for static sites (pre-built HTML/CSS/JS with no build step). For Node.js applications, use `Create NodeJS build from archive` instead, or `Start Node.js build` if the archive is already uploaded. For WordPress sites, use `Import WordPress website`.
|
|
125
|
+
|
|
126
|
+
### Example
|
|
127
|
+
|
|
128
|
+
```typescript
|
|
129
|
+
import {
|
|
130
|
+
HostingWebsitesApi,
|
|
131
|
+
Configuration,
|
|
132
|
+
HostingV1WebsitesDeployArchiveRequest
|
|
133
|
+
} from 'hostinger-api-sdk';
|
|
134
|
+
|
|
135
|
+
const configuration = new Configuration();
|
|
136
|
+
const apiInstance = new HostingWebsitesApi(configuration);
|
|
137
|
+
|
|
138
|
+
let username: string; // (default to undefined)
|
|
139
|
+
let domain: string; //Domain name (default to undefined)
|
|
140
|
+
let hostingV1WebsitesDeployArchiveRequest: HostingV1WebsitesDeployArchiveRequest; //
|
|
141
|
+
|
|
142
|
+
const { status, data } = await apiInstance.deployStaticSiteArchiveV1(
|
|
143
|
+
username,
|
|
144
|
+
domain,
|
|
145
|
+
hostingV1WebsitesDeployArchiveRequest
|
|
146
|
+
);
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Parameters
|
|
150
|
+
|
|
151
|
+
|Name | Type | Description | Notes|
|
|
152
|
+
|------------- | ------------- | ------------- | -------------|
|
|
153
|
+
| **hostingV1WebsitesDeployArchiveRequest** | **HostingV1WebsitesDeployArchiveRequest**| | |
|
|
154
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
155
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### Return type
|
|
159
|
+
|
|
160
|
+
**CommonSuccessEmptyResource**
|
|
161
|
+
|
|
162
|
+
### Authorization
|
|
163
|
+
|
|
164
|
+
[apiToken](../README.md#apiToken)
|
|
165
|
+
|
|
166
|
+
### HTTP request headers
|
|
167
|
+
|
|
168
|
+
- **Content-Type**: application/json
|
|
169
|
+
- **Accept**: application/json
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### HTTP response details
|
|
173
|
+
| Status code | Description | Response headers |
|
|
174
|
+
|-------------|-------------|------------------|
|
|
175
|
+
|**200** | Success response | - |
|
|
176
|
+
|**422** | Validation error response | - |
|
|
177
|
+
|**401** | Unauthenticated response | - |
|
|
178
|
+
|**500** | Error response | - |
|
|
179
|
+
|
|
180
|
+
[[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)
|
|
181
|
+
|
|
120
182
|
# **listWebsitesV1**
|
|
121
183
|
> HostingListWebsitesV1200Response listWebsitesV1()
|
|
122
184
|
|
|
123
|
-
Retrieve a paginated list of websites (CloudLinux, Builder, and Horizons) accessible to the authenticated client. This endpoint returns websites from your hosting accounts as well as websites from other client hosting accounts that have shared access with you. Each website includes a `website_type` field describing the type of website detected on the underlying platform (`wordpress`, `builder`, `horizons`, `nodejs`, or `other`). Some fields, such as `vhost_type`, `username`, and `root_directory`, only apply to CloudLinux websites and are null for other platforms. Use the available query parameters to filter
|
|
185
|
+
Retrieve a paginated list of websites (CloudLinux, Builder, and Horizons) accessible to the authenticated client. This endpoint returns websites from your hosting accounts as well as websites from other client hosting accounts that have shared access with you. Each website includes a `website_type` field describing the type of website detected on the underlying platform (`wordpress`, `builder`, `horizons`, `nodejs`, or `other`). Some fields, such as `vhost_type`, `username`, and `root_directory`, only apply to CloudLinux websites and are null for other platforms. Use `website_types` to list only websites of a given detected type, e.g. only WordPress websites (`website_types=wordpress`) or only Node.js websites (`website_types=nodejs`). Combine with the other available query parameters to filter by username, order ID, enabled status, or domain name for more targeted results.
|
|
124
186
|
|
|
125
187
|
### Example
|
|
126
188
|
|
|
@@ -138,7 +200,8 @@ let perPage: number; //Number of items per page (optional) (default to 25)
|
|
|
138
200
|
let username: string; //Filter by specific username (optional) (default to undefined)
|
|
139
201
|
let orderId: number; //Order ID (optional) (default to undefined)
|
|
140
202
|
let isEnabled: boolean; //Filter by enabled status (optional) (default to undefined)
|
|
141
|
-
let domain: string; //Filter by domain name (
|
|
203
|
+
let domain: string; //Filter by domain name (case-insensitive substring match) (optional) (default to undefined)
|
|
204
|
+
let websiteTypes: Array<'wordpress' | 'builder' | 'horizons' | 'nodejs' | 'other'>; //Filter by detected website type, e.g. wordpress,nodejs. Accepts a comma-separated list. (optional) (default to undefined)
|
|
142
205
|
|
|
143
206
|
const { status, data } = await apiInstance.listWebsitesV1(
|
|
144
207
|
page,
|
|
@@ -146,7 +209,8 @@ const { status, data } = await apiInstance.listWebsitesV1(
|
|
|
146
209
|
username,
|
|
147
210
|
orderId,
|
|
148
211
|
isEnabled,
|
|
149
|
-
domain
|
|
212
|
+
domain,
|
|
213
|
+
websiteTypes
|
|
150
214
|
);
|
|
151
215
|
```
|
|
152
216
|
|
|
@@ -159,7 +223,8 @@ const { status, data } = await apiInstance.listWebsitesV1(
|
|
|
159
223
|
| **username** | [**string**] | Filter by specific username | (optional) defaults to undefined|
|
|
160
224
|
| **orderId** | [**number**] | Order ID | (optional) defaults to undefined|
|
|
161
225
|
| **isEnabled** | [**boolean**] | Filter by enabled status | (optional) defaults to undefined|
|
|
162
|
-
| **domain** | [**string**] | Filter by domain name (
|
|
226
|
+
| **domain** | [**string**] | Filter by domain name (case-insensitive substring match) | (optional) defaults to undefined|
|
|
227
|
+
| **websiteTypes** | **Array<'wordpress' | 'builder' | 'horizons' | 'nodejs' | 'other'>** | Filter by detected website type, e.g. wordpress,nodejs. Accepts a comma-separated list. | (optional) defaults to undefined|
|
|
163
228
|
|
|
164
229
|
|
|
165
230
|
### Return type
|
|
@@ -8,6 +8,7 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
8
8
|
|[**deleteWordPressInstallationV1**](#deletewordpressinstallationv1) | **DELETE** /api/hosting/v1/accounts/{username}/wordpress/{software} | Delete WordPress installation|
|
|
9
9
|
|[**detectWordPressInstallationsV1**](#detectwordpressinstallationsv1) | **POST** /api/hosting/v1/accounts/{username}/wordpress/installations/detect | Detect WordPress installations|
|
|
10
10
|
|[**getInstallationJWTTokenV1**](#getinstallationjwttokenv1) | **GET** /api/hosting/v1/accounts/{username}/wordpress/{software}/jwt-token | Get installation JWT token|
|
|
11
|
+
|[**importWordPressWebsiteV1**](#importwordpresswebsitev1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/wordpress/import | Import WordPress website|
|
|
11
12
|
|[**installWordPressV1**](#installwordpressv1) | **POST** /api/hosting/v1/accounts/{username}/wordpress/installations | Install WordPress|
|
|
12
13
|
|[**listAvailableWordPressCoreUpdatesV1**](#listavailablewordpresscoreupdatesv1) | **GET** /api/hosting/v1/accounts/{username}/wordpress/{software}/updates | List available WordPress core updates|
|
|
13
14
|
|[**listWordPressInstallationsV1**](#listwordpressinstallationsv1) | **GET** /api/hosting/v1/wordpress/installations | List WordPress installations|
|
|
@@ -242,6 +243,67 @@ const { status, data } = await apiInstance.getInstallationJWTTokenV1(
|
|
|
242
243
|
|
|
243
244
|
[[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)
|
|
244
245
|
|
|
246
|
+
# **importWordPressWebsiteV1**
|
|
247
|
+
> CommonSuccessEmptyResource importWordPressWebsiteV1(wordPressV1InstallationsImportWordPressRequest)
|
|
248
|
+
|
|
249
|
+
Import WordPress website to the specified domain. WARNING: this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. This endpoint allows you to import a WordPress website from archive and database files that have been uploaded to the website\'s directory.
|
|
250
|
+
|
|
251
|
+
### Example
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
import {
|
|
255
|
+
WordPressInstallationsApi,
|
|
256
|
+
Configuration,
|
|
257
|
+
WordPressV1InstallationsImportWordPressRequest
|
|
258
|
+
} from 'hostinger-api-sdk';
|
|
259
|
+
|
|
260
|
+
const configuration = new Configuration();
|
|
261
|
+
const apiInstance = new WordPressInstallationsApi(configuration);
|
|
262
|
+
|
|
263
|
+
let username: string; // (default to undefined)
|
|
264
|
+
let domain: string; //Domain name (default to undefined)
|
|
265
|
+
let wordPressV1InstallationsImportWordPressRequest: WordPressV1InstallationsImportWordPressRequest; //
|
|
266
|
+
|
|
267
|
+
const { status, data } = await apiInstance.importWordPressWebsiteV1(
|
|
268
|
+
username,
|
|
269
|
+
domain,
|
|
270
|
+
wordPressV1InstallationsImportWordPressRequest
|
|
271
|
+
);
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Parameters
|
|
275
|
+
|
|
276
|
+
|Name | Type | Description | Notes|
|
|
277
|
+
|------------- | ------------- | ------------- | -------------|
|
|
278
|
+
| **wordPressV1InstallationsImportWordPressRequest** | **WordPressV1InstallationsImportWordPressRequest**| | |
|
|
279
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
280
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
### Return type
|
|
284
|
+
|
|
285
|
+
**CommonSuccessEmptyResource**
|
|
286
|
+
|
|
287
|
+
### Authorization
|
|
288
|
+
|
|
289
|
+
[apiToken](../README.md#apiToken)
|
|
290
|
+
|
|
291
|
+
### HTTP request headers
|
|
292
|
+
|
|
293
|
+
- **Content-Type**: application/json
|
|
294
|
+
- **Accept**: application/json
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
### HTTP response details
|
|
298
|
+
| Status code | Description | Response headers |
|
|
299
|
+
|-------------|-------------|------------------|
|
|
300
|
+
|**200** | Success response | - |
|
|
301
|
+
|**422** | Validation error response | - |
|
|
302
|
+
|**401** | Unauthenticated response | - |
|
|
303
|
+
|**500** | Error response | - |
|
|
304
|
+
|
|
305
|
+
[[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)
|
|
306
|
+
|
|
245
307
|
# **installWordPressV1**
|
|
246
308
|
> CommonSuccessEmptyResource installWordPressV1(wordPressV1InstallationsInstallWordPressRequest)
|
|
247
309
|
|
|
@@ -373,7 +435,7 @@ const configuration = new Configuration();
|
|
|
373
435
|
const apiInstance = new WordPressInstallationsApi(configuration);
|
|
374
436
|
|
|
375
437
|
let username: string; //Filter by specific username (optional) (default to undefined)
|
|
376
|
-
let domain: string; //Filter by domain name (
|
|
438
|
+
let domain: string; //Filter by domain name (case-insensitive substring match) (optional) (default to undefined)
|
|
377
439
|
let ownership: 'owned' | 'managed' | 'all'; //Filter by ownership type. Defaults to \"owned\". Use \"all\" to include both owned and managed installations. (optional) (default to undefined)
|
|
378
440
|
|
|
379
441
|
const { status, data } = await apiInstance.listWordPressInstallationsV1(
|
|
@@ -388,7 +450,7 @@ const { status, data } = await apiInstance.listWordPressInstallationsV1(
|
|
|
388
450
|
|Name | Type | Description | Notes|
|
|
389
451
|
|------------- | ------------- | ------------- | -------------|
|
|
390
452
|
| **username** | [**string**] | Filter by specific username | (optional) defaults to undefined|
|
|
391
|
-
| **domain** | [**string**] | Filter by domain name (
|
|
453
|
+
| **domain** | [**string**] | Filter by domain name (case-insensitive substring match) | (optional) defaults to undefined|
|
|
392
454
|
| **ownership** | [**'owned' | 'managed' | 'all'**]**Array<'owned' | 'managed' | 'all'>** | Filter by ownership type. Defaults to \"owned\". Use \"all\" to include both owned and managed installations. | (optional) defaults to undefined|
|
|
393
455
|
|
|
394
456
|
|
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
7
7
|
|[**activateWordPressPluginV1**](#activatewordpresspluginv1) | **POST** /api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/activate | Activate WordPress plugin|
|
|
8
8
|
|[**checkIfWooCommerceIsInstalledV1**](#checkifwoocommerceisinstalledv1) | **GET** /api/hosting/v1/wordpress/plugins/is-woocommerce-installed | Check if WooCommerce is installed|
|
|
9
9
|
|[**deactivateWordPressPluginV1**](#deactivatewordpresspluginv1) | **POST** /api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/deactivate | Deactivate WordPress plugin|
|
|
10
|
+
|[**deployWordPressPluginV1**](#deploywordpresspluginv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/wordpress/plugins/deploy | Deploy WordPress plugin|
|
|
10
11
|
|[**installWordPressPluginsV1**](#installwordpresspluginsv1) | **POST** /api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/install | Install WordPress plugins|
|
|
11
12
|
|[**listAvailableWordPressPluginsV1**](#listavailablewordpresspluginsv1) | **GET** /api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/available | List available WordPress plugins|
|
|
12
13
|
|[**listInstalledWordPressPluginsV1**](#listinstalledwordpresspluginsv1) | **GET** /api/hosting/v1/accounts/{username}/wordpress/{software}/plugins | List installed WordPress plugins|
|
|
@@ -93,7 +94,7 @@ import {
|
|
|
93
94
|
const configuration = new Configuration();
|
|
94
95
|
const apiInstance = new WordPressPluginsApi(configuration);
|
|
95
96
|
|
|
96
|
-
let domain: string; //Filter by domain name (
|
|
97
|
+
let domain: string; //Filter by domain name (case-insensitive substring match) (optional) (default to undefined)
|
|
97
98
|
|
|
98
99
|
const { status, data } = await apiInstance.checkIfWooCommerceIsInstalledV1(
|
|
99
100
|
domain
|
|
@@ -104,7 +105,7 @@ const { status, data } = await apiInstance.checkIfWooCommerceIsInstalledV1(
|
|
|
104
105
|
|
|
105
106
|
|Name | Type | Description | Notes|
|
|
106
107
|
|------------- | ------------- | ------------- | -------------|
|
|
107
|
-
| **domain** | [**string**] | Filter by domain name (
|
|
108
|
+
| **domain** | [**string**] | Filter by domain name (case-insensitive substring match) | (optional) defaults to undefined|
|
|
108
109
|
|
|
109
110
|
|
|
110
111
|
### Return type
|
|
@@ -191,6 +192,67 @@ const { status, data } = await apiInstance.deactivateWordPressPluginV1(
|
|
|
191
192
|
|
|
192
193
|
[[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)
|
|
193
194
|
|
|
195
|
+
# **deployWordPressPluginV1**
|
|
196
|
+
> CommonSuccessEmptyResource deployWordPressPluginV1(wordPressV1PluginsDeployPluginRequest)
|
|
197
|
+
|
|
198
|
+
Deploy a WordPress plugin from an already uploaded directory. This endpoint allows you to deploy a WordPress plugin that has been uploaded to the website\'s directory. The plugin will be activated and made available in the WordPress admin panel.
|
|
199
|
+
|
|
200
|
+
### Example
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
import {
|
|
204
|
+
WordPressPluginsApi,
|
|
205
|
+
Configuration,
|
|
206
|
+
WordPressV1PluginsDeployPluginRequest
|
|
207
|
+
} from 'hostinger-api-sdk';
|
|
208
|
+
|
|
209
|
+
const configuration = new Configuration();
|
|
210
|
+
const apiInstance = new WordPressPluginsApi(configuration);
|
|
211
|
+
|
|
212
|
+
let username: string; // (default to undefined)
|
|
213
|
+
let domain: string; //Domain name (default to undefined)
|
|
214
|
+
let wordPressV1PluginsDeployPluginRequest: WordPressV1PluginsDeployPluginRequest; //
|
|
215
|
+
|
|
216
|
+
const { status, data } = await apiInstance.deployWordPressPluginV1(
|
|
217
|
+
username,
|
|
218
|
+
domain,
|
|
219
|
+
wordPressV1PluginsDeployPluginRequest
|
|
220
|
+
);
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Parameters
|
|
224
|
+
|
|
225
|
+
|Name | Type | Description | Notes|
|
|
226
|
+
|------------- | ------------- | ------------- | -------------|
|
|
227
|
+
| **wordPressV1PluginsDeployPluginRequest** | **WordPressV1PluginsDeployPluginRequest**| | |
|
|
228
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
229
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
### Return type
|
|
233
|
+
|
|
234
|
+
**CommonSuccessEmptyResource**
|
|
235
|
+
|
|
236
|
+
### Authorization
|
|
237
|
+
|
|
238
|
+
[apiToken](../README.md#apiToken)
|
|
239
|
+
|
|
240
|
+
### HTTP request headers
|
|
241
|
+
|
|
242
|
+
- **Content-Type**: application/json
|
|
243
|
+
- **Accept**: application/json
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
### HTTP response details
|
|
247
|
+
| Status code | Description | Response headers |
|
|
248
|
+
|-------------|-------------|------------------|
|
|
249
|
+
|**200** | Success response | - |
|
|
250
|
+
|**422** | Validation error response | - |
|
|
251
|
+
|**401** | Unauthenticated response | - |
|
|
252
|
+
|**500** | Error response | - |
|
|
253
|
+
|
|
254
|
+
[[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)
|
|
255
|
+
|
|
194
256
|
# **installWordPressPluginsV1**
|
|
195
257
|
> CommonSuccessEmptyResource installWordPressPluginsV1(wordPressV1PluginsInstallPluginsRequest)
|
|
196
258
|
|