|
| 1 | +# hostinger_api.AgencyHostingSSLApi |
| 2 | + |
| 3 | +All URIs are relative to *https://developers.hostinger.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**get_website_ssl_status_v1**](AgencyHostingSSLApi.md#get_website_ssl_status_v1) | **GET** /api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl/status | Get website SSL status |
| 8 | +[**install_website_sslv1**](AgencyHostingSSLApi.md#install_website_sslv1) | **POST** /api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl/setup | Install website SSL |
| 9 | +[**reinstall_website_sslv1**](AgencyHostingSSLApi.md#reinstall_website_sslv1) | **POST** /api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl/reinstall | Reinstall website SSL |
| 10 | +[**uninstall_website_sslv1**](AgencyHostingSSLApi.md#uninstall_website_sslv1) | **DELETE** /api/agency-hosting/v1/websites/{website_uid}/domains/{domain}/ssl | Uninstall website SSL |
| 11 | + |
| 12 | + |
| 13 | +# **get_website_ssl_status_v1** |
| 14 | +> AgencyHostingV1SslSslStatusResource get_website_ssl_status_v1(website_uid, domain) |
| 15 | +
|
| 16 | +Get website SSL status |
| 17 | + |
| 18 | +Returns the SSL state of one domain of an Agency Plan website: the certificate `status`, |
| 19 | +whether the certificate was uploaded by the customer, and when it stops being valid. |
| 20 | + |
| 21 | +`installing` means a certificate setup is running or retrying; the `ssl_setup` entry of |
| 22 | +`List website processes` shows the same progress. `active` means a valid certificate is in |
| 23 | +place: uploaded by the customer, issued by the platform, or a lifetime certificate bought for |
| 24 | +the domain. `failed` means the last setup gave up and no valid certificate is in place. |
| 25 | +`expired` means the certificate has run out. `not_installed` means the domain has no |
| 26 | +certificate and no setup process. Returns 404 when the website or the domain does not exist. |
| 27 | + |
| 28 | +### Example |
| 29 | + |
| 30 | +* Bearer Authentication (apiToken): |
| 31 | + |
| 32 | +```python |
| 33 | +import hostinger_api |
| 34 | +from hostinger_api.models.agency_hosting_v1_ssl_ssl_status_resource import AgencyHostingV1SslSslStatusResource |
| 35 | +from hostinger_api.rest import ApiException |
| 36 | +from pprint import pprint |
| 37 | + |
| 38 | + |
| 39 | +# Configure Bearer authorization: apiToken |
| 40 | +configuration = hostinger_api.Configuration( |
| 41 | + access_token = os.environ["BEARER_TOKEN"] |
| 42 | +) |
| 43 | + |
| 44 | +# Enter a context with an instance of the API client |
| 45 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 46 | + # Create an instance of the API class |
| 47 | + api_instance = hostinger_api.AgencyHostingSSLApi(api_client) |
| 48 | + website_uid = 'zpwlGlp19' # str | Agency Plan website UID |
| 49 | + domain = 'mydomain.tld' # str | Domain name |
| 50 | + |
| 51 | + try: |
| 52 | + # Get website SSL status |
| 53 | + api_response = api_instance.get_website_ssl_status_v1(website_uid, domain) |
| 54 | + print("The response of AgencyHostingSSLApi->get_website_ssl_status_v1:\n") |
| 55 | + pprint(api_response) |
| 56 | + except Exception as e: |
| 57 | + print("Exception when calling AgencyHostingSSLApi->get_website_ssl_status_v1: %s\n" % e) |
| 58 | +``` |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +### Parameters |
| 63 | + |
| 64 | + |
| 65 | +Name | Type | Description | Notes |
| 66 | +------------- | ------------- | ------------- | ------------- |
| 67 | + **website_uid** | **str**| Agency Plan website UID | |
| 68 | + **domain** | **str**| Domain name | |
| 69 | + |
| 70 | +### Return type |
| 71 | + |
| 72 | +[**AgencyHostingV1SslSslStatusResource**](AgencyHostingV1SslSslStatusResource.md) |
| 73 | + |
| 74 | +### Authorization |
| 75 | + |
| 76 | +[apiToken](../README.md#apiToken) |
| 77 | + |
| 78 | +### HTTP request headers |
| 79 | + |
| 80 | + - **Content-Type**: Not defined |
| 81 | + - **Accept**: application/json |
| 82 | + |
| 83 | +### HTTP response details |
| 84 | + |
| 85 | +| Status code | Description | Response headers | |
| 86 | +|-------------|-------------|------------------| |
| 87 | +**200** | Success response | - | |
| 88 | +**401** | Unauthenticated response | - | |
| 89 | +**500** | Error response | - | |
| 90 | + |
| 91 | +[[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) |
| 92 | + |
| 93 | +# **install_website_sslv1** |
| 94 | +> CommonSuccessEmptyResource install_website_sslv1(website_uid, domain) |
| 95 | +
|
| 96 | +Install website SSL |
| 97 | + |
| 98 | +Starts a Let's Encrypt certificate setup for the domain and returns at once; the setup runs in |
| 99 | +the background. `Get website SSL status` reports `installing` while it runs, then `active` or |
| 100 | +`failed`; the `ssl_setup` entry of `List website processes` shows the same progress. |
| 101 | + |
| 102 | +Returns 422 when the domain already has a platform certificate that is not expired, when a |
| 103 | +certificate process is recorded for the domain (a failed setup counts until it is cleaned up), |
| 104 | +or when the domain hit its limit of three setups per seven days. Returns 429 when the same |
| 105 | +domain was requested less than a minute ago, 403 when the website is suspended or locked, and |
| 106 | +404 when the website or the domain does not exist. |
| 107 | + |
| 108 | +### Example |
| 109 | + |
| 110 | +* Bearer Authentication (apiToken): |
| 111 | + |
| 112 | +```python |
| 113 | +import hostinger_api |
| 114 | +from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource |
| 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.AgencyHostingSSLApi(api_client) |
| 128 | + website_uid = 'zpwlGlp19' # str | Agency Plan website UID |
| 129 | + domain = 'mydomain.tld' # str | Domain name |
| 130 | + |
| 131 | + try: |
| 132 | + # Install website SSL |
| 133 | + api_response = api_instance.install_website_sslv1(website_uid, domain) |
| 134 | + print("The response of AgencyHostingSSLApi->install_website_sslv1:\n") |
| 135 | + pprint(api_response) |
| 136 | + except Exception as e: |
| 137 | + print("Exception when calling AgencyHostingSSLApi->install_website_sslv1: %s\n" % e) |
| 138 | +``` |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | +### Parameters |
| 143 | + |
| 144 | + |
| 145 | +Name | Type | Description | Notes |
| 146 | +------------- | ------------- | ------------- | ------------- |
| 147 | + **website_uid** | **str**| Agency Plan website UID | |
| 148 | + **domain** | **str**| Domain name | |
| 149 | + |
| 150 | +### Return type |
| 151 | + |
| 152 | +[**CommonSuccessEmptyResource**](CommonSuccessEmptyResource.md) |
| 153 | + |
| 154 | +### Authorization |
| 155 | + |
| 156 | +[apiToken](../README.md#apiToken) |
| 157 | + |
| 158 | +### HTTP request headers |
| 159 | + |
| 160 | + - **Content-Type**: Not defined |
| 161 | + - **Accept**: application/json |
| 162 | + |
| 163 | +### HTTP response details |
| 164 | + |
| 165 | +| Status code | Description | Response headers | |
| 166 | +|-------------|-------------|------------------| |
| 167 | +**200** | Success empty response | - | |
| 168 | +**422** | Validation error response | - | |
| 169 | +**401** | Unauthenticated response | - | |
| 170 | +**500** | Error response | - | |
| 171 | + |
| 172 | +[[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) |
| 173 | + |
| 174 | +# **reinstall_website_sslv1** |
| 175 | +> CommonSuccessEmptyResource reinstall_website_sslv1(website_uid, domain) |
| 176 | +
|
| 177 | +Reinstall website SSL |
| 178 | + |
| 179 | +Replaces the Let's Encrypt certificate of the domain: the current platform certificate, when |
| 180 | +one is recorded, is revoked and removed, then a new setup starts in the background. Returns at |
| 181 | +once; `Get website SSL status` reports `installing` while it runs, then `active` or `failed`. |
| 182 | + |
| 183 | +Returns 422 for free subdomains, when a certificate process is recorded for the domain (a |
| 184 | +failed setup counts until it is cleaned up), or when the domain hit its limit of three setups |
| 185 | +per seven days. Returns 429 when the same domain was requested less than a minute ago, and 403 |
| 186 | +when the website is suspended or locked, and 404 when the website or the domain does not exist. |
| 187 | + |
| 188 | +### Example |
| 189 | + |
| 190 | +* Bearer Authentication (apiToken): |
| 191 | + |
| 192 | +```python |
| 193 | +import hostinger_api |
| 194 | +from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource |
| 195 | +from hostinger_api.rest import ApiException |
| 196 | +from pprint import pprint |
| 197 | + |
| 198 | + |
| 199 | +# Configure Bearer authorization: apiToken |
| 200 | +configuration = hostinger_api.Configuration( |
| 201 | + access_token = os.environ["BEARER_TOKEN"] |
| 202 | +) |
| 203 | + |
| 204 | +# Enter a context with an instance of the API client |
| 205 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 206 | + # Create an instance of the API class |
| 207 | + api_instance = hostinger_api.AgencyHostingSSLApi(api_client) |
| 208 | + website_uid = 'zpwlGlp19' # str | Agency Plan website UID |
| 209 | + domain = 'mydomain.tld' # str | Domain name |
| 210 | + |
| 211 | + try: |
| 212 | + # Reinstall website SSL |
| 213 | + api_response = api_instance.reinstall_website_sslv1(website_uid, domain) |
| 214 | + print("The response of AgencyHostingSSLApi->reinstall_website_sslv1:\n") |
| 215 | + pprint(api_response) |
| 216 | + except Exception as e: |
| 217 | + print("Exception when calling AgencyHostingSSLApi->reinstall_website_sslv1: %s\n" % e) |
| 218 | +``` |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | +### Parameters |
| 223 | + |
| 224 | + |
| 225 | +Name | Type | Description | Notes |
| 226 | +------------- | ------------- | ------------- | ------------- |
| 227 | + **website_uid** | **str**| Agency Plan website UID | |
| 228 | + **domain** | **str**| Domain name | |
| 229 | + |
| 230 | +### Return type |
| 231 | + |
| 232 | +[**CommonSuccessEmptyResource**](CommonSuccessEmptyResource.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 empty 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 | + |
| 254 | +# **uninstall_website_sslv1** |
| 255 | +> CommonSuccessEmptyResource uninstall_website_sslv1(website_uid, domain) |
| 256 | +
|
| 257 | +Uninstall website SSL |
| 258 | + |
| 259 | +Removes the platform-issued Let's Encrypt certificate of the domain: the certificate is revoked |
| 260 | +and deleted before the response, so the domain is no longer served with a platform certificate |
| 261 | +until a new setup completes. Also succeeds when the domain has no platform certificate to |
| 262 | +remove. Uploaded (custom) certificates are not affected. |
| 263 | + |
| 264 | +Returns 422 when a certificate process is recorded for the domain (a failed setup counts until |
| 265 | +it is cleaned up), 429 when the same domain was requested less than a minute ago, and 403 when |
| 266 | +the website is suspended or locked, and 404 when the website or the domain does not exist. |
| 267 | + |
| 268 | +### Example |
| 269 | + |
| 270 | +* Bearer Authentication (apiToken): |
| 271 | + |
| 272 | +```python |
| 273 | +import hostinger_api |
| 274 | +from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource |
| 275 | +from hostinger_api.rest import ApiException |
| 276 | +from pprint import pprint |
| 277 | + |
| 278 | + |
| 279 | +# Configure Bearer authorization: apiToken |
| 280 | +configuration = hostinger_api.Configuration( |
| 281 | + access_token = os.environ["BEARER_TOKEN"] |
| 282 | +) |
| 283 | + |
| 284 | +# Enter a context with an instance of the API client |
| 285 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 286 | + # Create an instance of the API class |
| 287 | + api_instance = hostinger_api.AgencyHostingSSLApi(api_client) |
| 288 | + website_uid = 'zpwlGlp19' # str | Agency Plan website UID |
| 289 | + domain = 'mydomain.tld' # str | Domain name |
| 290 | + |
| 291 | + try: |
| 292 | + # Uninstall website SSL |
| 293 | + api_response = api_instance.uninstall_website_sslv1(website_uid, domain) |
| 294 | + print("The response of AgencyHostingSSLApi->uninstall_website_sslv1:\n") |
| 295 | + pprint(api_response) |
| 296 | + except Exception as e: |
| 297 | + print("Exception when calling AgencyHostingSSLApi->uninstall_website_sslv1: %s\n" % e) |
| 298 | +``` |
| 299 | + |
| 300 | + |
| 301 | + |
| 302 | +### Parameters |
| 303 | + |
| 304 | + |
| 305 | +Name | Type | Description | Notes |
| 306 | +------------- | ------------- | ------------- | ------------- |
| 307 | + **website_uid** | **str**| Agency Plan website UID | |
| 308 | + **domain** | **str**| Domain name | |
| 309 | + |
| 310 | +### Return type |
| 311 | + |
| 312 | +[**CommonSuccessEmptyResource**](CommonSuccessEmptyResource.md) |
| 313 | + |
| 314 | +### Authorization |
| 315 | + |
| 316 | +[apiToken](../README.md#apiToken) |
| 317 | + |
| 318 | +### HTTP request headers |
| 319 | + |
| 320 | + - **Content-Type**: Not defined |
| 321 | + - **Accept**: application/json |
| 322 | + |
| 323 | +### HTTP response details |
| 324 | + |
| 325 | +| Status code | Description | Response headers | |
| 326 | +|-------------|-------------|------------------| |
| 327 | +**200** | Success empty response | - | |
| 328 | +**422** | Validation error response | - | |
| 329 | +**401** | Unauthenticated response | - | |
| 330 | +**500** | Error response | - | |
| 331 | + |
| 332 | +[[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) |
| 333 | + |
0 commit comments