|
| 1 | +# hostinger_api.AgencyHostingFilesApi |
| 2 | + |
| 3 | +All URIs are relative to *https://developers.hostinger.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**import_agency_plan_website_from_archive_v1**](AgencyHostingFilesApi.md#import_agency_plan_website_from_archive_v1) | **POST** /api/agency-hosting/v1/websites/{website_uid}/files/import-archive | Import Agency Plan website from archive |
| 8 | + |
| 9 | + |
| 10 | +# **import_agency_plan_website_from_archive_v1** |
| 11 | +> CommonSuccessEmptyResource import_agency_plan_website_from_archive_v1(website_uid, agency_hosting_v1_files_import_archive_request) |
| 12 | +
|
| 13 | +Import Agency Plan website from archive |
| 14 | + |
| 15 | +Imports an Agency Plan website from an already-uploaded archive. |
| 16 | + |
| 17 | +Upload the archive to the website's root directory via file browser first, then provide its |
| 18 | +filename in this request. Website contents are overwritten by the archive contents. Supported |
| 19 | +archive types: .zip, .tar, .tar.gz, .tgz. |
| 20 | + |
| 21 | +### Example |
| 22 | + |
| 23 | +* Bearer Authentication (apiToken): |
| 24 | + |
| 25 | +```python |
| 26 | +import hostinger_api |
| 27 | +from hostinger_api.models.agency_hosting_v1_files_import_archive_request import AgencyHostingV1FilesImportArchiveRequest |
| 28 | +from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource |
| 29 | +from hostinger_api.rest import ApiException |
| 30 | +from pprint import pprint |
| 31 | + |
| 32 | + |
| 33 | +# Configure Bearer authorization: apiToken |
| 34 | +configuration = hostinger_api.Configuration( |
| 35 | + access_token = os.environ["BEARER_TOKEN"] |
| 36 | +) |
| 37 | + |
| 38 | +# Enter a context with an instance of the API client |
| 39 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 40 | + # Create an instance of the API class |
| 41 | + api_instance = hostinger_api.AgencyHostingFilesApi(api_client) |
| 42 | + website_uid = 'zpwlGlp19' # str | Agency Plan website UID |
| 43 | + agency_hosting_v1_files_import_archive_request = hostinger_api.AgencyHostingV1FilesImportArchiveRequest() # AgencyHostingV1FilesImportArchiveRequest | |
| 44 | + |
| 45 | + try: |
| 46 | + # Import Agency Plan website from archive |
| 47 | + api_response = api_instance.import_agency_plan_website_from_archive_v1(website_uid, agency_hosting_v1_files_import_archive_request) |
| 48 | + print("The response of AgencyHostingFilesApi->import_agency_plan_website_from_archive_v1:\n") |
| 49 | + pprint(api_response) |
| 50 | + except Exception as e: |
| 51 | + print("Exception when calling AgencyHostingFilesApi->import_agency_plan_website_from_archive_v1: %s\n" % e) |
| 52 | +``` |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | +### Parameters |
| 57 | + |
| 58 | + |
| 59 | +Name | Type | Description | Notes |
| 60 | +------------- | ------------- | ------------- | ------------- |
| 61 | + **website_uid** | **str**| Agency Plan website UID | |
| 62 | + **agency_hosting_v1_files_import_archive_request** | [**AgencyHostingV1FilesImportArchiveRequest**](AgencyHostingV1FilesImportArchiveRequest.md)| | |
| 63 | + |
| 64 | +### Return type |
| 65 | + |
| 66 | +[**CommonSuccessEmptyResource**](CommonSuccessEmptyResource.md) |
| 67 | + |
| 68 | +### Authorization |
| 69 | + |
| 70 | +[apiToken](../README.md#apiToken) |
| 71 | + |
| 72 | +### HTTP request headers |
| 73 | + |
| 74 | + - **Content-Type**: application/json |
| 75 | + - **Accept**: application/json |
| 76 | + |
| 77 | +### HTTP response details |
| 78 | + |
| 79 | +| Status code | Description | Response headers | |
| 80 | +|-------------|-------------|------------------| |
| 81 | +**200** | Success empty response | - | |
| 82 | +**422** | Validation error response | - | |
| 83 | +**401** | Unauthenticated response | - | |
| 84 | +**500** | Error response | - | |
| 85 | + |
| 86 | +[[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) |
| 87 | + |
0 commit comments