Skip to content

Commit 513e721

Browse files
chore: sdk update
1 parent 25db1f2 commit 513e721

1,230 files changed

Lines changed: 1819 additions & 1244 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ Class | Method | HTTP request | Description
282282
*HostingWebsitesApi* | [**create_website_v1**](docs/HostingWebsitesApi.md#create_website_v1) | **POST** /api/hosting/v1/websites | Create website
283283
*HostingWebsitesApi* | [**delete_website_v1**](docs/HostingWebsitesApi.md#delete_website_v1) | **DELETE** /api/hosting/v1/websites/{domain} | Delete website
284284
*HostingWebsitesApi* | [**deploy_static_site_archive_v1**](docs/HostingWebsitesApi.md#deploy_static_site_archive_v1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/deploy | Deploy static site archive
285+
*HostingWebsitesApi* | [**list_website_setups_v1**](docs/HostingWebsitesApi.md#list_website_setups_v1) | **GET** /api/hosting/v1/onboardings | List website setups
285286
*HostingWebsitesApi* | [**list_websites_v1**](docs/HostingWebsitesApi.md#list_websites_v1) | **GET** /api/hosting/v1/websites | List websites
286287
*MailAPITokensApi* | [**create_api_token_v1**](docs/MailAPITokensApi.md#create_api_token_v1) | **POST** /api/mail/v1/orders/{orderId}/api-tokens | Create API token
287288
*MailAPITokensApi* | [**list_api_tokens_v1**](docs/MailAPITokensApi.md#list_api_tokens_v1) | **GET** /api/mail/v1/api-tokens | List API tokens
@@ -759,6 +760,7 @@ Class | Method | HTTP request | Description
759760
- [HostingV1NodeJsStoredBuildSettingsResource](docs/HostingV1NodeJsStoredBuildSettingsResource.md)
760761
- [HostingV1NodeJsUpdateBuildSettingsRequest](docs/HostingV1NodeJsUpdateBuildSettingsRequest.md)
761762
- [HostingV1NodeJsVulnerabilityResource](docs/HostingV1NodeJsVulnerabilityResource.md)
763+
- [HostingV1OnboardingsOnboardingResource](docs/HostingV1OnboardingsOnboardingResource.md)
762764
- [HostingV1OrdersOrderResource](docs/HostingV1OrdersOrderResource.md)
763765
- [HostingV1OrdersPlanResource](docs/HostingV1OrdersPlanResource.md)
764766
- [HostingV1PhpPhpDetailsResource](docs/HostingV1PhpPhpDetailsResource.md)

‎docs/HostingDatabasesApi.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ Create database remote connection
179179
Allows a remote host to connect to the specified database.
180180

181181
Provide an IPv4/IPv6 address, or "%" to allow any host. The database name must be
182-
the full name returned by the list databases endpoint.
182+
the full name returned by the list databases endpoint. Database creation is synchronous,
183+
so a 404 here means no database with that name exists under the username, not that it
184+
is still being created.
183185

184186
### Example
185187

‎docs/HostingFilesApi.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Generate upload URL
1717
Generate a file browser upload URL with authentication credentials
1818
for uploading files directly to a website's file storage.
1919

20+
While the website is still being set up (`status: running` on the list website setups
21+
endpoint) this endpoint returns 409 with a `Retry-After` header: wait that many
22+
seconds and retry, or poll the website setups until the status is `completed`.
23+
2024
Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the
2125
website's `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0).
2226
Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request
@@ -113,6 +117,7 @@ Name | Type | Description | Notes
113117
**200** | Success response | - |
114118
**422** | Validation error response | - |
115119
**401** | Unauthenticated response | - |
120+
**409** | Conflict response. &#x60;Retry-After&#x60;, when present, is the number of seconds to wait before retrying. | * Retry-After - Seconds to wait before retrying the request <br> |
116121
**500** | Error response | - |
117122

118123
[[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)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# HostingV1OnboardingsOnboardingResource
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**domain** | **str** | Domain of the website being set up. |
9+
**username** | **str** | Hosting account username. |
10+
**status** | **str** | &#x60;running&#x60; while the website is still being set up, &#x60;completed&#x60; once the setup has finished, &#x60;failed&#x60; when it stopped before finishing or has not reported progress for over an hour. |
11+
**created_at** | **datetime** | When the setup was requested. |
12+
**updated_at** | **datetime** | When the setup last reported progress. |
13+
14+
## Example
15+
16+
```python
17+
from hostinger_api.models.hosting_v1_onboardings_onboarding_resource import HostingV1OnboardingsOnboardingResource
18+
19+
# TODO update the JSON string below
20+
json = "{}"
21+
# create an instance of HostingV1OnboardingsOnboardingResource from a JSON string
22+
hosting_v1_onboardings_onboarding_resource_instance = HostingV1OnboardingsOnboardingResource.from_json(json)
23+
# print the JSON string representation of the object
24+
print(HostingV1OnboardingsOnboardingResource.to_json())
25+
26+
# convert the object into a dict
27+
hosting_v1_onboardings_onboarding_resource_dict = hosting_v1_onboardings_onboarding_resource_instance.to_dict()
28+
# create an instance of HostingV1OnboardingsOnboardingResource from a dict
29+
hosting_v1_onboardings_onboarding_resource_from_dict = HostingV1OnboardingsOnboardingResource.from_dict(hosting_v1_onboardings_onboarding_resource_dict)
30+
```
31+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
32+
33+

‎docs/HostingV1WebsitesWebsiteResource.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**domain** | **str** | Website domain. Null for U4S websites with no domain attached. | [optional]
99
**vhost_type** | **str** | Virtual host type. Only present for CloudLinux websites. | [optional]
10-
**is_enabled** | **bool** | Whether website is enabled | [optional]
10+
**is_enabled** | **bool** | 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]
1111
**username** | **str** | Username. Not applicable for U4S websites. | [optional]
1212
**client_id** | **int** | Client ID | [optional]
1313
**order_id** | **int** | Order ID | [optional]

‎docs/HostingWebsitesApi.md‎

Lines changed: 91 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Method | HTTP request | Description
77
[**create_website_v1**](HostingWebsitesApi.md#create_website_v1) | **POST** /api/hosting/v1/websites | Create website
88
[**delete_website_v1**](HostingWebsitesApi.md#delete_website_v1) | **DELETE** /api/hosting/v1/websites/{domain} | Delete website
99
[**deploy_static_site_archive_v1**](HostingWebsitesApi.md#deploy_static_site_archive_v1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/deploy | Deploy static site archive
10+
[**list_website_setups_v1**](HostingWebsitesApi.md#list_website_setups_v1) | **GET** /api/hosting/v1/onboardings | List website setups
1011
[**list_websites_v1**](HostingWebsitesApi.md#list_websites_v1) | **GET** /api/hosting/v1/websites | List websites
1112

1213

@@ -27,8 +28,11 @@ in the selected datacenter.
2728

2829
Subsequent websites will be hosted on the same datacenter automatically.
2930

30-
Website creation takes up to a few minutes to complete. Check the
31-
websites list endpoint to see when your new website becomes available.
31+
Website creation is asynchronous and takes up to a few minutes. Poll the list website
32+
setups endpoint with the `domain` filter every 10 to 15 seconds and wait for `status:
33+
completed` before uploading files, deploying or creating databases. While the setup is
34+
`running`, endpoints that operate on the website may respond with `404` or `409`.
35+
`is_enabled` on the websites list reflects suspension, not readiness.
3236

3337
### Example
3438

@@ -269,6 +273,86 @@ Name | Type | Description | Notes
269273

270274
[[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)
271275

276+
# **list_website_setups_v1**
277+
> List[HostingV1OnboardingsOnboardingResource] list_website_setups_v1(domain=domain)
278+
279+
List website setups
280+
281+
Returns the website setups started in the last 24 hours for the hosting accounts
282+
accessible to the authenticated client, newest first.
283+
284+
Meant for polling right after creating a website: the website shows up in the
285+
websites list before its server-side setup has finished, and while the setup is
286+
`running` endpoints that operate on that website may respond with `404` or `409`.
287+
Poll this endpoint with the `domain` filter every 10 to 15 seconds and wait for
288+
`status: completed` before uploading files, deploying or creating databases.
289+
`failed` means the setup stopped before finishing or has not reported progress for
290+
over an hour. Setups older than 24 hours are not listed.
291+
292+
### Example
293+
294+
* Bearer Authentication (apiToken):
295+
296+
```python
297+
import hostinger_api
298+
from hostinger_api.models.hosting_v1_onboardings_onboarding_resource import HostingV1OnboardingsOnboardingResource
299+
from hostinger_api.rest import ApiException
300+
from pprint import pprint
301+
302+
303+
# Configure Bearer authorization: apiToken
304+
configuration = hostinger_api.Configuration(
305+
access_token = os.environ["BEARER_TOKEN"]
306+
)
307+
308+
# Enter a context with an instance of the API client
309+
with hostinger_api.ApiClient(configuration) as api_client:
310+
# Create an instance of the API class
311+
api_instance = hostinger_api.HostingWebsitesApi(api_client)
312+
domain = 'example.com' # str | Filter by domain name (exact match) (optional)
313+
314+
try:
315+
# List website setups
316+
api_response = api_instance.list_website_setups_v1(domain=domain)
317+
print("The response of HostingWebsitesApi->list_website_setups_v1:\n")
318+
pprint(api_response)
319+
except Exception as e:
320+
print("Exception when calling HostingWebsitesApi->list_website_setups_v1: %s\n" % e)
321+
```
322+
323+
324+
325+
### Parameters
326+
327+
328+
Name | Type | Description | Notes
329+
------------- | ------------- | ------------- | -------------
330+
**domain** | **str**| Filter by domain name (exact match) | [optional]
331+
332+
### Return type
333+
334+
[**List[HostingV1OnboardingsOnboardingResource]**](HostingV1OnboardingsOnboardingResource.md)
335+
336+
### Authorization
337+
338+
[apiToken](../README.md#apiToken)
339+
340+
### HTTP request headers
341+
342+
- **Content-Type**: Not defined
343+
- **Accept**: application/json
344+
345+
### HTTP response details
346+
347+
| Status code | Description | Response headers |
348+
|-------------|-------------|------------------|
349+
**200** | Success response | - |
350+
**422** | Validation error response | - |
351+
**401** | Unauthenticated response | - |
352+
**500** | Error response | - |
353+
354+
[[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)
355+
272356
# **list_websites_v1**
273357
> HostingListWebsitesV1200Response list_websites_v1(page=page, per_page=per_page, username=username, order_id=order_id, is_enabled=is_enabled, domain=domain, website_types=website_types)
274358
@@ -293,6 +377,11 @@ WordPress websites (`website_types=wordpress`) or only Node.js websites
293377
filter by username, order ID, enabled status, or domain name for more targeted
294378
results.
295379

380+
A website appears in this list before its server-side setup has finished, and
381+
`is_enabled` reflects suspension, not readiness. To know when a newly created website
382+
is ready for file, deploy or database operations, poll the list website setups
383+
endpoint instead.
384+
296385
### Example
297386

298387
* Bearer Authentication (apiToken):

‎hostinger_api/__init__.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"""
66
Hostinger API Python SDK
77
8-
API Version: 1.54.2
8+
API Version: 1.55.0
99
1010
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
1111
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
1212
""" # noqa: E501
1313

1414

15-
__version__ = "3.52.2"
15+
__version__ = "3.53.0"
1616

1717
# import apis into sdk package
1818
from hostinger_api.api.agency_hosting_cache_api import AgencyHostingCacheApi
@@ -396,6 +396,7 @@
396396
from hostinger_api.models.hosting_v1_node_js_stored_build_settings_resource import HostingV1NodeJsStoredBuildSettingsResource
397397
from hostinger_api.models.hosting_v1_node_js_update_build_settings_request import HostingV1NodeJsUpdateBuildSettingsRequest
398398
from hostinger_api.models.hosting_v1_node_js_vulnerability_resource import HostingV1NodeJsVulnerabilityResource
399+
from hostinger_api.models.hosting_v1_onboardings_onboarding_resource import HostingV1OnboardingsOnboardingResource
399400
from hostinger_api.models.hosting_v1_orders_order_resource import HostingV1OrdersOrderResource
400401
from hostinger_api.models.hosting_v1_orders_plan_resource import HostingV1OrdersPlanResource
401402
from hostinger_api.models.hosting_v1_php_php_details_resource import HostingV1PhpPhpDetailsResource

‎hostinger_api/api/agency_hosting_cache_api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 1.54.2
6+
API Version: 1.55.0
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

‎hostinger_api/api/agency_hosting_cron_jobs_api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 1.54.2
6+
API Version: 1.55.0
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

‎hostinger_api/api/agency_hosting_databases_api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 1.54.2
6+
API Version: 1.55.0
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

0 commit comments

Comments
 (0)