List DNS Zones belonging to a Project
GET/projects/ {projectId}/ dns-zones/
v2
GET
dns-list-dns-zones
Request
- projectIdstring (uuid)required
ID of the Project to list DNSZones for.
Responses
application/json
An array of DNSZone objects.
- Schema-Dokumentation
- Beispiel
- JSON Schema
- Array[
- *object
- domainstringrequired
- idstring (uuid)required
- recordSetobjectrequired
- cnameone of 2 alternativesrequired
- combinedARecordsone of 3 alternativesrequired
- mxone of 3 alternativesrequired
- srvone of 2 alternativesrequired
- txtone of 2 alternativesrequired
]
[
{
"domain": "string",
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"recordSet": {
"cname": {},
"combinedARecords": {},
"mx": {},
"srv": {},
"txt": {}
}
}
]
{
"items": {
"properties": {
"domain": {
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"recordSet": {
"properties": {
"cname": {
"oneOf": [
{
"additionalProperties": false,
"properties": {},
"type": "object"
},
{
"properties": {
"fqdn": {
"format": "idn-dnsname",
"type": "string"
},
"settings": {
"properties": {
"ttl": {
"oneOf": [
{
"properties": {
"seconds": {
"maximum": 86400,
"minimum": 300,
"type": "integer"
}
},
"required": [
"seconds"
],
"type": "object"
},
{
"properties": {
"auto": {
"description": "this will always be true",
"type": "boolean"
}
},
"required": [
"auto"
],
"type": "object"
}
]
}
},
"type": "object"
}
},
"required": [
"settings",
"fqdn"
],
"type": "object"
}
]
},
"combinedARecords": {
"oneOf": [
{
"additionalProperties": false,
"properties": {},
"type": "object"
},
{
"properties": {
"a": {
"items": {
"format": "ipv4",
"type": "string"
},
"maxItems": 10,
"type": "array"
},
"aaaa": {
"items": {
"format": "ipv6",
"type": "string"
},
"maxItems": 10,
"type": "array"
},
"settings": {
"properties": {
"ttl": {
"oneOf": [
{
"properties": {
"seconds": {
"maximum": 86400,
"minimum": 300,
"type": "integer"
}
},
"required": [
"seconds"
],
"type": "object"
},
{
"properties": {
"auto": {
"description": "this will always be true",
"type": "boolean"
}
},
"required": [
"auto"
],
"type": "object"
}
]
}
},
"type": "object"
}
},
"required": [
"settings",
"a",
"aaaa"
],
"type": "object"
},
{
"properties": {
"managedBy": {
"oneOf": [
{
"properties": {
"ingressId": {
"format": "uuid",
"type": "string"
}
},
"required": [
"ingressId"
],
"type": "object"
}
]
}
},
"required": [
"managedBy"
],
"type": "object"
}
]
},
"mx": {
"oneOf": [
{
"additionalProperties": false,
"properties": {},
"type": "object"
},
{
"properties": {
"managed": {
"type": "boolean"
}
},
"required": [
"managed"
],
"type": "object"
},
{
"properties": {
"records": {
"items": {
"properties": {
"fqdn": {
"format": "idn-dnsname",
"maxLength": 50,
"minLength": 1,
"type": "string"
},
"priority": {
"maximum": 100,
"minimum": 0,
"type": "integer"
}
},
"required": [
"priority",
"fqdn"
],
"type": "object"
},
"maxItems": 10,
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"settings": {
"properties": {
"ttl": {
"oneOf": [
{
"properties": {
"seconds": {
"maximum": 86400,
"minimum": 300,
"type": "integer"
}
},
"required": [
"seconds"
],
"type": "object"
},
{
"properties": {
"auto": {
"description": "this will always be true",
"type": "boolean"
}
},
"required": [
"auto"
],
"type": "object"
}
]
}
},
"type": "object"
}
},
"required": [
"settings",
"records"
],
"type": "object"
}
]
},
"srv": {
"oneOf": [
{
"additionalProperties": false,
"properties": {},
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"records": {
"items": {
"additionalProperties": false,
"properties": {
"fqdn": {
"format": "idn-dnsname",
"maxLength": 50,
"minLength": 1,
"type": "string"
},
"port": {
"maximum": 65535,
"minimum": 0,
"type": "integer"
},
"priority": {
"maximum": 65535,
"minimum": 0,
"type": "integer"
},
"weight": {
"maximum": 65535,
"minimum": 0,
"type": "integer"
}
},
"required": [
"port",
"fqdn"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"settings": {
"properties": {
"ttl": {
"oneOf": [
{
"properties": {
"seconds": {
"maximum": 86400,
"minimum": 300,
"type": "integer"
}
},
"required": [
"seconds"
],
"type": "object"
},
{
"properties": {
"auto": {
"description": "this will always be true",
"type": "boolean"
}
},
"required": [
"auto"
],
"type": "object"
}
]
}
},
"type": "object"
}
},
"required": [
"settings",
"records"
],
"type": "object"
}
]
},
"txt": {
"oneOf": [
{
"additionalProperties": false,
"properties": {},
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"entries": {
"items": {
"maxLength": 2048,
"type": "string"
},
"maxItems": 20,
"type": "array"
},
"settings": {
"properties": {
"ttl": {
"oneOf": [
{
"properties": {
"seconds": {
"maximum": 86400,
"minimum": 300,
"type": "integer"
}
},
"required": [
"seconds"
],
"type": "object"
},
{
"properties": {
"auto": {
"description": "this will always be true",
"type": "boolean"
}
},
"required": [
"auto"
],
"type": "object"
}
]
}
},
"type": "object"
}
},
"required": [
"settings",
"entries"
],
"type": "object"
}
]
}
},
"required": [
"combinedARecords",
"cname",
"mx",
"txt",
"srv"
],
"type": "object"
}
},
"required": [
"id",
"domain",
"recordSet"
],
"type": "object"
},
"type": "array"
}
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/projects/f0f86186-0a5a-45b2-aa33-502777496347/dns-zones
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.domain.dnsListDnsZones({
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347"
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Domain\DnsListDnsZones\DnsListDnsZonesRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new DnsListDnsZonesRequest(
projectId: "f0f86186-0a5a-45b2-aa33-502777496347"
));
$response = $client->domain()->dnsListDnsZones($request);
var_dump($response->getBody();