You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/HostingFilesApi.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,10 @@ Generate upload URL
17
17
Generate a file browser upload URL with authentication credentials
18
18
for uploading files directly to a website's file storage.
19
19
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
+
20
24
Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the
21
25
website's `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0).
22
26
Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request
@@ -113,6 +117,7 @@ Name | Type | Description | Notes
113
117
**200** | Success response | - |
114
118
**422** | Validation error response | - |
115
119
**401** | Unauthenticated response | - |
120
+
**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> |
116
121
**500** | Error response | - |
117
122
118
123
[[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)
**status** | **str** | `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. |
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
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
**domain** | **str** | Website domain. Null for U4S websites with no domain attached. | [optional]
9
9
**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]
11
11
**username** | **str** | Username. Not applicable for U4S websites. | [optional]
[**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
10
11
[**list_websites_v1**](HostingWebsitesApi.md#list_websites_v1) | **GET** /api/hosting/v1/websites | List websites
11
12
12
13
@@ -27,8 +28,11 @@ in the selected datacenter.
27
28
28
29
Subsequent websites will be hosted on the same datacenter automatically.
29
30
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.
32
36
33
37
### Example
34
38
@@ -269,6 +273,86 @@ Name | Type | Description | Notes
269
273
270
274
[[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)
[[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 commit comments