@hostinger/sdk 1.54.2 → 1.55.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 +138 -19
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +95 -19
- package/dist/api.js +101 -28
- 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 +95 -19
- package/dist/esm/api.js +90 -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/HostingDatabasesApi.md +1 -1
- package/docs/HostingFilesApi.md +2 -1
- package/docs/HostingV1OnboardingsOnboardingResource.md +28 -0
- package/docs/HostingV1WebsitesCreateWebsiteRequest.md +1 -1
- package/docs/HostingV1WebsitesWebsiteResource.md +1 -1
- package/docs/HostingWebsitesApi.md +57 -2
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.55.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -525,6 +525,11 @@ export const HostingV1NodeJsVulnerabilityResourceSeverityEnum = {
|
|
|
525
525
|
Critical: 'critical',
|
|
526
526
|
Unknown: 'unknown'
|
|
527
527
|
};
|
|
528
|
+
export const HostingV1OnboardingsOnboardingResourceStatusEnum = {
|
|
529
|
+
Running: 'running',
|
|
530
|
+
Completed: 'completed',
|
|
531
|
+
Failed: 'failed'
|
|
532
|
+
};
|
|
528
533
|
export const HostingV1SslSslStatusResourceStatusEnum = {
|
|
529
534
|
NotInstalled: 'not_installed',
|
|
530
535
|
Installing: 'installing',
|
|
@@ -12912,7 +12917,7 @@ export const HostingDatabasesApiAxiosParamCreator = function (configuration) {
|
|
|
12912
12917
|
};
|
|
12913
12918
|
}),
|
|
12914
12919
|
/**
|
|
12915
|
-
* Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint.
|
|
12920
|
+
* Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint. Database creation is synchronous, so a 404 here means no database with that name exists under the username, not that it is still being created.
|
|
12916
12921
|
* @summary Create database remote connection
|
|
12917
12922
|
* @param {string} username
|
|
12918
12923
|
* @param {string} name Full database name as returned by the list databases endpoint.
|
|
@@ -13272,7 +13277,7 @@ export const HostingDatabasesApiFp = function (configuration) {
|
|
|
13272
13277
|
});
|
|
13273
13278
|
},
|
|
13274
13279
|
/**
|
|
13275
|
-
* Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint.
|
|
13280
|
+
* Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint. Database creation is synchronous, so a 404 here means no database with that name exists under the username, not that it is still being created.
|
|
13276
13281
|
* @summary Create database remote connection
|
|
13277
13282
|
* @param {string} username
|
|
13278
13283
|
* @param {string} name Full database name as returned by the list databases endpoint.
|
|
@@ -13439,7 +13444,7 @@ export const HostingDatabasesApiFactory = function (configuration, basePath, axi
|
|
|
13439
13444
|
return localVarFp.createAccountDatabaseV1(username, hostingV1DatabasesCreateDatabaseRequest, options).then((request) => request(axios, basePath));
|
|
13440
13445
|
},
|
|
13441
13446
|
/**
|
|
13442
|
-
* Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint.
|
|
13447
|
+
* Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint. Database creation is synchronous, so a 404 here means no database with that name exists under the username, not that it is still being created.
|
|
13443
13448
|
* @summary Create database remote connection
|
|
13444
13449
|
* @param {string} username
|
|
13445
13450
|
* @param {string} name Full database name as returned by the list databases endpoint.
|
|
@@ -13568,7 +13573,7 @@ export class HostingDatabasesApi extends BaseAPI {
|
|
|
13568
13573
|
return HostingDatabasesApiFp(this.configuration).createAccountDatabaseV1(username, hostingV1DatabasesCreateDatabaseRequest, options).then((request) => request(this.axios, this.basePath));
|
|
13569
13574
|
}
|
|
13570
13575
|
/**
|
|
13571
|
-
* Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint.
|
|
13576
|
+
* Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint. Database creation is synchronous, so a 404 here means no database with that name exists under the username, not that it is still being created.
|
|
13572
13577
|
* @summary Create database remote connection
|
|
13573
13578
|
* @param {string} username
|
|
13574
13579
|
* @param {string} name Full database name as returned by the list databases endpoint.
|
|
@@ -14426,7 +14431,7 @@ export class HostingDomainsApi extends BaseAPI {
|
|
|
14426
14431
|
export const HostingFilesApiAxiosParamCreator = function (configuration) {
|
|
14427
14432
|
return {
|
|
14428
14433
|
/**
|
|
14429
|
-
* Generate a file browser upload URL with authentication credentials for uploading files directly to a website\'s file storage. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
14434
|
+
* Generate a file browser upload URL with authentication credentials for uploading files directly to a website\'s file storage. While the website is still being set up (`status: running` on the list website setups endpoint) this endpoint returns 409 with a `Retry-After` header: wait that many seconds and retry, or poll the website setups until the status is `completed`. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
14430
14435
|
* @summary Generate upload URL
|
|
14431
14436
|
* @param {HostingV1FilesGenerateUploadUrlRequest} hostingV1FilesGenerateUploadUrlRequest
|
|
14432
14437
|
* @param {*} [options] Override http request option.
|
|
@@ -14574,7 +14579,7 @@ export const HostingFilesApiFp = function (configuration) {
|
|
|
14574
14579
|
const localVarAxiosParamCreator = HostingFilesApiAxiosParamCreator(configuration);
|
|
14575
14580
|
return {
|
|
14576
14581
|
/**
|
|
14577
|
-
* Generate a file browser upload URL with authentication credentials for uploading files directly to a website\'s file storage. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
14582
|
+
* Generate a file browser upload URL with authentication credentials for uploading files directly to a website\'s file storage. While the website is still being set up (`status: running` on the list website setups endpoint) this endpoint returns 409 with a `Retry-After` header: wait that many seconds and retry, or poll the website setups until the status is `completed`. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
14578
14583
|
* @summary Generate upload URL
|
|
14579
14584
|
* @param {HostingV1FilesGenerateUploadUrlRequest} hostingV1FilesGenerateUploadUrlRequest
|
|
14580
14585
|
* @param {*} [options] Override http request option.
|
|
@@ -14638,7 +14643,7 @@ export const HostingFilesApiFactory = function (configuration, basePath, axios)
|
|
|
14638
14643
|
const localVarFp = HostingFilesApiFp(configuration);
|
|
14639
14644
|
return {
|
|
14640
14645
|
/**
|
|
14641
|
-
* Generate a file browser upload URL with authentication credentials for uploading files directly to a website\'s file storage. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
14646
|
+
* Generate a file browser upload URL with authentication credentials for uploading files directly to a website\'s file storage. While the website is still being set up (`status: running` on the list website setups endpoint) this endpoint returns 409 with a `Retry-After` header: wait that many seconds and retry, or poll the website setups until the status is `completed`. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
14642
14647
|
* @summary Generate upload URL
|
|
14643
14648
|
* @param {HostingV1FilesGenerateUploadUrlRequest} hostingV1FilesGenerateUploadUrlRequest
|
|
14644
14649
|
* @param {*} [options] Override http request option.
|
|
@@ -14687,7 +14692,7 @@ export const HostingFilesApiFactory = function (configuration, basePath, axios)
|
|
|
14687
14692
|
*/
|
|
14688
14693
|
export class HostingFilesApi extends BaseAPI {
|
|
14689
14694
|
/**
|
|
14690
|
-
* Generate a file browser upload URL with authentication credentials for uploading files directly to a website\'s file storage. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
14695
|
+
* Generate a file browser upload URL with authentication credentials for uploading files directly to a website\'s file storage. While the website is still being set up (`status: running` on the list website setups endpoint) this endpoint returns 409 with a `Retry-After` header: wait that many seconds and retry, or poll the website setups until the status is `completed`. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
14691
14696
|
* @summary Generate upload URL
|
|
14692
14697
|
* @param {HostingV1FilesGenerateUploadUrlRequest} hostingV1FilesGenerateUploadUrlRequest
|
|
14693
14698
|
* @param {*} [options] Override http request option.
|
|
@@ -17767,7 +17772,7 @@ export class HostingSSLApi extends BaseAPI {
|
|
|
17767
17772
|
export const HostingWebsitesApiAxiosParamCreator = function (configuration) {
|
|
17768
17773
|
return {
|
|
17769
17774
|
/**
|
|
17770
|
-
* Create a new website for the authenticated client.
|
|
17775
|
+
* Create a new website for the authenticated client. You must choose which hosting order to create this website on. Pass that order as `order_id` together with the domain name. List orders to see available IDs; the website is provisioned on that order\'s hosting plan. The datacenter_code parameter is required when creating the first website on a new hosting plan - this will set up and configure new hosting account in the selected datacenter. Subsequent websites will be hosted on the same datacenter automatically. Website creation is asynchronous and takes up to a few minutes. 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. While the setup is `running`, endpoints that operate on the website may respond with `404` or `409`. `is_enabled` on the websites list reflects suspension, not readiness.
|
|
17771
17776
|
* @summary Create website
|
|
17772
17777
|
* @param {HostingV1WebsitesCreateWebsiteRequest} hostingV1WebsitesCreateWebsiteRequest
|
|
17773
17778
|
* @param {*} [options] Override http request option.
|
|
@@ -17873,7 +17878,39 @@ export const HostingWebsitesApiAxiosParamCreator = function (configuration) {
|
|
|
17873
17878
|
};
|
|
17874
17879
|
}),
|
|
17875
17880
|
/**
|
|
17876
|
-
*
|
|
17881
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Meant for polling right after creating a website: 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.
|
|
17882
|
+
* @summary List website setups
|
|
17883
|
+
* @param {string | null} [domain] Filter by domain name (exact match)
|
|
17884
|
+
* @param {*} [options] Override http request option.
|
|
17885
|
+
* @throws {RequiredError}
|
|
17886
|
+
*/
|
|
17887
|
+
listWebsiteSetupsV1: (domain_1, ...args_1) => __awaiter(this, [domain_1, ...args_1], void 0, function* (domain, options = {}) {
|
|
17888
|
+
const localVarPath = `/api/hosting/v1/onboardings`;
|
|
17889
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
17890
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
17891
|
+
let baseOptions;
|
|
17892
|
+
if (configuration) {
|
|
17893
|
+
baseOptions = configuration.baseOptions;
|
|
17894
|
+
}
|
|
17895
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
17896
|
+
const localVarHeaderParameter = {};
|
|
17897
|
+
const localVarQueryParameter = {};
|
|
17898
|
+
// authentication apiToken required
|
|
17899
|
+
// http bearer authentication required
|
|
17900
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
17901
|
+
if (domain !== undefined) {
|
|
17902
|
+
localVarQueryParameter['domain'] = domain;
|
|
17903
|
+
}
|
|
17904
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
17905
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
17906
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
17907
|
+
return {
|
|
17908
|
+
url: toPathString(localVarUrlObj),
|
|
17909
|
+
options: localVarRequestOptions,
|
|
17910
|
+
};
|
|
17911
|
+
}),
|
|
17912
|
+
/**
|
|
17913
|
+
* 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. A website appears in this list before its server-side setup has finished, and `is_enabled` reflects suspension, not readiness. To know when a newly created website is ready for file, deploy or database operations, poll the list website setups endpoint instead.
|
|
17877
17914
|
* @summary List websites
|
|
17878
17915
|
* @param {number} [page] Page number
|
|
17879
17916
|
* @param {number} [perPage] Number of items per page
|
|
@@ -17938,7 +17975,7 @@ export const HostingWebsitesApiFp = function (configuration) {
|
|
|
17938
17975
|
const localVarAxiosParamCreator = HostingWebsitesApiAxiosParamCreator(configuration);
|
|
17939
17976
|
return {
|
|
17940
17977
|
/**
|
|
17941
|
-
* Create a new website for the authenticated client.
|
|
17978
|
+
* Create a new website for the authenticated client. You must choose which hosting order to create this website on. Pass that order as `order_id` together with the domain name. List orders to see available IDs; the website is provisioned on that order\'s hosting plan. The datacenter_code parameter is required when creating the first website on a new hosting plan - this will set up and configure new hosting account in the selected datacenter. Subsequent websites will be hosted on the same datacenter automatically. Website creation is asynchronous and takes up to a few minutes. 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. While the setup is `running`, endpoints that operate on the website may respond with `404` or `409`. `is_enabled` on the websites list reflects suspension, not readiness.
|
|
17942
17979
|
* @summary Create website
|
|
17943
17980
|
* @param {HostingV1WebsitesCreateWebsiteRequest} hostingV1WebsitesCreateWebsiteRequest
|
|
17944
17981
|
* @param {*} [options] Override http request option.
|
|
@@ -17985,7 +18022,22 @@ export const HostingWebsitesApiFp = function (configuration) {
|
|
|
17985
18022
|
});
|
|
17986
18023
|
},
|
|
17987
18024
|
/**
|
|
17988
|
-
*
|
|
18025
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Meant for polling right after creating a website: 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.
|
|
18026
|
+
* @summary List website setups
|
|
18027
|
+
* @param {string | null} [domain] Filter by domain name (exact match)
|
|
18028
|
+
* @param {*} [options] Override http request option.
|
|
18029
|
+
* @throws {RequiredError}
|
|
18030
|
+
*/
|
|
18031
|
+
listWebsiteSetupsV1(domain, options) {
|
|
18032
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18033
|
+
var _a, _b;
|
|
18034
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebsiteSetupsV1(domain, options);
|
|
18035
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingWebsitesApi.listWebsiteSetupsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
18036
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
18037
|
+
});
|
|
18038
|
+
},
|
|
18039
|
+
/**
|
|
18040
|
+
* 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. A website appears in this list before its server-side setup has finished, and `is_enabled` reflects suspension, not readiness. To know when a newly created website is ready for file, deploy or database operations, poll the list website setups endpoint instead.
|
|
17989
18041
|
* @summary List websites
|
|
17990
18042
|
* @param {number} [page] Page number
|
|
17991
18043
|
* @param {number} [perPage] Number of items per page
|
|
@@ -18015,7 +18067,7 @@ export const HostingWebsitesApiFactory = function (configuration, basePath, axio
|
|
|
18015
18067
|
const localVarFp = HostingWebsitesApiFp(configuration);
|
|
18016
18068
|
return {
|
|
18017
18069
|
/**
|
|
18018
|
-
* Create a new website for the authenticated client.
|
|
18070
|
+
* Create a new website for the authenticated client. You must choose which hosting order to create this website on. Pass that order as `order_id` together with the domain name. List orders to see available IDs; the website is provisioned on that order\'s hosting plan. The datacenter_code parameter is required when creating the first website on a new hosting plan - this will set up and configure new hosting account in the selected datacenter. Subsequent websites will be hosted on the same datacenter automatically. Website creation is asynchronous and takes up to a few minutes. 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. While the setup is `running`, endpoints that operate on the website may respond with `404` or `409`. `is_enabled` on the websites list reflects suspension, not readiness.
|
|
18019
18071
|
* @summary Create website
|
|
18020
18072
|
* @param {HostingV1WebsitesCreateWebsiteRequest} hostingV1WebsitesCreateWebsiteRequest
|
|
18021
18073
|
* @param {*} [options] Override http request option.
|
|
@@ -18047,7 +18099,17 @@ export const HostingWebsitesApiFactory = function (configuration, basePath, axio
|
|
|
18047
18099
|
return localVarFp.deployStaticSiteArchiveV1(username, domain, hostingV1WebsitesDeployArchiveRequest, options).then((request) => request(axios, basePath));
|
|
18048
18100
|
},
|
|
18049
18101
|
/**
|
|
18050
|
-
*
|
|
18102
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Meant for polling right after creating a website: 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.
|
|
18103
|
+
* @summary List website setups
|
|
18104
|
+
* @param {string | null} [domain] Filter by domain name (exact match)
|
|
18105
|
+
* @param {*} [options] Override http request option.
|
|
18106
|
+
* @throws {RequiredError}
|
|
18107
|
+
*/
|
|
18108
|
+
listWebsiteSetupsV1(domain, options) {
|
|
18109
|
+
return localVarFp.listWebsiteSetupsV1(domain, options).then((request) => request(axios, basePath));
|
|
18110
|
+
},
|
|
18111
|
+
/**
|
|
18112
|
+
* 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. A website appears in this list before its server-side setup has finished, and `is_enabled` reflects suspension, not readiness. To know when a newly created website is ready for file, deploy or database operations, poll the list website setups endpoint instead.
|
|
18051
18113
|
* @summary List websites
|
|
18052
18114
|
* @param {number} [page] Page number
|
|
18053
18115
|
* @param {number} [perPage] Number of items per page
|
|
@@ -18072,7 +18134,7 @@ export const HostingWebsitesApiFactory = function (configuration, basePath, axio
|
|
|
18072
18134
|
*/
|
|
18073
18135
|
export class HostingWebsitesApi extends BaseAPI {
|
|
18074
18136
|
/**
|
|
18075
|
-
* Create a new website for the authenticated client.
|
|
18137
|
+
* Create a new website for the authenticated client. You must choose which hosting order to create this website on. Pass that order as `order_id` together with the domain name. List orders to see available IDs; the website is provisioned on that order\'s hosting plan. The datacenter_code parameter is required when creating the first website on a new hosting plan - this will set up and configure new hosting account in the selected datacenter. Subsequent websites will be hosted on the same datacenter automatically. Website creation is asynchronous and takes up to a few minutes. 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. While the setup is `running`, endpoints that operate on the website may respond with `404` or `409`. `is_enabled` on the websites list reflects suspension, not readiness.
|
|
18076
18138
|
* @summary Create website
|
|
18077
18139
|
* @param {HostingV1WebsitesCreateWebsiteRequest} hostingV1WebsitesCreateWebsiteRequest
|
|
18078
18140
|
* @param {*} [options] Override http request option.
|
|
@@ -18107,7 +18169,18 @@ export class HostingWebsitesApi extends BaseAPI {
|
|
|
18107
18169
|
return HostingWebsitesApiFp(this.configuration).deployStaticSiteArchiveV1(username, domain, hostingV1WebsitesDeployArchiveRequest, options).then((request) => request(this.axios, this.basePath));
|
|
18108
18170
|
}
|
|
18109
18171
|
/**
|
|
18110
|
-
*
|
|
18172
|
+
* Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Meant for polling right after creating a website: 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.
|
|
18173
|
+
* @summary List website setups
|
|
18174
|
+
* @param {string | null} [domain] Filter by domain name (exact match)
|
|
18175
|
+
* @param {*} [options] Override http request option.
|
|
18176
|
+
* @throws {RequiredError}
|
|
18177
|
+
* @memberof HostingWebsitesApi
|
|
18178
|
+
*/
|
|
18179
|
+
listWebsiteSetupsV1(domain, options) {
|
|
18180
|
+
return HostingWebsitesApiFp(this.configuration).listWebsiteSetupsV1(domain, options).then((request) => request(this.axios, this.basePath));
|
|
18181
|
+
}
|
|
18182
|
+
/**
|
|
18183
|
+
* 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. A website appears in this list before its server-side setup has finished, and `is_enabled` reflects suspension, not readiness. To know when a newly created website is ready for file, deploy or database operations, poll the list website setups endpoint instead.
|
|
18111
18184
|
* @summary List websites
|
|
18112
18185
|
* @param {number} [page] Page number
|
|
18113
18186
|
* @param {number} [perPage] Number of items per page
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.55.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.55.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.55.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.55.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.55.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.55.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -13,7 +13,7 @@ export class Configuration {
|
|
|
13
13
|
var _a;
|
|
14
14
|
this.accessToken = param.accessToken;
|
|
15
15
|
this.basePath = param.basePath;
|
|
16
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.55.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.55.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.55.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.55.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.
|
|
7
|
+
* API Version: 1.55.0
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -137,7 +137,7 @@ const { status, data } = await apiInstance.createAccountDatabaseV1(
|
|
|
137
137
|
# **createDatabaseRemoteConnectionV1**
|
|
138
138
|
> CommonSuccessEmptyResource createDatabaseRemoteConnectionV1(hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest)
|
|
139
139
|
|
|
140
|
-
Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint.
|
|
140
|
+
Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint. Database creation is synchronous, so a 404 here means no database with that name exists under the username, not that it is still being created.
|
|
141
141
|
|
|
142
142
|
### Example
|
|
143
143
|
|
package/docs/HostingFilesApi.md
CHANGED
|
@@ -11,7 +11,7 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
11
11
|
# **generateUploadURLV1**
|
|
12
12
|
> HostingV1FilesUploadUrlResource generateUploadURLV1(hostingV1FilesGenerateUploadUrlRequest)
|
|
13
13
|
|
|
14
|
-
Generate a file browser upload URL with authentication credentials for uploading files directly to a website\'s file storage. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
14
|
+
Generate a file browser upload URL with authentication credentials for uploading files directly to a website\'s file storage. While the website is still being set up (`status: running` on the list website setups endpoint) this endpoint returns 409 with a `Retry-After` header: wait that many seconds and retry, or poll the website setups until the status is `completed`. Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the website\'s `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0). Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below. 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`. 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or `PATCH` requests with an `upload-offset` header tracking progress) until complete. `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`. Instead of a TUS client, plain `curl` also works: ``` FILE=app.zip SIZE=$(stat -f%z \"$FILE\") # stat -c%s on Linux curl -i -X POST \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Upload-Length: ${SIZE}\" \\ -H \"Upload-Offset: 0\" # -> 201 Created curl -i -X PATCH \"{url}/${FILE}?override=true\" \\ -H \"X-Auth: {auth_key}\" \\ -H \"X-Auth-Rest: {rest_auth_key}\" \\ -H \"Tus-Resumable: 1.0.0\" \\ -H \"Content-Type: application/offset+octet-stream\" \\ -H \"Upload-Offset: 0\" \\ --data-binary \"@${FILE}\" # -> 204 No Content, Upload-Offset response header equals SIZE when done ```
|
|
15
15
|
|
|
16
16
|
### Example
|
|
17
17
|
|
|
@@ -59,6 +59,7 @@ const { status, data } = await apiInstance.generateUploadURLV1(
|
|
|
59
59
|
|**200** | Success response | - |
|
|
60
60
|
|**422** | Validation error response | - |
|
|
61
61
|
|**401** | Unauthenticated response | - |
|
|
62
|
+
|**409** | Conflict response. `Retry-After`, when present, is the number of seconds to wait before retrying. | * Retry-After - Seconds to wait before retrying the request <br> |
|
|
62
63
|
|**500** | Error response | - |
|
|
63
64
|
|
|
64
65
|
[[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)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# HostingV1OnboardingsOnboardingResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**domain** | **string** | Domain of the website being set up. | [default to undefined]
|
|
9
|
+
**username** | **string** | Hosting account username. | [default to undefined]
|
|
10
|
+
**status** | **string** | `running` while the website is still being set up, `completed` once the setup has finished, `failed` when it stopped before finishing or has not reported progress for over an hour. | [default to undefined]
|
|
11
|
+
**created_at** | **string** | When the setup was requested. | [default to undefined]
|
|
12
|
+
**updated_at** | **string** | When the setup last reported progress. | [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { HostingV1OnboardingsOnboardingResource } from '@hostinger/sdk';
|
|
18
|
+
|
|
19
|
+
const instance: HostingV1OnboardingsOnboardingResource = {
|
|
20
|
+
domain,
|
|
21
|
+
username,
|
|
22
|
+
status,
|
|
23
|
+
created_at,
|
|
24
|
+
updated_at,
|
|
25
|
+
};
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
[[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,7 +6,7 @@
|
|
|
6
6
|
Name | Type | Description | Notes
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
8
|
**domain** | **string** | Domain name for the website. Cannot start with \"www.\" | [default to undefined]
|
|
9
|
-
**order_id** | **number** | ID
|
|
9
|
+
**order_id** | **number** | Hosting order ID to create this website on. Choose the order whose hosting plan should host the new website. List orders to find available IDs. | [default to undefined]
|
|
10
10
|
**datacenter_code** | **string** | Datacenter code. This parameter is required when creating the first website on a new hosting plan. | [optional] [default to undefined]
|
|
11
11
|
|
|
12
12
|
## Example
|
|
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
8
|
**domain** | **string** | Website domain. Null for U4S websites with no domain attached. | [optional] [default to undefined]
|
|
9
9
|
**vhost_type** | **string** | Virtual host type. Only present for CloudLinux websites. | [optional] [default to undefined]
|
|
10
|
-
**is_enabled** | **boolean** |
|
|
10
|
+
**is_enabled** | **boolean** | True unless the website is suspended. Not a readiness signal: a website that is still being set up is enabled too, see the list website setups endpoint. | [optional] [default to undefined]
|
|
11
11
|
**username** | **string** | Username. Not applicable for U4S websites. | [optional] [default to undefined]
|
|
12
12
|
**client_id** | **number** | Client ID | [optional] [default to undefined]
|
|
13
13
|
**order_id** | **number** | Order ID | [optional] [default to undefined]
|
|
@@ -7,12 +7,13 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
7
7
|
|[**createWebsiteV1**](#createwebsitev1) | **POST** /api/hosting/v1/websites | Create website|
|
|
8
8
|
|[**deleteWebsiteV1**](#deletewebsitev1) | **DELETE** /api/hosting/v1/websites/{domain} | Delete website|
|
|
9
9
|
|[**deployStaticSiteArchiveV1**](#deploystaticsitearchivev1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/deploy | Deploy static site archive|
|
|
10
|
+
|[**listWebsiteSetupsV1**](#listwebsitesetupsv1) | **GET** /api/hosting/v1/onboardings | List website setups|
|
|
10
11
|
|[**listWebsitesV1**](#listwebsitesv1) | **GET** /api/hosting/v1/websites | List websites|
|
|
11
12
|
|
|
12
13
|
# **createWebsiteV1**
|
|
13
14
|
> CommonSuccessEmptyResource createWebsiteV1(hostingV1WebsitesCreateWebsiteRequest)
|
|
14
15
|
|
|
15
|
-
Create a new website for the authenticated client.
|
|
16
|
+
Create a new website for the authenticated client. You must choose which hosting order to create this website on. Pass that order as `order_id` together with the domain name. List orders to see available IDs; the website is provisioned on that order\'s hosting plan. The datacenter_code parameter is required when creating the first website on a new hosting plan - this will set up and configure new hosting account in the selected datacenter. Subsequent websites will be hosted on the same datacenter automatically. Website creation is asynchronous and takes up to a few minutes. 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. While the setup is `running`, endpoints that operate on the website may respond with `404` or `409`. `is_enabled` on the websites list reflects suspension, not readiness.
|
|
16
17
|
|
|
17
18
|
### Example
|
|
18
19
|
|
|
@@ -169,6 +170,60 @@ const { status, data } = await apiInstance.deployStaticSiteArchiveV1(
|
|
|
169
170
|
- **Accept**: application/json
|
|
170
171
|
|
|
171
172
|
|
|
173
|
+
### HTTP response details
|
|
174
|
+
| Status code | Description | Response headers |
|
|
175
|
+
|-------------|-------------|------------------|
|
|
176
|
+
|**200** | Success response | - |
|
|
177
|
+
|**422** | Validation error response | - |
|
|
178
|
+
|**401** | Unauthenticated response | - |
|
|
179
|
+
|**500** | Error response | - |
|
|
180
|
+
|
|
181
|
+
[[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)
|
|
182
|
+
|
|
183
|
+
# **listWebsiteSetupsV1**
|
|
184
|
+
> Array<HostingV1OnboardingsOnboardingResource> listWebsiteSetupsV1()
|
|
185
|
+
|
|
186
|
+
Returns the website setups started in the last 24 hours for the hosting accounts accessible to the authenticated client, newest first. Meant for polling right after creating a website: 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.
|
|
187
|
+
|
|
188
|
+
### Example
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
import {
|
|
192
|
+
HostingWebsitesApi,
|
|
193
|
+
Configuration
|
|
194
|
+
} from '@hostinger/sdk';
|
|
195
|
+
|
|
196
|
+
const configuration = new Configuration();
|
|
197
|
+
const apiInstance = new HostingWebsitesApi(configuration);
|
|
198
|
+
|
|
199
|
+
let domain: string; //Filter by domain name (exact match) (optional) (default to undefined)
|
|
200
|
+
|
|
201
|
+
const { status, data } = await apiInstance.listWebsiteSetupsV1(
|
|
202
|
+
domain
|
|
203
|
+
);
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Parameters
|
|
207
|
+
|
|
208
|
+
|Name | Type | Description | Notes|
|
|
209
|
+
|------------- | ------------- | ------------- | -------------|
|
|
210
|
+
| **domain** | [**string**] | Filter by domain name (exact match) | (optional) defaults to undefined|
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
### Return type
|
|
214
|
+
|
|
215
|
+
**Array<HostingV1OnboardingsOnboardingResource>**
|
|
216
|
+
|
|
217
|
+
### Authorization
|
|
218
|
+
|
|
219
|
+
[apiToken](../README.md#apiToken)
|
|
220
|
+
|
|
221
|
+
### HTTP request headers
|
|
222
|
+
|
|
223
|
+
- **Content-Type**: Not defined
|
|
224
|
+
- **Accept**: application/json
|
|
225
|
+
|
|
226
|
+
|
|
172
227
|
### HTTP response details
|
|
173
228
|
| Status code | Description | Response headers |
|
|
174
229
|
|-------------|-------------|------------------|
|
|
@@ -182,7 +237,7 @@ const { status, data } = await apiInstance.deployStaticSiteArchiveV1(
|
|
|
182
237
|
# **listWebsitesV1**
|
|
183
238
|
> HostingListWebsitesV1200Response listWebsitesV1()
|
|
184
239
|
|
|
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.
|
|
240
|
+
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. A website appears in this list before its server-side setup has finished, and `is_enabled` reflects suspension, not readiness. To know when a newly created website is ready for file, deploy or database operations, poll the list website setups endpoint instead.
|
|
186
241
|
|
|
187
242
|
### Example
|
|
188
243
|
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.55.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|