|
| 1 | +# hostinger_api.DomainsForwardingApi |
| 2 | + |
| 3 | +All URIs are relative to *https://developers.hostinger.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**create_forwarding_data_v1**](DomainsForwardingApi.md#create_forwarding_data_v1) | **POST** /api/domains/v1/forwarding | Create forwarding data |
| 8 | +[**delete_forwarding_data_v1**](DomainsForwardingApi.md#delete_forwarding_data_v1) | **DELETE** /api/domains/v1/forwarding/{domain} | Delete forwarding data |
| 9 | +[**get_forwarding_data_v1**](DomainsForwardingApi.md#get_forwarding_data_v1) | **GET** /api/domains/v1/forwarding/{domain} | Get forwarding data |
| 10 | + |
| 11 | + |
| 12 | +# **create_forwarding_data_v1** |
| 13 | +> DomainsV1ForwardingForwardingResource create_forwarding_data_v1(domains_v1_forwarding_store_request) |
| 14 | +
|
| 15 | +Create forwarding data |
| 16 | + |
| 17 | +This endpoint creates domain forwarding data. |
| 18 | + |
| 19 | +### Example |
| 20 | + |
| 21 | +* Bearer Authentication (apiToken): |
| 22 | + |
| 23 | +```python |
| 24 | +import hostinger_api |
| 25 | +from hostinger_api.models.domains_v1_forwarding_forwarding_resource import DomainsV1ForwardingForwardingResource |
| 26 | +from hostinger_api.models.domains_v1_forwarding_store_request import DomainsV1ForwardingStoreRequest |
| 27 | +from hostinger_api.rest import ApiException |
| 28 | +from pprint import pprint |
| 29 | + |
| 30 | + |
| 31 | +# Configure Bearer authorization: apiToken |
| 32 | +configuration = hostinger_api.Configuration( |
| 33 | + access_token = os.environ["BEARER_TOKEN"] |
| 34 | +) |
| 35 | + |
| 36 | +# Enter a context with an instance of the API client |
| 37 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 38 | + # Create an instance of the API class |
| 39 | + api_instance = hostinger_api.DomainsForwardingApi(api_client) |
| 40 | + domains_v1_forwarding_store_request = hostinger_api.DomainsV1ForwardingStoreRequest() # DomainsV1ForwardingStoreRequest | |
| 41 | + |
| 42 | + try: |
| 43 | + # Create forwarding data |
| 44 | + api_response = api_instance.create_forwarding_data_v1(domains_v1_forwarding_store_request) |
| 45 | + print("The response of DomainsForwardingApi->create_forwarding_data_v1:\n") |
| 46 | + pprint(api_response) |
| 47 | + except Exception as e: |
| 48 | + print("Exception when calling DomainsForwardingApi->create_forwarding_data_v1: %s\n" % e) |
| 49 | +``` |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +### Parameters |
| 54 | + |
| 55 | + |
| 56 | +Name | Type | Description | Notes |
| 57 | +------------- | ------------- | ------------- | ------------- |
| 58 | + **domains_v1_forwarding_store_request** | [**DomainsV1ForwardingStoreRequest**](DomainsV1ForwardingStoreRequest.md)| | |
| 59 | + |
| 60 | +### Return type |
| 61 | + |
| 62 | +[**DomainsV1ForwardingForwardingResource**](DomainsV1ForwardingForwardingResource.md) |
| 63 | + |
| 64 | +### Authorization |
| 65 | + |
| 66 | +[apiToken](../README.md#apiToken) |
| 67 | + |
| 68 | +### HTTP request headers |
| 69 | + |
| 70 | + - **Content-Type**: application/json |
| 71 | + - **Accept**: application/json |
| 72 | + |
| 73 | +### HTTP response details |
| 74 | + |
| 75 | +| Status code | Description | Response headers | |
| 76 | +|-------------|-------------|------------------| |
| 77 | +**200** | Success response | - | |
| 78 | +**422** | Validation error response | - | |
| 79 | +**401** | Unauthenticated | - | |
| 80 | +**500** | Error response | - | |
| 81 | + |
| 82 | +[[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) |
| 83 | + |
| 84 | +# **delete_forwarding_data_v1** |
| 85 | +> CommonSuccessEmptyResource delete_forwarding_data_v1(domain) |
| 86 | +
|
| 87 | +Delete forwarding data |
| 88 | + |
| 89 | +This endpoint deletes domain forwarding data. |
| 90 | + |
| 91 | +### Example |
| 92 | + |
| 93 | +* Bearer Authentication (apiToken): |
| 94 | + |
| 95 | +```python |
| 96 | +import hostinger_api |
| 97 | +from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource |
| 98 | +from hostinger_api.rest import ApiException |
| 99 | +from pprint import pprint |
| 100 | + |
| 101 | + |
| 102 | +# Configure Bearer authorization: apiToken |
| 103 | +configuration = hostinger_api.Configuration( |
| 104 | + access_token = os.environ["BEARER_TOKEN"] |
| 105 | +) |
| 106 | + |
| 107 | +# Enter a context with an instance of the API client |
| 108 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 109 | + # Create an instance of the API class |
| 110 | + api_instance = hostinger_api.DomainsForwardingApi(api_client) |
| 111 | + domain = 'mydomain.tld' # str | Domain name |
| 112 | + |
| 113 | + try: |
| 114 | + # Delete forwarding data |
| 115 | + api_response = api_instance.delete_forwarding_data_v1(domain) |
| 116 | + print("The response of DomainsForwardingApi->delete_forwarding_data_v1:\n") |
| 117 | + pprint(api_response) |
| 118 | + except Exception as e: |
| 119 | + print("Exception when calling DomainsForwardingApi->delete_forwarding_data_v1: %s\n" % e) |
| 120 | +``` |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | +### Parameters |
| 125 | + |
| 126 | + |
| 127 | +Name | Type | Description | Notes |
| 128 | +------------- | ------------- | ------------- | ------------- |
| 129 | + **domain** | **str**| Domain name | |
| 130 | + |
| 131 | +### Return type |
| 132 | + |
| 133 | +[**CommonSuccessEmptyResource**](CommonSuccessEmptyResource.md) |
| 134 | + |
| 135 | +### Authorization |
| 136 | + |
| 137 | +[apiToken](../README.md#apiToken) |
| 138 | + |
| 139 | +### HTTP request headers |
| 140 | + |
| 141 | + - **Content-Type**: Not defined |
| 142 | + - **Accept**: application/json |
| 143 | + |
| 144 | +### HTTP response details |
| 145 | + |
| 146 | +| Status code | Description | Response headers | |
| 147 | +|-------------|-------------|------------------| |
| 148 | +**200** | Success response | - | |
| 149 | +**401** | Unauthenticated | - | |
| 150 | +**500** | Error response | - | |
| 151 | + |
| 152 | +[[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) |
| 153 | + |
| 154 | +# **get_forwarding_data_v1** |
| 155 | +> DomainsV1ForwardingForwardingResource get_forwarding_data_v1(domain) |
| 156 | +
|
| 157 | +Get forwarding data |
| 158 | + |
| 159 | +This endpoint retrieves domain forwarding data. |
| 160 | + |
| 161 | +### Example |
| 162 | + |
| 163 | +* Bearer Authentication (apiToken): |
| 164 | + |
| 165 | +```python |
| 166 | +import hostinger_api |
| 167 | +from hostinger_api.models.domains_v1_forwarding_forwarding_resource import DomainsV1ForwardingForwardingResource |
| 168 | +from hostinger_api.rest import ApiException |
| 169 | +from pprint import pprint |
| 170 | + |
| 171 | + |
| 172 | +# Configure Bearer authorization: apiToken |
| 173 | +configuration = hostinger_api.Configuration( |
| 174 | + access_token = os.environ["BEARER_TOKEN"] |
| 175 | +) |
| 176 | + |
| 177 | +# Enter a context with an instance of the API client |
| 178 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 179 | + # Create an instance of the API class |
| 180 | + api_instance = hostinger_api.DomainsForwardingApi(api_client) |
| 181 | + domain = 'mydomain.tld' # str | Domain name |
| 182 | + |
| 183 | + try: |
| 184 | + # Get forwarding data |
| 185 | + api_response = api_instance.get_forwarding_data_v1(domain) |
| 186 | + print("The response of DomainsForwardingApi->get_forwarding_data_v1:\n") |
| 187 | + pprint(api_response) |
| 188 | + except Exception as e: |
| 189 | + print("Exception when calling DomainsForwardingApi->get_forwarding_data_v1: %s\n" % e) |
| 190 | +``` |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | +### Parameters |
| 195 | + |
| 196 | + |
| 197 | +Name | Type | Description | Notes |
| 198 | +------------- | ------------- | ------------- | ------------- |
| 199 | + **domain** | **str**| Domain name | |
| 200 | + |
| 201 | +### Return type |
| 202 | + |
| 203 | +[**DomainsV1ForwardingForwardingResource**](DomainsV1ForwardingForwardingResource.md) |
| 204 | + |
| 205 | +### Authorization |
| 206 | + |
| 207 | +[apiToken](../README.md#apiToken) |
| 208 | + |
| 209 | +### HTTP request headers |
| 210 | + |
| 211 | + - **Content-Type**: Not defined |
| 212 | + - **Accept**: application/json |
| 213 | + |
| 214 | +### HTTP response details |
| 215 | + |
| 216 | +| Status code | Description | Response headers | |
| 217 | +|-------------|-------------|------------------| |
| 218 | +**200** | Success response | - | |
| 219 | +**401** | Unauthenticated | - | |
| 220 | +**500** | Error response | - | |
| 221 | + |
| 222 | +[[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) |
| 223 | + |
0 commit comments