hostinger-api-sdk 2.1.0 → 2.1.2
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 +402 -21
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +220 -21
- package/dist/api.js +369 -26
- 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 +220 -21
- package/dist/esm/api.js +356 -17
- 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/HostingCDNApi.md +238 -0
- package/docs/HostingCacheApi.md +1 -1
- package/docs/HostingV1CdnCdnStatusResource.md +20 -0
- package/docs/HostingV1OnboardingsOnboardingResource.md +1 -1
- package/docs/HostingV1OnboardingsStartOnboardingRequest.md +2 -2
- package/docs/HostingWebsitesApi.md +2 -2
- package/docs/WordPressInstallationsApi.md +1 -1
- package/docs/WordPressV1InstallationsInstallWordPressRequest.md +3 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.1.
|
|
6
|
+
* API Version: 2.1.2
|
|
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
|
|
@@ -7228,6 +7228,19 @@ export interface HostingV1CacheToggleCachelessModeRequest {
|
|
|
7228
7228
|
*/
|
|
7229
7229
|
'enabled': boolean;
|
|
7230
7230
|
}
|
|
7231
|
+
/**
|
|
7232
|
+
*
|
|
7233
|
+
* @export
|
|
7234
|
+
* @interface HostingV1CdnCdnStatusResource
|
|
7235
|
+
*/
|
|
7236
|
+
export interface HostingV1CdnCdnStatusResource {
|
|
7237
|
+
/**
|
|
7238
|
+
* Whether the Hostinger CDN is enabled for the website domain
|
|
7239
|
+
* @type {boolean}
|
|
7240
|
+
* @memberof HostingV1CdnCdnStatusResource
|
|
7241
|
+
*/
|
|
7242
|
+
'is_enabled': boolean;
|
|
7243
|
+
}
|
|
7231
7244
|
/**
|
|
7232
7245
|
*
|
|
7233
7246
|
* @export
|
|
@@ -9553,7 +9566,7 @@ export interface HostingV1OnboardingsOnboardingResource {
|
|
|
9553
9566
|
*/
|
|
9554
9567
|
'username': string;
|
|
9555
9568
|
/**
|
|
9556
|
-
* Website type requested for the setup: `wordpress`, `headless_wordpress`, `headless_ecommerce` or `headless_pocketbase`. `null` for an empty website. Setups started outside this API may report other legacy types.
|
|
9569
|
+
* Website type requested for the setup: `wordpress`, `headless_empty`, `headless_wordpress`, `headless_ecommerce` or `headless_pocketbase`. `null` for an empty website. Setups started outside this API may report other legacy types.
|
|
9557
9570
|
* @type {string}
|
|
9558
9571
|
* @memberof HostingV1OnboardingsOnboardingResource
|
|
9559
9572
|
*/
|
|
@@ -9593,13 +9606,13 @@ export type HostingV1OnboardingsOnboardingResourceStatusEnum = typeof HostingV1O
|
|
|
9593
9606
|
*/
|
|
9594
9607
|
export interface HostingV1OnboardingsStartOnboardingRequest {
|
|
9595
9608
|
/**
|
|
9596
|
-
* Website type. Omit or `null` for an empty website. `wordpress` installs WordPress in the website root and requires `wordpress`. The headless types (`headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory with generated credentials.
|
|
9609
|
+
* 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`.
|
|
9597
9610
|
* @type {string}
|
|
9598
9611
|
* @memberof HostingV1OnboardingsStartOnboardingRequest
|
|
9599
9612
|
*/
|
|
9600
9613
|
'type': HostingV1OnboardingsStartOnboardingRequestTypeEnum | null;
|
|
9601
9614
|
/**
|
|
9602
|
-
* Customer-owned domain. Cannot start with \"www.\" and can have at most one subdomain level, e.g. `blog.example.com`. Omit or `null` to set the website up on a generated temporary free subdomain.
|
|
9615
|
+
* Customer-owned domain, or a free subdomain you generated through `POST /api/hosting/v1/domains/free-subdomains` (`hosting_domains_generate-free-subdomain`) in the last 24 hours. Cannot start with \"www.\" and can have at most one subdomain level, e.g. `blog.example.com`. Omit or `null` to set the website up on a generated temporary free subdomain.
|
|
9603
9616
|
* @type {string}
|
|
9604
9617
|
* @memberof HostingV1OnboardingsStartOnboardingRequest
|
|
9605
9618
|
*/
|
|
@@ -9620,6 +9633,7 @@ export interface HostingV1OnboardingsStartOnboardingRequest {
|
|
|
9620
9633
|
|
|
9621
9634
|
export const HostingV1OnboardingsStartOnboardingRequestTypeEnum = {
|
|
9622
9635
|
Wordpress: 'wordpress',
|
|
9636
|
+
HeadlessEmpty: 'headless_empty',
|
|
9623
9637
|
HeadlessWordpress: 'headless_wordpress',
|
|
9624
9638
|
HeadlessEcommerce: 'headless_ecommerce',
|
|
9625
9639
|
HeadlessPocketbase: 'headless_pocketbase'
|
|
@@ -17480,7 +17494,13 @@ export interface WordPressV1InstallationsInstallWordPressRequest {
|
|
|
17480
17494
|
*/
|
|
17481
17495
|
'language': string | null;
|
|
17482
17496
|
/**
|
|
17483
|
-
*
|
|
17497
|
+
* 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_start-setup`) with `type: headless_empty`; any other website is rejected with 422.
|
|
17498
|
+
* @type {string}
|
|
17499
|
+
* @memberof WordPressV1InstallationsInstallWordPressRequest
|
|
17500
|
+
*/
|
|
17501
|
+
'type': WordPressV1InstallationsInstallWordPressRequestTypeEnum | null;
|
|
17502
|
+
/**
|
|
17503
|
+
* Installation subdirectory relative to the document root; omit for the root. Not allowed with `type: headless`, which always installs into `cms`.
|
|
17484
17504
|
* @type {string}
|
|
17485
17505
|
* @memberof WordPressV1InstallationsInstallWordPressRequest
|
|
17486
17506
|
*/
|
|
@@ -17517,6 +17537,12 @@ export interface WordPressV1InstallationsInstallWordPressRequest {
|
|
|
17517
17537
|
'database': WordPressV1InstallationsInstallWordPressRequestDatabase | null;
|
|
17518
17538
|
}
|
|
17519
17539
|
|
|
17540
|
+
export const WordPressV1InstallationsInstallWordPressRequestTypeEnum = {
|
|
17541
|
+
Default: 'default',
|
|
17542
|
+
Headless: 'headless'
|
|
17543
|
+
} as const;
|
|
17544
|
+
|
|
17545
|
+
export type WordPressV1InstallationsInstallWordPressRequestTypeEnum = typeof WordPressV1InstallationsInstallWordPressRequestTypeEnum[keyof typeof WordPressV1InstallationsInstallWordPressRequestTypeEnum];
|
|
17520
17546
|
export const WordPressV1InstallationsInstallWordPressRequestAutoUpdatesEnum = {
|
|
17521
17547
|
All: 'all',
|
|
17522
17548
|
None: 'none',
|
|
@@ -30815,6 +30841,361 @@ export class HorizonsWebsitesApi extends BaseAPI {
|
|
|
30815
30841
|
|
|
30816
30842
|
|
|
30817
30843
|
|
|
30844
|
+
/**
|
|
30845
|
+
* HostingCDNApi - axios parameter creator
|
|
30846
|
+
* @export
|
|
30847
|
+
*/
|
|
30848
|
+
export const HostingCDNApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
30849
|
+
return {
|
|
30850
|
+
/**
|
|
30851
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
30852
|
+
* @summary Disable CDN
|
|
30853
|
+
* @param {string} username
|
|
30854
|
+
* @param {string} domain Domain name
|
|
30855
|
+
* @param {*} [options] Override http request option.
|
|
30856
|
+
* @throws {RequiredError}
|
|
30857
|
+
*/
|
|
30858
|
+
disableCDNV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30859
|
+
// verify required parameter 'username' is not null or undefined
|
|
30860
|
+
assertParamExists('disableCDNV1', 'username', username)
|
|
30861
|
+
// verify required parameter 'domain' is not null or undefined
|
|
30862
|
+
assertParamExists('disableCDNV1', 'domain', domain)
|
|
30863
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/disable`
|
|
30864
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30865
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
30866
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
30867
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
30868
|
+
let baseOptions;
|
|
30869
|
+
if (configuration) {
|
|
30870
|
+
baseOptions = configuration.baseOptions;
|
|
30871
|
+
}
|
|
30872
|
+
|
|
30873
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
30874
|
+
const localVarHeaderParameter = {} as any;
|
|
30875
|
+
const localVarQueryParameter = {} as any;
|
|
30876
|
+
|
|
30877
|
+
// authentication apiToken required
|
|
30878
|
+
// http bearer authentication required
|
|
30879
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
30880
|
+
|
|
30881
|
+
|
|
30882
|
+
|
|
30883
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
30884
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30885
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30886
|
+
|
|
30887
|
+
return {
|
|
30888
|
+
url: toPathString(localVarUrlObj),
|
|
30889
|
+
options: localVarRequestOptions,
|
|
30890
|
+
};
|
|
30891
|
+
},
|
|
30892
|
+
/**
|
|
30893
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
30894
|
+
* @summary Enable CDN
|
|
30895
|
+
* @param {string} username
|
|
30896
|
+
* @param {string} domain Domain name
|
|
30897
|
+
* @param {*} [options] Override http request option.
|
|
30898
|
+
* @throws {RequiredError}
|
|
30899
|
+
*/
|
|
30900
|
+
enableCDNV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30901
|
+
// verify required parameter 'username' is not null or undefined
|
|
30902
|
+
assertParamExists('enableCDNV1', 'username', username)
|
|
30903
|
+
// verify required parameter 'domain' is not null or undefined
|
|
30904
|
+
assertParamExists('enableCDNV1', 'domain', domain)
|
|
30905
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/enable`
|
|
30906
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30907
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
30908
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
30909
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
30910
|
+
let baseOptions;
|
|
30911
|
+
if (configuration) {
|
|
30912
|
+
baseOptions = configuration.baseOptions;
|
|
30913
|
+
}
|
|
30914
|
+
|
|
30915
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
30916
|
+
const localVarHeaderParameter = {} as any;
|
|
30917
|
+
const localVarQueryParameter = {} as any;
|
|
30918
|
+
|
|
30919
|
+
// authentication apiToken required
|
|
30920
|
+
// http bearer authentication required
|
|
30921
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
30922
|
+
|
|
30923
|
+
|
|
30924
|
+
|
|
30925
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
30926
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30927
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30928
|
+
|
|
30929
|
+
return {
|
|
30930
|
+
url: toPathString(localVarUrlObj),
|
|
30931
|
+
options: localVarRequestOptions,
|
|
30932
|
+
};
|
|
30933
|
+
},
|
|
30934
|
+
/**
|
|
30935
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
30936
|
+
* @summary Get CDN status
|
|
30937
|
+
* @param {string} username
|
|
30938
|
+
* @param {string} domain Domain name
|
|
30939
|
+
* @param {*} [options] Override http request option.
|
|
30940
|
+
* @throws {RequiredError}
|
|
30941
|
+
*/
|
|
30942
|
+
getCDNStatusV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30943
|
+
// verify required parameter 'username' is not null or undefined
|
|
30944
|
+
assertParamExists('getCDNStatusV1', 'username', username)
|
|
30945
|
+
// verify required parameter 'domain' is not null or undefined
|
|
30946
|
+
assertParamExists('getCDNStatusV1', 'domain', domain)
|
|
30947
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/status`
|
|
30948
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30949
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
30950
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
30951
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
30952
|
+
let baseOptions;
|
|
30953
|
+
if (configuration) {
|
|
30954
|
+
baseOptions = configuration.baseOptions;
|
|
30955
|
+
}
|
|
30956
|
+
|
|
30957
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
30958
|
+
const localVarHeaderParameter = {} as any;
|
|
30959
|
+
const localVarQueryParameter = {} as any;
|
|
30960
|
+
|
|
30961
|
+
// authentication apiToken required
|
|
30962
|
+
// http bearer authentication required
|
|
30963
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
30964
|
+
|
|
30965
|
+
|
|
30966
|
+
|
|
30967
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
30968
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30969
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30970
|
+
|
|
30971
|
+
return {
|
|
30972
|
+
url: toPathString(localVarUrlObj),
|
|
30973
|
+
options: localVarRequestOptions,
|
|
30974
|
+
};
|
|
30975
|
+
},
|
|
30976
|
+
/**
|
|
30977
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
30978
|
+
* @summary Purge CDN cache
|
|
30979
|
+
* @param {string} username
|
|
30980
|
+
* @param {string} domain Domain name
|
|
30981
|
+
* @param {*} [options] Override http request option.
|
|
30982
|
+
* @throws {RequiredError}
|
|
30983
|
+
*/
|
|
30984
|
+
purgeCDNCacheV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30985
|
+
// verify required parameter 'username' is not null or undefined
|
|
30986
|
+
assertParamExists('purgeCDNCacheV1', 'username', username)
|
|
30987
|
+
// verify required parameter 'domain' is not null or undefined
|
|
30988
|
+
assertParamExists('purgeCDNCacheV1', 'domain', domain)
|
|
30989
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/purge`
|
|
30990
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30991
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
30992
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
30993
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
30994
|
+
let baseOptions;
|
|
30995
|
+
if (configuration) {
|
|
30996
|
+
baseOptions = configuration.baseOptions;
|
|
30997
|
+
}
|
|
30998
|
+
|
|
30999
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
31000
|
+
const localVarHeaderParameter = {} as any;
|
|
31001
|
+
const localVarQueryParameter = {} as any;
|
|
31002
|
+
|
|
31003
|
+
// authentication apiToken required
|
|
31004
|
+
// http bearer authentication required
|
|
31005
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31006
|
+
|
|
31007
|
+
|
|
31008
|
+
|
|
31009
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31010
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31011
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
31012
|
+
|
|
31013
|
+
return {
|
|
31014
|
+
url: toPathString(localVarUrlObj),
|
|
31015
|
+
options: localVarRequestOptions,
|
|
31016
|
+
};
|
|
31017
|
+
},
|
|
31018
|
+
}
|
|
31019
|
+
};
|
|
31020
|
+
|
|
31021
|
+
/**
|
|
31022
|
+
* HostingCDNApi - functional programming interface
|
|
31023
|
+
* @export
|
|
31024
|
+
*/
|
|
31025
|
+
export const HostingCDNApiFp = function(configuration?: Configuration) {
|
|
31026
|
+
const localVarAxiosParamCreator = HostingCDNApiAxiosParamCreator(configuration)
|
|
31027
|
+
return {
|
|
31028
|
+
/**
|
|
31029
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31030
|
+
* @summary Disable CDN
|
|
31031
|
+
* @param {string} username
|
|
31032
|
+
* @param {string} domain Domain name
|
|
31033
|
+
* @param {*} [options] Override http request option.
|
|
31034
|
+
* @throws {RequiredError}
|
|
31035
|
+
*/
|
|
31036
|
+
async disableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31037
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.disableCDNV1(username, domain, options);
|
|
31038
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCDNApi.disableCDNV1']?.[0]?.url;
|
|
31039
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31040
|
+
},
|
|
31041
|
+
/**
|
|
31042
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31043
|
+
* @summary Enable CDN
|
|
31044
|
+
* @param {string} username
|
|
31045
|
+
* @param {string} domain Domain name
|
|
31046
|
+
* @param {*} [options] Override http request option.
|
|
31047
|
+
* @throws {RequiredError}
|
|
31048
|
+
*/
|
|
31049
|
+
async enableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31050
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.enableCDNV1(username, domain, options);
|
|
31051
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCDNApi.enableCDNV1']?.[0]?.url;
|
|
31052
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31053
|
+
},
|
|
31054
|
+
/**
|
|
31055
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
31056
|
+
* @summary Get CDN status
|
|
31057
|
+
* @param {string} username
|
|
31058
|
+
* @param {string} domain Domain name
|
|
31059
|
+
* @param {*} [options] Override http request option.
|
|
31060
|
+
* @throws {RequiredError}
|
|
31061
|
+
*/
|
|
31062
|
+
async getCDNStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1CdnCdnStatusResource>> {
|
|
31063
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getCDNStatusV1(username, domain, options);
|
|
31064
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCDNApi.getCDNStatusV1']?.[0]?.url;
|
|
31065
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31066
|
+
},
|
|
31067
|
+
/**
|
|
31068
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
31069
|
+
* @summary Purge CDN cache
|
|
31070
|
+
* @param {string} username
|
|
31071
|
+
* @param {string} domain Domain name
|
|
31072
|
+
* @param {*} [options] Override http request option.
|
|
31073
|
+
* @throws {RequiredError}
|
|
31074
|
+
*/
|
|
31075
|
+
async purgeCDNCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31076
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.purgeCDNCacheV1(username, domain, options);
|
|
31077
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCDNApi.purgeCDNCacheV1']?.[0]?.url;
|
|
31078
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31079
|
+
},
|
|
31080
|
+
}
|
|
31081
|
+
};
|
|
31082
|
+
|
|
31083
|
+
/**
|
|
31084
|
+
* HostingCDNApi - factory interface
|
|
31085
|
+
* @export
|
|
31086
|
+
*/
|
|
31087
|
+
export const HostingCDNApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
31088
|
+
const localVarFp = HostingCDNApiFp(configuration)
|
|
31089
|
+
return {
|
|
31090
|
+
/**
|
|
31091
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31092
|
+
* @summary Disable CDN
|
|
31093
|
+
* @param {string} username
|
|
31094
|
+
* @param {string} domain Domain name
|
|
31095
|
+
* @param {*} [options] Override http request option.
|
|
31096
|
+
* @throws {RequiredError}
|
|
31097
|
+
*/
|
|
31098
|
+
disableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31099
|
+
return localVarFp.disableCDNV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31100
|
+
},
|
|
31101
|
+
/**
|
|
31102
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31103
|
+
* @summary Enable CDN
|
|
31104
|
+
* @param {string} username
|
|
31105
|
+
* @param {string} domain Domain name
|
|
31106
|
+
* @param {*} [options] Override http request option.
|
|
31107
|
+
* @throws {RequiredError}
|
|
31108
|
+
*/
|
|
31109
|
+
enableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31110
|
+
return localVarFp.enableCDNV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31111
|
+
},
|
|
31112
|
+
/**
|
|
31113
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
31114
|
+
* @summary Get CDN status
|
|
31115
|
+
* @param {string} username
|
|
31116
|
+
* @param {string} domain Domain name
|
|
31117
|
+
* @param {*} [options] Override http request option.
|
|
31118
|
+
* @throws {RequiredError}
|
|
31119
|
+
*/
|
|
31120
|
+
getCDNStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1CdnCdnStatusResource> {
|
|
31121
|
+
return localVarFp.getCDNStatusV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31122
|
+
},
|
|
31123
|
+
/**
|
|
31124
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
31125
|
+
* @summary Purge CDN cache
|
|
31126
|
+
* @param {string} username
|
|
31127
|
+
* @param {string} domain Domain name
|
|
31128
|
+
* @param {*} [options] Override http request option.
|
|
31129
|
+
* @throws {RequiredError}
|
|
31130
|
+
*/
|
|
31131
|
+
purgeCDNCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31132
|
+
return localVarFp.purgeCDNCacheV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31133
|
+
},
|
|
31134
|
+
};
|
|
31135
|
+
};
|
|
31136
|
+
|
|
31137
|
+
/**
|
|
31138
|
+
* HostingCDNApi - object-oriented interface
|
|
31139
|
+
* @export
|
|
31140
|
+
* @class HostingCDNApi
|
|
31141
|
+
* @extends {BaseAPI}
|
|
31142
|
+
*/
|
|
31143
|
+
export class HostingCDNApi extends BaseAPI {
|
|
31144
|
+
/**
|
|
31145
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31146
|
+
* @summary Disable CDN
|
|
31147
|
+
* @param {string} username
|
|
31148
|
+
* @param {string} domain Domain name
|
|
31149
|
+
* @param {*} [options] Override http request option.
|
|
31150
|
+
* @throws {RequiredError}
|
|
31151
|
+
* @memberof HostingCDNApi
|
|
31152
|
+
*/
|
|
31153
|
+
public disableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31154
|
+
return HostingCDNApiFp(this.configuration).disableCDNV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31155
|
+
}
|
|
31156
|
+
|
|
31157
|
+
/**
|
|
31158
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31159
|
+
* @summary Enable CDN
|
|
31160
|
+
* @param {string} username
|
|
31161
|
+
* @param {string} domain Domain name
|
|
31162
|
+
* @param {*} [options] Override http request option.
|
|
31163
|
+
* @throws {RequiredError}
|
|
31164
|
+
* @memberof HostingCDNApi
|
|
31165
|
+
*/
|
|
31166
|
+
public enableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31167
|
+
return HostingCDNApiFp(this.configuration).enableCDNV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31168
|
+
}
|
|
31169
|
+
|
|
31170
|
+
/**
|
|
31171
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
31172
|
+
* @summary Get CDN status
|
|
31173
|
+
* @param {string} username
|
|
31174
|
+
* @param {string} domain Domain name
|
|
31175
|
+
* @param {*} [options] Override http request option.
|
|
31176
|
+
* @throws {RequiredError}
|
|
31177
|
+
* @memberof HostingCDNApi
|
|
31178
|
+
*/
|
|
31179
|
+
public getCDNStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31180
|
+
return HostingCDNApiFp(this.configuration).getCDNStatusV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31181
|
+
}
|
|
31182
|
+
|
|
31183
|
+
/**
|
|
31184
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
31185
|
+
* @summary Purge CDN cache
|
|
31186
|
+
* @param {string} username
|
|
31187
|
+
* @param {string} domain Domain name
|
|
31188
|
+
* @param {*} [options] Override http request option.
|
|
31189
|
+
* @throws {RequiredError}
|
|
31190
|
+
* @memberof HostingCDNApi
|
|
31191
|
+
*/
|
|
31192
|
+
public purgeCDNCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31193
|
+
return HostingCDNApiFp(this.configuration).purgeCDNCacheV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31194
|
+
}
|
|
31195
|
+
}
|
|
31196
|
+
|
|
31197
|
+
|
|
31198
|
+
|
|
30818
31199
|
/**
|
|
30819
31200
|
* HostingCacheApi - axios parameter creator
|
|
30820
31201
|
* @export
|
|
@@ -30822,7 +31203,7 @@ export class HorizonsWebsitesApi extends BaseAPI {
|
|
|
30822
31203
|
export const HostingCacheApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
30823
31204
|
return {
|
|
30824
31205
|
/**
|
|
30825
|
-
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31206
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
30826
31207
|
* @summary Clear website cache
|
|
30827
31208
|
* @param {string} username
|
|
30828
31209
|
* @param {string} domain Domain name
|
|
@@ -30975,7 +31356,7 @@ export const HostingCacheApiFp = function(configuration?: Configuration) {
|
|
|
30975
31356
|
const localVarAxiosParamCreator = HostingCacheApiAxiosParamCreator(configuration)
|
|
30976
31357
|
return {
|
|
30977
31358
|
/**
|
|
30978
|
-
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31359
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
30979
31360
|
* @summary Clear website cache
|
|
30980
31361
|
* @param {string} username
|
|
30981
31362
|
* @param {string} domain Domain name
|
|
@@ -31027,7 +31408,7 @@ export const HostingCacheApiFactory = function (configuration?: Configuration, b
|
|
|
31027
31408
|
const localVarFp = HostingCacheApiFp(configuration)
|
|
31028
31409
|
return {
|
|
31029
31410
|
/**
|
|
31030
|
-
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31411
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31031
31412
|
* @summary Clear website cache
|
|
31032
31413
|
* @param {string} username
|
|
31033
31414
|
* @param {string} domain Domain name
|
|
@@ -31073,7 +31454,7 @@ export const HostingCacheApiFactory = function (configuration?: Configuration, b
|
|
|
31073
31454
|
*/
|
|
31074
31455
|
export class HostingCacheApi extends BaseAPI {
|
|
31075
31456
|
/**
|
|
31076
|
-
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31457
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31077
31458
|
* @summary Clear website cache
|
|
31078
31459
|
* @param {string} username
|
|
31079
31460
|
* @param {string} domain Domain name
|
|
@@ -37293,7 +37674,7 @@ export const HostingWebsitesApiAxiosParamCreator = function (configuration?: Con
|
|
|
37293
37674
|
};
|
|
37294
37675
|
},
|
|
37295
37676
|
/**
|
|
37296
|
-
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
37677
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
37297
37678
|
* @summary List website setups
|
|
37298
37679
|
* @param {number | null} [orderId] Order ID
|
|
37299
37680
|
* @param {string | null} [subscriptionId] Filter by hosting order subscription ID
|
|
@@ -37411,7 +37792,7 @@ export const HostingWebsitesApiAxiosParamCreator = function (configuration?: Con
|
|
|
37411
37792
|
};
|
|
37412
37793
|
},
|
|
37413
37794
|
/**
|
|
37414
|
-
* 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 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_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. Omit `domain` to set the website up on a generated temporary free subdomain. 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.
|
|
37795
|
+
* 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. To know the free subdomain before the call, so a timed-out call can be looked up and retried on the same domain, generate one through `POST /api/hosting/v1/domains/free-subdomains` (`hosting_domains_generate-free-subdomain`) 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.
|
|
37415
37796
|
* @summary Start website setup
|
|
37416
37797
|
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
37417
37798
|
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
@@ -37504,7 +37885,7 @@ export const HostingWebsitesApiFp = function(configuration?: Configuration) {
|
|
|
37504
37885
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
37505
37886
|
},
|
|
37506
37887
|
/**
|
|
37507
|
-
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
37888
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
37508
37889
|
* @summary List website setups
|
|
37509
37890
|
* @param {number | null} [orderId] Order ID
|
|
37510
37891
|
* @param {string | null} [subscriptionId] Filter by hosting order subscription ID
|
|
@@ -37536,7 +37917,7 @@ export const HostingWebsitesApiFp = function(configuration?: Configuration) {
|
|
|
37536
37917
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
37537
37918
|
},
|
|
37538
37919
|
/**
|
|
37539
|
-
* 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 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_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. Omit `domain` to set the website up on a generated temporary free subdomain. 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.
|
|
37920
|
+
* 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. To know the free subdomain before the call, so a timed-out call can be looked up and retried on the same domain, generate one through `POST /api/hosting/v1/domains/free-subdomains` (`hosting_domains_generate-free-subdomain`) 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.
|
|
37540
37921
|
* @summary Start website setup
|
|
37541
37922
|
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
37542
37923
|
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
@@ -37592,7 +37973,7 @@ export const HostingWebsitesApiFactory = function (configuration?: Configuration
|
|
|
37592
37973
|
return localVarFp.deployStaticSiteArchiveV1(username, domain, hostingV1WebsitesDeployArchiveRequest, options).then((request) => request(axios, basePath));
|
|
37593
37974
|
},
|
|
37594
37975
|
/**
|
|
37595
|
-
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
37976
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
37596
37977
|
* @summary List website setups
|
|
37597
37978
|
* @param {number | null} [orderId] Order ID
|
|
37598
37979
|
* @param {string | null} [subscriptionId] Filter by hosting order subscription ID
|
|
@@ -37620,7 +38001,7 @@ export const HostingWebsitesApiFactory = function (configuration?: Configuration
|
|
|
37620
38001
|
return localVarFp.listWebsitesV1(page, perPage, username, orderId, isEnabled, domain, websiteTypes, options).then((request) => request(axios, basePath));
|
|
37621
38002
|
},
|
|
37622
38003
|
/**
|
|
37623
|
-
* 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 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_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. Omit `domain` to set the website up on a generated temporary free subdomain. 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.
|
|
38004
|
+
* 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. To know the free subdomain before the call, so a timed-out call can be looked up and retried on the same domain, generate one through `POST /api/hosting/v1/domains/free-subdomains` (`hosting_domains_generate-free-subdomain`) 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.
|
|
37624
38005
|
* @summary Start website setup
|
|
37625
38006
|
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
37626
38007
|
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
@@ -37680,7 +38061,7 @@ export class HostingWebsitesApi extends BaseAPI {
|
|
|
37680
38061
|
}
|
|
37681
38062
|
|
|
37682
38063
|
/**
|
|
37683
|
-
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
38064
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Narrow the list with the `order_id`, `subscription_id` or `domain` filters. Meant for polling right after creating a website or starting a website setup: the website shows up in the websites list before its server-side setup has finished, and while the setup is `running` endpoints that operate on that website may respond with `404` or `409`. Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. `failed` means the setup stopped before finishing or has not reported progress for over an hour. Setups older than 24 hours are not listed. `type` is the website type the setup was started with (`wordpress`, `headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`), or `null` for an empty website.
|
|
37684
38065
|
* @summary List website setups
|
|
37685
38066
|
* @param {number | null} [orderId] Order ID
|
|
37686
38067
|
* @param {string | null} [subscriptionId] Filter by hosting order subscription ID
|
|
@@ -37712,7 +38093,7 @@ export class HostingWebsitesApi extends BaseAPI {
|
|
|
37712
38093
|
}
|
|
37713
38094
|
|
|
37714
38095
|
/**
|
|
37715
|
-
* 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 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_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. Omit `domain` to set the website up on a generated temporary free subdomain. 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.
|
|
38096
|
+
* 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. To know the free subdomain before the call, so a timed-out call can be looked up and retried on the same domain, generate one through `POST /api/hosting/v1/domains/free-subdomains` (`hosting_domains_generate-free-subdomain`) 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.
|
|
37716
38097
|
* @summary Start website setup
|
|
37717
38098
|
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
37718
38099
|
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
@@ -52941,7 +53322,7 @@ export const WordPressInstallationsApiAxiosParamCreator = function (configuratio
|
|
|
52941
53322
|
};
|
|
52942
53323
|
},
|
|
52943
53324
|
/**
|
|
52944
|
-
* 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/
|
|
53325
|
+
* 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_start-setup`) 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_start-setup` 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.
|
|
52945
53326
|
* @summary Install WordPress
|
|
52946
53327
|
* @param {string} username
|
|
52947
53328
|
* @param {WordPressV1InstallationsInstallWordPressRequest} wordPressV1InstallationsInstallWordPressRequest
|
|
@@ -53242,7 +53623,7 @@ export const WordPressInstallationsApiFp = function(configuration?: Configuratio
|
|
|
53242
53623
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
53243
53624
|
},
|
|
53244
53625
|
/**
|
|
53245
|
-
* 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/
|
|
53626
|
+
* 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_start-setup`) 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_start-setup` 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.
|
|
53246
53627
|
* @summary Install WordPress
|
|
53247
53628
|
* @param {string} username
|
|
53248
53629
|
* @param {WordPressV1InstallationsInstallWordPressRequest} wordPressV1InstallationsInstallWordPressRequest
|
|
@@ -53375,7 +53756,7 @@ export const WordPressInstallationsApiFactory = function (configuration?: Config
|
|
|
53375
53756
|
return localVarFp.importWordPressWebsiteV1(username, domain, wordPressV1InstallationsImportWordPressRequest, options).then((request) => request(axios, basePath));
|
|
53376
53757
|
},
|
|
53377
53758
|
/**
|
|
53378
|
-
* 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/
|
|
53759
|
+
* 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_start-setup`) 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_start-setup` 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.
|
|
53379
53760
|
* @summary Install WordPress
|
|
53380
53761
|
* @param {string} username
|
|
53381
53762
|
* @param {WordPressV1InstallationsInstallWordPressRequest} wordPressV1InstallationsInstallWordPressRequest
|
|
@@ -53508,7 +53889,7 @@ export class WordPressInstallationsApi extends BaseAPI {
|
|
|
53508
53889
|
}
|
|
53509
53890
|
|
|
53510
53891
|
/**
|
|
53511
|
-
* 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/
|
|
53892
|
+
* 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_start-setup`) 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_start-setup` 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.
|
|
53512
53893
|
* @summary Install WordPress
|
|
53513
53894
|
* @param {string} username
|
|
53514
53895
|
* @param {WordPressV1InstallationsInstallWordPressRequest} wordPressV1InstallationsInstallWordPressRequest
|