DNS History
Last updated on
Retrieve Overall History (Get All DNS Zones History)
Section titled “Retrieve Overall History (Get All DNS Zones History)”Retrieves the change history (audit logs) for all DNS zones within a specific organization. The results are returned paginated.
URL: GET /api/v1/organizations/{organizationId}/dns-zones/history
Path Parameters:
organizationId(string/UUID, required): The unique ID of the organization.
Query Parameters (Optional):
page(integer): The current page number (default: 1).size(integer): Number of entries per page (maximum: 500, default: 50).filter(string): Filters the results based on specific conditions (e.g.,actionType eq Update).sort(string): Sorts the results (e.g.,timestamp:desc).search(string): Performs a full-text search across multiple fields.
Example Request (cURL):
curl -X GET "https://publicapi.stackit.domains/api/v1/organizations/0a35deaa-6e8d-4cdb-9de3-9e8928658ae6/dns-zones/history?page=1&size=20" \-H "Authorization: Bearer <YOUR_TOKEN>"Example Response (200 OK):
{ "items": [ { "historyId": "5f93e5bc-bcc8-47bd-b6cd-4183cded90a6", "timestamp": "2025-01-23T10:53:54.415Z", "actionType": "Restore", "resourceType": "DnsZone", "productId": "dcadda4d-ca05-4756-9ba5-a444e2cd9afd", "organizationId": "0a35deaa-6e8d-4cdb-9de3-9e8928658ae6", "userName": "initialuser@stackit.cloud", "changeDetails": "Restored DNS Zone to snapshot from 2025-01-22", "version": 1 }, { "historyId": "9a23e5bc-bcc8-47bd-b6cd-4183cded90a9", "timestamp": "2025-01-22T08:30:00.000Z", "actionType": "Update", "resourceType": "DnsZone", "productId": "dcadda4d-ca05-4756-9ba5-a444e2cd9afd", "organizationId": "0a35deaa-6e8d-4cdb-9de3-9e8928658ae6", "userName": "admin@stackit.cloud", "changeDetails": "Updated SOA Refresh Interval", "version": 0 } ], "pagination": { "page": 1, "size": 20, "totalCount": 21, "totalPages": 2 }}Retrieve Zone-Specific History (Get DNS Zone History)
Section titled “Retrieve Zone-Specific History (Get DNS Zone History)”Retrieves detailed log entries and snapshots for a specific DNS zone. This is the first step when you want to restore a specific zone to identify the correct historyId.
URL: GET /api/v1/organizations/{organizationId}/dns-zones/{dnsZoneId}/history
Path Parameters:
organizationId(string/UUID, required): The unique ID of the organization.dnsZoneId(string/UUID, required): The unique ID of the DNS zone.
(The query parameters for pagination, filtering, sorting, and search are identical to those of the overall history).
Example Request (cURL):
curl -X GET "https://publicapi.stackit.domains/api/v1/organizations/0a35deaa-6e8d-4cdb-9de3-9e8928658ae6/dns-zones/dcadda4d-ca05-4756-9ba5-a444e2cd9afd/history" \-H "Authorization: Bearer <YOUR_TOKEN>"Example Response (200 OK) The response structure is identical to the overall query (HistoryPaginationResponse), filtered for the respective zone.
Restore DNS Zone
Section titled “Restore DNS Zone”Restores a specific DNS zone to a previous state from history (snapshot).
URL: POST /api/v1/organizations/{organizationId}/dns-zones/{dnsZoneId}/history/{historyId}/restore
Path Parameters:
organizationId(string/UUID, required): The unique ID of the organization.dnsZoneId(string/UUID, required): The unique ID of the DNS zone to be restored.historyId(string/UUID, required): The ID of the history entry (snapshot) to which the zone should be restored.
Example Request (cURL):
curl -X POST "https://publicapi.stackit.domains/api/v1/organizations/0a35deaa-6e8d-4cdb-9de3-9e8928658ae6/dns-zones/dcadda4d-ca05-4756-9ba5-a444e2cd9afd/history/9a23e5bc-bcc8-47bd-b6cd-4183cded90a9/restore" \-H "Authorization: Bearer <YOUR_TOKEN>" \-H "Content-Length: 0"Example Response:
(204 No Content) If the restore was successful, the server responds with HTTP status code 204 No Content and an empty body.