|
| 1 | +# Hostinger\DNSSnapshotApi |
| 2 | + |
| 3 | +All URIs are relative to https://developers.hostinger.com, except if the operation defines another base path. |
| 4 | + |
| 5 | +| Method | HTTP request | Description | |
| 6 | +| ------------- | ------------- | ------------- | |
| 7 | +| [**getSnapshotListV1()**](DNSSnapshotApi.md#getSnapshotListV1) | **GET** /api/dns/v1/snapshots/{domain} | Get snapshot list | |
| 8 | +| [**getSnapshotV1()**](DNSSnapshotApi.md#getSnapshotV1) | **GET** /api/dns/v1/snapshots/{domain}/{snapshotId} | Get snapshot | |
| 9 | +| [**restoreSnapshotV1()**](DNSSnapshotApi.md#restoreSnapshotV1) | **POST** /api/dns/v1/snapshots/{domain}/{snapshotId} | Restore snapshot | |
| 10 | + |
| 11 | + |
| 12 | +## `getSnapshotListV1()` |
| 13 | + |
| 14 | +```php |
| 15 | +getSnapshotListV1($domain): \Hostinger\Model\DNSV1SnapshotSnapshotResource[] |
| 16 | +``` |
| 17 | + |
| 18 | +Get snapshot list |
| 19 | + |
| 20 | +This endpoint retrieves list of DNS snapshots. |
| 21 | + |
| 22 | +### Example |
| 23 | + |
| 24 | +```php |
| 25 | +<?php |
| 26 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 27 | + |
| 28 | + |
| 29 | +// Configure Bearer authorization: apiToken |
| 30 | +$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); |
| 31 | + |
| 32 | + |
| 33 | +$apiInstance = new Hostinger\Api\DNSSnapshotApi(config: $config); |
| 34 | +$domain = mydomain.tld; // string | Domain name |
| 35 | + |
| 36 | +try { |
| 37 | + $result = $apiInstance->getSnapshotListV1($domain); |
| 38 | + print_r($result); |
| 39 | +} catch (Exception $e) { |
| 40 | + echo 'Exception when calling DNSSnapshotApi->getSnapshotListV1: ', $e->getMessage(), PHP_EOL; |
| 41 | +} |
| 42 | +``` |
| 43 | + |
| 44 | +### Parameters |
| 45 | + |
| 46 | +| Name | Type | Description | Notes | |
| 47 | +| ------------- | ------------- | ------------- | ------------- | |
| 48 | +| **domain** | **string**| Domain name | | |
| 49 | + |
| 50 | +### Return type |
| 51 | + |
| 52 | +[**\Hostinger\Model\DNSV1SnapshotSnapshotResource[]**](../Model/DNSV1SnapshotSnapshotResource.md) |
| 53 | + |
| 54 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 55 | +[[Back to Model list]](../../README.md#models) |
| 56 | +[[Back to README]](../../README.md) |
| 57 | + |
| 58 | +## `getSnapshotV1()` |
| 59 | + |
| 60 | +```php |
| 61 | +getSnapshotV1($domain, $snapshotId): \Hostinger\Model\DNSV1SnapshotSnapshotWithContentResource |
| 62 | +``` |
| 63 | + |
| 64 | +Get snapshot |
| 65 | + |
| 66 | +This endpoint retrieves particular DNS snapshot with the contents of DNS zone records. |
| 67 | + |
| 68 | +### Example |
| 69 | + |
| 70 | +```php |
| 71 | +<?php |
| 72 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 73 | + |
| 74 | + |
| 75 | +// Configure Bearer authorization: apiToken |
| 76 | +$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); |
| 77 | + |
| 78 | + |
| 79 | +$apiInstance = new Hostinger\Api\DNSSnapshotApi(config: $config); |
| 80 | +$domain = mydomain.tld; // string | Domain name |
| 81 | +$snapshotId = 53513053; // int | Snapshot ID |
| 82 | + |
| 83 | +try { |
| 84 | + $result = $apiInstance->getSnapshotV1($domain, $snapshotId); |
| 85 | + print_r($result); |
| 86 | +} catch (Exception $e) { |
| 87 | + echo 'Exception when calling DNSSnapshotApi->getSnapshotV1: ', $e->getMessage(), PHP_EOL; |
| 88 | +} |
| 89 | +``` |
| 90 | + |
| 91 | +### Parameters |
| 92 | + |
| 93 | +| Name | Type | Description | Notes | |
| 94 | +| ------------- | ------------- | ------------- | ------------- | |
| 95 | +| **domain** | **string**| Domain name | | |
| 96 | +| **snapshotId** | **int**| Snapshot ID | | |
| 97 | + |
| 98 | +### Return type |
| 99 | + |
| 100 | +[**\Hostinger\Model\DNSV1SnapshotSnapshotWithContentResource**](../Model/DNSV1SnapshotSnapshotWithContentResource.md) |
| 101 | + |
| 102 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 103 | +[[Back to Model list]](../../README.md#models) |
| 104 | +[[Back to README]](../../README.md) |
| 105 | + |
| 106 | +## `restoreSnapshotV1()` |
| 107 | + |
| 108 | +```php |
| 109 | +restoreSnapshotV1($domain, $snapshotId): \Hostinger\Model\CommonSuccessEmptyResource |
| 110 | +``` |
| 111 | + |
| 112 | +Restore snapshot |
| 113 | + |
| 114 | +This endpoint restores DNS zone to the selected snapshot. |
| 115 | + |
| 116 | +### Example |
| 117 | + |
| 118 | +```php |
| 119 | +<?php |
| 120 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 121 | + |
| 122 | + |
| 123 | +// Configure Bearer authorization: apiToken |
| 124 | +$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); |
| 125 | + |
| 126 | + |
| 127 | +$apiInstance = new Hostinger\Api\DNSSnapshotApi(config: $config); |
| 128 | +$domain = mydomain.tld; // string | Domain name |
| 129 | +$snapshotId = 53513053; // int | Snapshot ID |
| 130 | + |
| 131 | +try { |
| 132 | + $result = $apiInstance->restoreSnapshotV1($domain, $snapshotId); |
| 133 | + print_r($result); |
| 134 | +} catch (Exception $e) { |
| 135 | + echo 'Exception when calling DNSSnapshotApi->restoreSnapshotV1: ', $e->getMessage(), PHP_EOL; |
| 136 | +} |
| 137 | +``` |
| 138 | + |
| 139 | +### Parameters |
| 140 | + |
| 141 | +| Name | Type | Description | Notes | |
| 142 | +| ------------- | ------------- | ------------- | ------------- | |
| 143 | +| **domain** | **string**| Domain name | | |
| 144 | +| **snapshotId** | **int**| Snapshot ID | | |
| 145 | + |
| 146 | +### Return type |
| 147 | + |
| 148 | +[**\Hostinger\Model\CommonSuccessEmptyResource**](../Model/CommonSuccessEmptyResource.md) |
| 149 | + |
| 150 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 151 | +[[Back to Model list]](../../README.md#models) |
| 152 | +[[Back to README]](../../README.md) |
0 commit comments