Skip to content

Commit 80b5246

Browse files
chore: sdk update
1 parent b3d0ae8 commit 80b5246

414 files changed

Lines changed: 1995 additions & 500 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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ For more information, please visit [https://developers.hostinger.com](https://de
99

1010
## Requirements.
1111

12-
Python 3.10+
12+
Python 3.9+
1313

1414
## Installation & Usage
1515
### pip install
@@ -127,9 +127,12 @@ Class | Method | HTTP request | Description
127127
*HorizonsWebsitesApi* | [**create_website_v1**](docs/HorizonsWebsitesApi.md#create_website_v1) | **POST** /api/horizons/v1/websites | Create website
128128
*HorizonsWebsitesApi* | [**get_website_v1**](docs/HorizonsWebsitesApi.md#get_website_v1) | **GET** /api/horizons/v1/websites/{websiteId} | Get website
129129
*HostingDatabasesApi* | [**change_database_password_v1**](docs/HostingDatabasesApi.md#change_database_password_v1) | **PATCH** /api/hosting/v1/accounts/{username}/databases/{name}/change-password | Change database password
130+
*HostingDatabasesApi* | [**create_account_database_remote_connection_v1**](docs/HostingDatabasesApi.md#create_account_database_remote_connection_v1) | **POST** /api/hosting/v1/accounts/{username}/databases/{name}/remote-connections | Create account database remote connection
130131
*HostingDatabasesApi* | [**create_account_database_v1**](docs/HostingDatabasesApi.md#create_account_database_v1) | **POST** /api/hosting/v1/accounts/{username}/databases | Create account database
132+
*HostingDatabasesApi* | [**delete_account_database_remote_connection_v1**](docs/HostingDatabasesApi.md#delete_account_database_remote_connection_v1) | **DELETE** /api/hosting/v1/accounts/{username}/databases/{name}/remote-connections | Delete account database remote connection
131133
*HostingDatabasesApi* | [**delete_account_database_v1**](docs/HostingDatabasesApi.md#delete_account_database_v1) | **DELETE** /api/hosting/v1/accounts/{username}/databases/{name} | Delete account database
132134
*HostingDatabasesApi* | [**get_php_my_admin_link_v1**](docs/HostingDatabasesApi.md#get_php_my_admin_link_v1) | **GET** /api/hosting/v1/accounts/{username}/databases/{name}/phpmyadmin-link | Get phpMyAdmin link
135+
*HostingDatabasesApi* | [**list_account_database_remote_connections_v1**](docs/HostingDatabasesApi.md#list_account_database_remote_connections_v1) | **GET** /api/hosting/v1/accounts/{username}/databases/remote-connections | List account database remote connections
133136
*HostingDatabasesApi* | [**list_account_databases_v1**](docs/HostingDatabasesApi.md#list_account_databases_v1) | **GET** /api/hosting/v1/accounts/{username}/databases | List account databases
134137
*HostingDatabasesApi* | [**repair_database_v1**](docs/HostingDatabasesApi.md#repair_database_v1) | **PATCH** /api/hosting/v1/accounts/{username}/databases/{name}/repair | Repair database
135138
*HostingDatacentersApi* | [**list_available_datacenters_v1**](docs/HostingDatacentersApi.md#list_available_datacenters_v1) | **GET** /api/hosting/v1/datacenters | List available datacenters
@@ -299,6 +302,8 @@ Class | Method | HTTP request | Description
299302
- [HostingV1DatabasesCreateDatabaseRequest](docs/HostingV1DatabasesCreateDatabaseRequest.md)
300303
- [HostingV1DatabasesDatabaseResource](docs/HostingV1DatabasesDatabaseResource.md)
301304
- [HostingV1DatabasesPhpMyAdminLinkResource](docs/HostingV1DatabasesPhpMyAdminLinkResource.md)
305+
- [HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest](docs/HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest.md)
306+
- [HostingV1DatabasesRemoteConnectionsRemoteConnectionResource](docs/HostingV1DatabasesRemoteConnectionsRemoteConnectionResource.md)
302307
- [HostingV1DatacenterCoordinatesResource](docs/HostingV1DatacenterCoordinatesResource.md)
303308
- [HostingV1DatacenterDatacenterResource](docs/HostingV1DatacenterDatacenterResource.md)
304309
- [HostingV1DatacentersListRequest](docs/HostingV1DatacentersListRequest.md)

docs/HostingDatabasesApi.md

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ All URIs are relative to *https://developers.hostinger.com*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**change_database_password_v1**](HostingDatabasesApi.md#change_database_password_v1) | **PATCH** /api/hosting/v1/accounts/{username}/databases/{name}/change-password | Change database password
8+
[**create_account_database_remote_connection_v1**](HostingDatabasesApi.md#create_account_database_remote_connection_v1) | **POST** /api/hosting/v1/accounts/{username}/databases/{name}/remote-connections | Create account database remote connection
89
[**create_account_database_v1**](HostingDatabasesApi.md#create_account_database_v1) | **POST** /api/hosting/v1/accounts/{username}/databases | Create account database
10+
[**delete_account_database_remote_connection_v1**](HostingDatabasesApi.md#delete_account_database_remote_connection_v1) | **DELETE** /api/hosting/v1/accounts/{username}/databases/{name}/remote-connections | Delete account database remote connection
911
[**delete_account_database_v1**](HostingDatabasesApi.md#delete_account_database_v1) | **DELETE** /api/hosting/v1/accounts/{username}/databases/{name} | Delete account database
1012
[**get_php_my_admin_link_v1**](HostingDatabasesApi.md#get_php_my_admin_link_v1) | **GET** /api/hosting/v1/accounts/{username}/databases/{name}/phpmyadmin-link | Get phpMyAdmin link
13+
[**list_account_database_remote_connections_v1**](HostingDatabasesApi.md#list_account_database_remote_connections_v1) | **GET** /api/hosting/v1/accounts/{username}/databases/remote-connections | List account database remote connections
1114
[**list_account_databases_v1**](HostingDatabasesApi.md#list_account_databases_v1) | **GET** /api/hosting/v1/accounts/{username}/databases | List account databases
1215
[**repair_database_v1**](HostingDatabasesApi.md#repair_database_v1) | **PATCH** /api/hosting/v1/accounts/{username}/databases/{name}/repair | Repair database
1316

@@ -91,6 +94,85 @@ Name | Type | Description | Notes
9194

9295
[[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)
9396

97+
# **create_account_database_remote_connection_v1**
98+
> CommonSuccessEmptyResource create_account_database_remote_connection_v1(username, name, hosting_v1_databases_remote_connections_create_remote_connection_request)
99+
100+
Create account database remote connection
101+
102+
Allows a remote host to connect to the specified database.
103+
104+
Provide an IPv4/IPv6 address, or "%" to allow any host. The database name must be
105+
the full name returned by the list databases endpoint.
106+
107+
### Example
108+
109+
* Bearer Authentication (apiToken):
110+
111+
```python
112+
import hostinger_api
113+
from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource
114+
from hostinger_api.models.hosting_v1_databases_remote_connections_create_remote_connection_request import HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest
115+
from hostinger_api.rest import ApiException
116+
from pprint import pprint
117+
118+
119+
# Configure Bearer authorization: apiToken
120+
configuration = hostinger_api.Configuration(
121+
access_token = os.environ["BEARER_TOKEN"]
122+
)
123+
124+
# Enter a context with an instance of the API client
125+
with hostinger_api.ApiClient(configuration) as api_client:
126+
# Create an instance of the API class
127+
api_instance = hostinger_api.HostingDatabasesApi(api_client)
128+
username = 'u123456789' # str |
129+
name = 'u123456789_test_db' # str | Full database name as returned by the list databases endpoint.
130+
hosting_v1_databases_remote_connections_create_remote_connection_request = hostinger_api.HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest() # HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest |
131+
132+
try:
133+
# Create account database remote connection
134+
api_response = api_instance.create_account_database_remote_connection_v1(username, name, hosting_v1_databases_remote_connections_create_remote_connection_request)
135+
print("The response of HostingDatabasesApi->create_account_database_remote_connection_v1:\n")
136+
pprint(api_response)
137+
except Exception as e:
138+
print("Exception when calling HostingDatabasesApi->create_account_database_remote_connection_v1: %s\n" % e)
139+
```
140+
141+
142+
143+
### Parameters
144+
145+
146+
Name | Type | Description | Notes
147+
------------- | ------------- | ------------- | -------------
148+
**username** | **str**| |
149+
**name** | **str**| Full database name as returned by the list databases endpoint. |
150+
**hosting_v1_databases_remote_connections_create_remote_connection_request** | [**HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest**](HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest.md)| |
151+
152+
### Return type
153+
154+
[**CommonSuccessEmptyResource**](CommonSuccessEmptyResource.md)
155+
156+
### Authorization
157+
158+
[apiToken](../README.md#apiToken)
159+
160+
### HTTP request headers
161+
162+
- **Content-Type**: application/json
163+
- **Accept**: application/json
164+
165+
### HTTP response details
166+
167+
| Status code | Description | Response headers |
168+
|-------------|-------------|------------------|
169+
**200** | Success empty response | - |
170+
**422** | Validation error response | - |
171+
**401** | Unauthenticated response | - |
172+
**500** | Error response | - |
173+
174+
[[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)
175+
94176
# **create_account_database_v1**
95177
> CommonSuccessEmptyResource create_account_database_v1(username, hosting_v1_databases_create_database_request)
96178
@@ -167,6 +249,84 @@ Name | Type | Description | Notes
167249

168250
[[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)
169251

252+
# **delete_account_database_remote_connection_v1**
253+
> CommonSuccessEmptyResource delete_account_database_remote_connection_v1(username, name, ip)
254+
255+
Delete account database remote connection
256+
257+
Permanently removes a remote-access rule, revoking the given host's remote access to the database.
258+
259+
Identify the rule with the required ip query parameter (the IPv4/IPv6 address, or "%",
260+
exactly as returned by the list remote connections endpoint). The database name must be
261+
the full name returned by the list databases endpoint.
262+
263+
### Example
264+
265+
* Bearer Authentication (apiToken):
266+
267+
```python
268+
import hostinger_api
269+
from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource
270+
from hostinger_api.rest import ApiException
271+
from pprint import pprint
272+
273+
274+
# Configure Bearer authorization: apiToken
275+
configuration = hostinger_api.Configuration(
276+
access_token = os.environ["BEARER_TOKEN"]
277+
)
278+
279+
# Enter a context with an instance of the API client
280+
with hostinger_api.ApiClient(configuration) as api_client:
281+
# Create an instance of the API class
282+
api_instance = hostinger_api.HostingDatabasesApi(api_client)
283+
username = 'u123456789' # str |
284+
name = 'u123456789_test_db' # str | Full database name as returned by the list databases endpoint.
285+
ip = '192.0.2.10' # str | Remote host to revoke: the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint.
286+
287+
try:
288+
# Delete account database remote connection
289+
api_response = api_instance.delete_account_database_remote_connection_v1(username, name, ip)
290+
print("The response of HostingDatabasesApi->delete_account_database_remote_connection_v1:\n")
291+
pprint(api_response)
292+
except Exception as e:
293+
print("Exception when calling HostingDatabasesApi->delete_account_database_remote_connection_v1: %s\n" % e)
294+
```
295+
296+
297+
298+
### Parameters
299+
300+
301+
Name | Type | Description | Notes
302+
------------- | ------------- | ------------- | -------------
303+
**username** | **str**| |
304+
**name** | **str**| Full database name as returned by the list databases endpoint. |
305+
**ip** | **str**| Remote host to revoke: the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint. |
306+
307+
### Return type
308+
309+
[**CommonSuccessEmptyResource**](CommonSuccessEmptyResource.md)
310+
311+
### Authorization
312+
313+
[apiToken](../README.md#apiToken)
314+
315+
### HTTP request headers
316+
317+
- **Content-Type**: Not defined
318+
- **Accept**: application/json
319+
320+
### HTTP response details
321+
322+
| Status code | Description | Response headers |
323+
|-------------|-------------|------------------|
324+
**200** | Success empty response | - |
325+
**401** | Unauthenticated response | - |
326+
**500** | Error response | - |
327+
328+
[[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)
329+
170330
# **delete_account_database_v1**
171331
> CommonSuccessEmptyResource delete_account_database_v1(username, name)
172332
@@ -316,6 +476,81 @@ Name | Type | Description | Notes
316476

317477
[[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)
318478

479+
# **list_account_database_remote_connections_v1**
480+
> List[HostingV1DatabasesRemoteConnectionsRemoteConnectionResource] list_account_database_remote_connections_v1(username, domain=domain)
481+
482+
List account database remote connections
483+
484+
Returns the remote-access rules for the specified account: the remote hosts
485+
(IPv4/IPv6 addresses, or "%" for any host) allowed to connect to the account databases.
486+
487+
Use the domain filter to only return rules for databases assigned to a specific domain.
488+
489+
### Example
490+
491+
* Bearer Authentication (apiToken):
492+
493+
```python
494+
import hostinger_api
495+
from hostinger_api.models.hosting_v1_databases_remote_connections_remote_connection_resource import HostingV1DatabasesRemoteConnectionsRemoteConnectionResource
496+
from hostinger_api.rest import ApiException
497+
from pprint import pprint
498+
499+
500+
# Configure Bearer authorization: apiToken
501+
configuration = hostinger_api.Configuration(
502+
access_token = os.environ["BEARER_TOKEN"]
503+
)
504+
505+
# Enter a context with an instance of the API client
506+
with hostinger_api.ApiClient(configuration) as api_client:
507+
# Create an instance of the API class
508+
api_instance = hostinger_api.HostingDatabasesApi(api_client)
509+
username = 'u123456789' # str |
510+
domain = 'example.com' # str | Filter remote connections by the domain the database is assigned to. Rules for databases not assigned to any domain are always included. (optional)
511+
512+
try:
513+
# List account database remote connections
514+
api_response = api_instance.list_account_database_remote_connections_v1(username, domain=domain)
515+
print("The response of HostingDatabasesApi->list_account_database_remote_connections_v1:\n")
516+
pprint(api_response)
517+
except Exception as e:
518+
print("Exception when calling HostingDatabasesApi->list_account_database_remote_connections_v1: %s\n" % e)
519+
```
520+
521+
522+
523+
### Parameters
524+
525+
526+
Name | Type | Description | Notes
527+
------------- | ------------- | ------------- | -------------
528+
**username** | **str**| |
529+
**domain** | **str**| Filter remote connections by the domain the database is assigned to. Rules for databases not assigned to any domain are always included. | [optional]
530+
531+
### Return type
532+
533+
[**List[HostingV1DatabasesRemoteConnectionsRemoteConnectionResource]**](HostingV1DatabasesRemoteConnectionsRemoteConnectionResource.md)
534+
535+
### Authorization
536+
537+
[apiToken](../README.md#apiToken)
538+
539+
### HTTP request headers
540+
541+
- **Content-Type**: Not defined
542+
- **Accept**: application/json
543+
544+
### HTTP response details
545+
546+
| Status code | Description | Response headers |
547+
|-------------|-------------|------------------|
548+
**200** | Success response | - |
549+
**401** | Unauthenticated response | - |
550+
**500** | Error response | - |
551+
552+
[[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)
553+
319554
# **list_account_databases_v1**
320555
> HostingListAccountDatabasesV1200Response list_account_databases_v1(username, page=page, per_page=per_page, domain=domain, is_assigned=is_assigned, search=search)
321556
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**ip** | **str** | Remote host to allow: an IPv4/IPv6 address, or \"%\" for any host. |
9+
10+
## Example
11+
12+
```python
13+
from hostinger_api.models.hosting_v1_databases_remote_connections_create_remote_connection_request import HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest from a JSON string
18+
hosting_v1_databases_remote_connections_create_remote_connection_request_instance = HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest.from_json(json)
19+
# print the JSON string representation of the object
20+
print(HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest.to_json())
21+
22+
# convert the object into a dict
23+
hosting_v1_databases_remote_connections_create_remote_connection_request_dict = hosting_v1_databases_remote_connections_create_remote_connection_request_instance.to_dict()
24+
# create an instance of HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest from a dict
25+
hosting_v1_databases_remote_connections_create_remote_connection_request_from_dict = HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest.from_dict(hosting_v1_databases_remote_connections_create_remote_connection_request_dict)
26+
```
27+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
29+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# HostingV1DatabasesRemoteConnectionsRemoteConnectionResource
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**database_name** | **str** | Full name of the database the rule applies to. | [optional]
9+
**database_user** | **str** | Database user the rule applies to. | [optional]
10+
**ip** | **str** | Allowed remote host: an IPv4/IPv6 address, or \"%\" for any host. | [optional]
11+
12+
## Example
13+
14+
```python
15+
from hostinger_api.models.hosting_v1_databases_remote_connections_remote_connection_resource import HostingV1DatabasesRemoteConnectionsRemoteConnectionResource
16+
17+
# TODO update the JSON string below
18+
json = "{}"
19+
# create an instance of HostingV1DatabasesRemoteConnectionsRemoteConnectionResource from a JSON string
20+
hosting_v1_databases_remote_connections_remote_connection_resource_instance = HostingV1DatabasesRemoteConnectionsRemoteConnectionResource.from_json(json)
21+
# print the JSON string representation of the object
22+
print(HostingV1DatabasesRemoteConnectionsRemoteConnectionResource.to_json())
23+
24+
# convert the object into a dict
25+
hosting_v1_databases_remote_connections_remote_connection_resource_dict = hosting_v1_databases_remote_connections_remote_connection_resource_instance.to_dict()
26+
# create an instance of HostingV1DatabasesRemoteConnectionsRemoteConnectionResource from a dict
27+
hosting_v1_databases_remote_connections_remote_connection_resource_from_dict = HostingV1DatabasesRemoteConnectionsRemoteConnectionResource.from_dict(hosting_v1_databases_remote_connections_remote_connection_resource_dict)
28+
```
29+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30+
31+

0 commit comments

Comments
 (0)