Skip to content

Commit a558fe6

Browse files
chore: sdk update
1 parent f30c265 commit a558fe6

1,245 files changed

Lines changed: 3765 additions & 1350 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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,13 @@ Class | Method | HTTP request | Description
247247
*HostingFilesApi* | [**get_website_file_content_v1**](docs/HostingFilesApi.md#get_website_file_content_v1) | **GET** /api/hosting/v1/accounts/{username}/domains/{domain}/files/content | Get website file content
248248
*HostingFilesApi* | [**list_website_files_and_directories_v1**](docs/HostingFilesApi.md#list_website_files_and_directories_v1) | **GET** /api/hosting/v1/accounts/{username}/domains/{domain}/files | List website files and directories
249249
*HostingGitApi* | [**delete_git_auto_deployment_settings_v1**](docs/HostingGitApi.md#delete_git_auto_deployment_settings_v1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Delete Git auto-deployment settings
250+
*HostingGitApi* | [**deploy_website_git_repository_v1**](docs/HostingGitApi.md#deploy_website_git_repository_v1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/git/repositories/deploy | Deploy website Git repository
251+
*HostingGitApi* | [**generate_git_ssh_key_v1**](docs/HostingGitApi.md#generate_git_ssh_key_v1) | **POST** /api/hosting/v1/accounts/{username}/git/ssh-key | Generate Git SSH key
250252
*HostingGitApi* | [**get_git_auto_deployment_settings_v1**](docs/HostingGitApi.md#get_git_auto_deployment_settings_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Get Git auto-deployment settings
253+
*HostingGitApi* | [**get_git_ssh_public_key_v1**](docs/HostingGitApi.md#get_git_ssh_public_key_v1) | **GET** /api/hosting/v1/accounts/{username}/git/ssh-key | Get Git SSH public key
251254
*HostingGitApi* | [**list_git_installation_repositories_v1**](docs/HostingGitApi.md#list_git_installation_repositories_v1) | **GET** /api/hosting/v1/git/installations/{uuid}/repositories | List Git installation repositories
252255
*HostingGitApi* | [**list_git_installations_v1**](docs/HostingGitApi.md#list_git_installations_v1) | **GET** /api/hosting/v1/git/installations | List Git installations
256+
*HostingGitApi* | [**list_website_git_repositories_v1**](docs/HostingGitApi.md#list_website_git_repositories_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/git/repositories | List website Git repositories
253257
*HostingGitApi* | [**update_git_auto_deployment_settings_v1**](docs/HostingGitApi.md#update_git_auto_deployment_settings_v1) | **PUT** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Update Git auto-deployment settings
254258
*HostingNodeJSApi* | [**analyse_failed_node_js_build_v1**](docs/HostingNodeJSApi.md#analyse_failed_node_js_build_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/analysis | Analyse failed Node.js build
255259
*HostingNodeJSApi* | [**clear_node_js_runtime_logs_v1**](docs/HostingNodeJSApi.md#clear_node_js_runtime_logs_v1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/runtime-logs | Clear Node.js runtime logs
@@ -736,12 +740,17 @@ Class | Method | HTTP request | Description
736740
- [HostingV1FilesFilesResourceItemsInner](docs/HostingV1FilesFilesResourceItemsInner.md)
737741
- [HostingV1FilesGenerateUploadUrlRequest](docs/HostingV1FilesGenerateUploadUrlRequest.md)
738742
- [HostingV1FilesUploadUrlResource](docs/HostingV1FilesUploadUrlResource.md)
743+
- [HostingV1GitDeployWebsiteGitRepositoryRequest](docs/HostingV1GitDeployWebsiteGitRepositoryRequest.md)
739744
- [HostingV1GitGitAutoDeploymentSettingsResource](docs/HostingV1GitGitAutoDeploymentSettingsResource.md)
740745
- [HostingV1GitGitCommitAuthorResource](docs/HostingV1GitGitCommitAuthorResource.md)
741746
- [HostingV1GitGitCommitResource](docs/HostingV1GitGitCommitResource.md)
747+
- [HostingV1GitGitDeployOutputResource](docs/HostingV1GitGitDeployOutputResource.md)
742748
- [HostingV1GitGitInstallationResource](docs/HostingV1GitGitInstallationResource.md)
743749
- [HostingV1GitGitRepositoryResource](docs/HostingV1GitGitRepositoryResource.md)
750+
- [HostingV1GitGitSshKeyResource](docs/HostingV1GitGitSshKeyResource.md)
744751
- [HostingV1GitUpdateGitAutoDeploymentSettingsRequest](docs/HostingV1GitUpdateGitAutoDeploymentSettingsRequest.md)
752+
- [HostingV1GitWebsiteGitRepositoryResource](docs/HostingV1GitWebsiteGitRepositoryResource.md)
753+
- [HostingV1GitWebsiteGitRepositoryWebhookResource](docs/HostingV1GitWebsiteGitRepositoryWebhookResource.md)
745754
- [HostingV1NodeJsBuildAnalysisResource](docs/HostingV1NodeJsBuildAnalysisResource.md)
746755
- [HostingV1NodeJsBuildLogsResource](docs/HostingV1NodeJsBuildLogsResource.md)
747756
- [HostingV1NodeJsBuildOptionsResource](docs/HostingV1NodeJsBuildOptionsResource.md)

‎docs/HostingGitApi.md‎

Lines changed: 313 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ All URIs are relative to *https://developers.hostinger.com*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**delete_git_auto_deployment_settings_v1**](HostingGitApi.md#delete_git_auto_deployment_settings_v1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Delete Git auto-deployment settings
8+
[**deploy_website_git_repository_v1**](HostingGitApi.md#deploy_website_git_repository_v1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/git/repositories/deploy | Deploy website Git repository
9+
[**generate_git_ssh_key_v1**](HostingGitApi.md#generate_git_ssh_key_v1) | **POST** /api/hosting/v1/accounts/{username}/git/ssh-key | Generate Git SSH key
810
[**get_git_auto_deployment_settings_v1**](HostingGitApi.md#get_git_auto_deployment_settings_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Get Git auto-deployment settings
11+
[**get_git_ssh_public_key_v1**](HostingGitApi.md#get_git_ssh_public_key_v1) | **GET** /api/hosting/v1/accounts/{username}/git/ssh-key | Get Git SSH public key
912
[**list_git_installation_repositories_v1**](HostingGitApi.md#list_git_installation_repositories_v1) | **GET** /api/hosting/v1/git/installations/{uuid}/repositories | List Git installation repositories
1013
[**list_git_installations_v1**](HostingGitApi.md#list_git_installations_v1) | **GET** /api/hosting/v1/git/installations | List Git installations
14+
[**list_website_git_repositories_v1**](HostingGitApi.md#list_website_git_repositories_v1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/git/repositories | List website Git repositories
1115
[**update_git_auto_deployment_settings_v1**](HostingGitApi.md#update_git_auto_deployment_settings_v1) | **PUT** /api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings | Update Git auto-deployment settings
1216

1317

@@ -85,6 +89,168 @@ Name | Type | Description | Notes
8589

8690
[[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)
8791

92+
# **deploy_website_git_repository_v1**
93+
> HostingV1GitGitDeployOutputResource deploy_website_git_repository_v1(username, domain, hosting_v1_git_deploy_website_git_repository_request)
94+
95+
Deploy website Git repository
96+
97+
Clones a Git repository into a directory of the website, or pulls it again. An empty or missing
98+
directory gets a clone of the branch. A directory that already holds this repository and branch is
99+
reset to its last commit and pulled: changes made on the server to files the repository tracks are
100+
discarded, files it does not track stay. A directory that holds other files, including another
101+
repository or another branch of this one, is rejected. `composer install` runs after the clone or
102+
pull when the repository has a `composer.json`.
103+
104+
The call waits for the deployment and returns its log. `is_success` false means Git or composer
105+
failed and the log says why. A second call for the same directory is rejected while the first is
106+
still waiting for the server. If the request times out, the deployment may still finish on the
107+
server; calling again later with the same repository and branch pulls.
108+
109+
Private repositories need an SSH URL and the account's Git SSH key from `Generate Git SSH key`,
110+
added to the repository as a deploy key.
111+
112+
### Example
113+
114+
* Bearer Authentication (apiToken):
115+
116+
```python
117+
import hostinger_api
118+
from hostinger_api.models.hosting_v1_git_deploy_website_git_repository_request import HostingV1GitDeployWebsiteGitRepositoryRequest
119+
from hostinger_api.models.hosting_v1_git_git_deploy_output_resource import HostingV1GitGitDeployOutputResource
120+
from hostinger_api.rest import ApiException
121+
from pprint import pprint
122+
123+
124+
# Configure Bearer authorization: apiToken
125+
configuration = hostinger_api.Configuration(
126+
access_token = os.environ["BEARER_TOKEN"]
127+
)
128+
129+
# Enter a context with an instance of the API client
130+
with hostinger_api.ApiClient(configuration) as api_client:
131+
# Create an instance of the API class
132+
api_instance = hostinger_api.HostingGitApi(api_client)
133+
username = 'u123456789' # str |
134+
domain = 'mydomain.tld' # str | Domain name
135+
hosting_v1_git_deploy_website_git_repository_request = hostinger_api.HostingV1GitDeployWebsiteGitRepositoryRequest() # HostingV1GitDeployWebsiteGitRepositoryRequest |
136+
137+
try:
138+
# Deploy website Git repository
139+
api_response = api_instance.deploy_website_git_repository_v1(username, domain, hosting_v1_git_deploy_website_git_repository_request)
140+
print("The response of HostingGitApi->deploy_website_git_repository_v1:\n")
141+
pprint(api_response)
142+
except Exception as e:
143+
print("Exception when calling HostingGitApi->deploy_website_git_repository_v1: %s\n" % e)
144+
```
145+
146+
147+
148+
### Parameters
149+
150+
151+
Name | Type | Description | Notes
152+
------------- | ------------- | ------------- | -------------
153+
**username** | **str**| |
154+
**domain** | **str**| Domain name |
155+
**hosting_v1_git_deploy_website_git_repository_request** | [**HostingV1GitDeployWebsiteGitRepositoryRequest**](HostingV1GitDeployWebsiteGitRepositoryRequest.md)| |
156+
157+
### Return type
158+
159+
[**HostingV1GitGitDeployOutputResource**](HostingV1GitGitDeployOutputResource.md)
160+
161+
### Authorization
162+
163+
[apiToken](../README.md#apiToken)
164+
165+
### HTTP request headers
166+
167+
- **Content-Type**: application/json
168+
- **Accept**: application/json
169+
170+
### HTTP response details
171+
172+
| Status code | Description | Response headers |
173+
|-------------|-------------|------------------|
174+
**200** | Success response | - |
175+
**422** | Validation error response | - |
176+
**401** | Unauthenticated response | - |
177+
**500** | Error response | - |
178+
179+
[[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)
180+
181+
# **generate_git_ssh_key_v1**
182+
> HostingV1GitGitSshKeyResource generate_git_ssh_key_v1(username)
183+
184+
Generate Git SSH key
185+
186+
Creates the SSH key pair of the hosting account and returns the public key. When the account already
187+
has a key, returns that key unchanged. One key serves every website of the account; add the public
188+
key to a private repository as a deploy key before deploying it.
189+
190+
### Example
191+
192+
* Bearer Authentication (apiToken):
193+
194+
```python
195+
import hostinger_api
196+
from hostinger_api.models.hosting_v1_git_git_ssh_key_resource import HostingV1GitGitSshKeyResource
197+
from hostinger_api.rest import ApiException
198+
from pprint import pprint
199+
200+
201+
# Configure Bearer authorization: apiToken
202+
configuration = hostinger_api.Configuration(
203+
access_token = os.environ["BEARER_TOKEN"]
204+
)
205+
206+
# Enter a context with an instance of the API client
207+
with hostinger_api.ApiClient(configuration) as api_client:
208+
# Create an instance of the API class
209+
api_instance = hostinger_api.HostingGitApi(api_client)
210+
username = 'u123456789' # str |
211+
212+
try:
213+
# Generate Git SSH key
214+
api_response = api_instance.generate_git_ssh_key_v1(username)
215+
print("The response of HostingGitApi->generate_git_ssh_key_v1:\n")
216+
pprint(api_response)
217+
except Exception as e:
218+
print("Exception when calling HostingGitApi->generate_git_ssh_key_v1: %s\n" % e)
219+
```
220+
221+
222+
223+
### Parameters
224+
225+
226+
Name | Type | Description | Notes
227+
------------- | ------------- | ------------- | -------------
228+
**username** | **str**| |
229+
230+
### Return type
231+
232+
[**HostingV1GitGitSshKeyResource**](HostingV1GitGitSshKeyResource.md)
233+
234+
### Authorization
235+
236+
[apiToken](../README.md#apiToken)
237+
238+
### HTTP request headers
239+
240+
- **Content-Type**: Not defined
241+
- **Accept**: application/json
242+
243+
### HTTP response details
244+
245+
| Status code | Description | Response headers |
246+
|-------------|-------------|------------------|
247+
**200** | Success response | - |
248+
**422** | Validation error response | - |
249+
**401** | Unauthenticated response | - |
250+
**500** | Error response | - |
251+
252+
[[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)
253+
88254
# **get_git_auto_deployment_settings_v1**
89255
> HostingV1GitGitAutoDeploymentSettingsResource get_git_auto_deployment_settings_v1(username, domain)
90256
@@ -162,6 +328,78 @@ Name | Type | Description | Notes
162328

163329
[[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)
164330

331+
# **get_git_ssh_public_key_v1**
332+
> HostingV1GitGitSshKeyResource get_git_ssh_public_key_v1(username)
333+
334+
Get Git SSH public key
335+
336+
Returns the public SSH key of the hosting account. `Deploy website Git repository` uses this key to
337+
clone and pull over SSH, so a private repository works once the key is added to it as a deploy key
338+
on the Git host. `public_key` is null when the account has no key yet.
339+
340+
### Example
341+
342+
* Bearer Authentication (apiToken):
343+
344+
```python
345+
import hostinger_api
346+
from hostinger_api.models.hosting_v1_git_git_ssh_key_resource import HostingV1GitGitSshKeyResource
347+
from hostinger_api.rest import ApiException
348+
from pprint import pprint
349+
350+
351+
# Configure Bearer authorization: apiToken
352+
configuration = hostinger_api.Configuration(
353+
access_token = os.environ["BEARER_TOKEN"]
354+
)
355+
356+
# Enter a context with an instance of the API client
357+
with hostinger_api.ApiClient(configuration) as api_client:
358+
# Create an instance of the API class
359+
api_instance = hostinger_api.HostingGitApi(api_client)
360+
username = 'u123456789' # str |
361+
362+
try:
363+
# Get Git SSH public key
364+
api_response = api_instance.get_git_ssh_public_key_v1(username)
365+
print("The response of HostingGitApi->get_git_ssh_public_key_v1:\n")
366+
pprint(api_response)
367+
except Exception as e:
368+
print("Exception when calling HostingGitApi->get_git_ssh_public_key_v1: %s\n" % e)
369+
```
370+
371+
372+
373+
### Parameters
374+
375+
376+
Name | Type | Description | Notes
377+
------------- | ------------- | ------------- | -------------
378+
**username** | **str**| |
379+
380+
### Return type
381+
382+
[**HostingV1GitGitSshKeyResource**](HostingV1GitGitSshKeyResource.md)
383+
384+
### Authorization
385+
386+
[apiToken](../README.md#apiToken)
387+
388+
### HTTP request headers
389+
390+
- **Content-Type**: Not defined
391+
- **Accept**: application/json
392+
393+
### HTTP response details
394+
395+
| Status code | Description | Response headers |
396+
|-------------|-------------|------------------|
397+
**200** | Success response | - |
398+
**401** | Unauthenticated response | - |
399+
**500** | Error response | - |
400+
401+
[[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)
402+
165403
# **list_git_installation_repositories_v1**
166404
> List[HostingV1GitGitRepositoryResource] list_git_installation_repositories_v1(uuid)
167405
@@ -326,6 +564,81 @@ Name | Type | Description | Notes
326564

327565
[[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)
328566

567+
# **list_website_git_repositories_v1**
568+
> List[HostingV1GitWebsiteGitRepositoryResource] list_website_git_repositories_v1(username, domain)
569+
570+
List website Git repositories
571+
572+
Lists the Git repositories linked to directories of the website, with
573+
`Deploy website Git repository` or in the Git section of hPanel: clone URL, branch and directory of
574+
each one. A repository whose clone failed stays listed; deploying it again retries the clone. GitHub
575+
and GitLab auto-deployments are not listed here; see `Get Git auto-deployment settings`.
576+
577+
### Example
578+
579+
* Bearer Authentication (apiToken):
580+
581+
```python
582+
import hostinger_api
583+
from hostinger_api.models.hosting_v1_git_website_git_repository_resource import HostingV1GitWebsiteGitRepositoryResource
584+
from hostinger_api.rest import ApiException
585+
from pprint import pprint
586+
587+
588+
# Configure Bearer authorization: apiToken
589+
configuration = hostinger_api.Configuration(
590+
access_token = os.environ["BEARER_TOKEN"]
591+
)
592+
593+
# Enter a context with an instance of the API client
594+
with hostinger_api.ApiClient(configuration) as api_client:
595+
# Create an instance of the API class
596+
api_instance = hostinger_api.HostingGitApi(api_client)
597+
username = 'u123456789' # str |
598+
domain = 'mydomain.tld' # str | Domain name
599+
600+
try:
601+
# List website Git repositories
602+
api_response = api_instance.list_website_git_repositories_v1(username, domain)
603+
print("The response of HostingGitApi->list_website_git_repositories_v1:\n")
604+
pprint(api_response)
605+
except Exception as e:
606+
print("Exception when calling HostingGitApi->list_website_git_repositories_v1: %s\n" % e)
607+
```
608+
609+
610+
611+
### Parameters
612+
613+
614+
Name | Type | Description | Notes
615+
------------- | ------------- | ------------- | -------------
616+
**username** | **str**| |
617+
**domain** | **str**| Domain name |
618+
619+
### Return type
620+
621+
[**List[HostingV1GitWebsiteGitRepositoryResource]**](HostingV1GitWebsiteGitRepositoryResource.md)
622+
623+
### Authorization
624+
625+
[apiToken](../README.md#apiToken)
626+
627+
### HTTP request headers
628+
629+
- **Content-Type**: Not defined
630+
- **Accept**: application/json
631+
632+
### HTTP response details
633+
634+
| Status code | Description | Response headers |
635+
|-------------|-------------|------------------|
636+
**200** | Success response | - |
637+
**401** | Unauthenticated response | - |
638+
**500** | Error response | - |
639+
640+
[[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)
641+
329642
# **update_git_auto_deployment_settings_v1**
330643
> CommonSuccessEmptyResource update_git_auto_deployment_settings_v1(username, domain, hosting_v1_git_update_git_auto_deployment_settings_request)
331644

0 commit comments

Comments
 (0)