Skip to main content

List DNS Zones belonging to a Project

GET/v2/projects/{projectId}/dns-zones
API version
v2
Request method
GET
Operation ID
dns-list-dns-zones

Request​

  • projectIdstringrequired

    ID of the Project to list DNSZones for.

Responses​

Format
application/json
Description

An array of DNSZone objects.

  • Array[
    • *object
      • domainstringrequired
      • idstring (uuid)required
      • recordSetobjectrequired
        • caaone of 2 alternativesrequired
          • Alternativeobject
            • Alternativeobject
              • recordsarray of objectrequired
                • Array[
                  • *object
                    • flagsinteger (≥ 0)required
                    • tagstring (one of: issue, issuewild, iodef)required
                    • valuestring (idn-dnsname)required
                  ]
              • settingsobjectrequired
                • ttlone of 2 alternatives
                  • Alternativeobject
                    • secondsinteger (≥ 60)required
                  • Alternativeobject
                    • autobooleanrequired

                      this will always be true

          • cnameone of 2 alternativesrequired
            • Alternativeobject
              • Alternativeobject
                • fqdnstring (≥ 1 characters, ≤ 255 characters, idn-dnsname)required
                • settingsobjectrequired
                  • ttlone of 2 alternatives
                    • Alternativeobject
                      • secondsinteger (≥ 60)required
                    • Alternativeobject
                      • autobooleanrequired

                        this will always be true

            • combinedARecordsone of 3 alternativesrequired
              • Alternativeobject
                • Alternativeobject
                  • aarray of string (ipv4)required
                    • Array[
                      • *string (ipv4)
                      ]
                  • aaaaarray of string (ipv6)required
                    • Array[
                      • *string (ipv6)
                      ]
                  • settingsobjectrequired
                    • ttlone of 2 alternatives
                      • Alternativeobject
                        • secondsinteger (≥ 60)required
                      • Alternativeobject
                        • autobooleanrequired

                          this will always be true

                • Alternativeobject
                  • managedByone of 1 alternativesrequired
                    • Alternativeobject
                      • ingressIdstring (uuid)required
              • mxone of 3 alternativesrequired
                • Alternativeobject
                  • Alternativeobject
                    • managedbooleanrequired
                  • Alternativeobject
                    • recordsarray of objectrequired
                      • Array[
                        • *object
                          • fqdnstring (≥ 1 characters, ≤ 255 characters, idn-dnsname)required
                          • priorityinteger (≥ 0)required
                        ]
                    • settingsobjectrequired
                      • ttlone of 2 alternatives
                        • Alternativeobject
                          • secondsinteger (≥ 60)required
                        • Alternativeobject
                          • autobooleanrequired

                            this will always be true

                • srvone of 2 alternativesrequired
                  • Alternativeobject
                    • Alternativeobject
                      • recordsarray of objectrequired
                        • Array[
                          • *object
                            • fqdnstring (≥ 1 characters, ≤ 255 characters, idn-dnsname)required
                            • portinteger (≥ 0)required
                            • priorityinteger (≥ 0)
                            • weightinteger (≥ 0)
                          ]
                      • settingsobjectrequired
                        • ttlone of 2 alternatives
                          • Alternativeobject
                            • secondsinteger (≥ 60)required
                          • Alternativeobject
                            • autobooleanrequired

                              this will always be true

                  • txtone of 2 alternativesrequired
                    • Alternativeobject
                      • Alternativeobject
                        • entriesarray of string (≤ 2048 characters)required
                          • Array[
                            • *string (≤ 2048 characters)
                            ]
                        • settingsobjectrequired
                          • ttlone of 2 alternatives
                            • Alternativeobject
                              • secondsinteger (≥ 60)required
                            • Alternativeobject
                              • autobooleanrequired

                                this will always be true

                ]
              Content-Type: application/json

              [
              {
              "domain": "string",
              "id": "f0f86186-0a5a-45b2-aa33-502777496347",
              "recordSet": {
              "caa": {},
              "cname": {},
              "combinedARecords": {},
              "mx": {},
              "srv": {},
              "txt": {}
              }
              }
              ]
              {
              "items": {
              "properties": {
              "domain": {
              "type": "string"
              },
              "id": {
              "format": "uuid",
              "type": "string"
              },
              "recordSet": {
              "properties": {
              "caa": {
              "oneOf": [
              {
              "additionalProperties": false,
              "properties": {},
              "type": "object"
              },
              {
              "additionalProperties": false,
              "properties": {
              "records": {
              "items": {
              "additionalProperties": false,
              "properties": {
              "flags": {
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
              },
              "tag": {
              "enum": [
              "issue",
              "issuewild",
              "iodef"
              ],
              "type": "string"
              },
              "value": {
              "format": "idn-dnsname",
              "type": "string"
              }
              },
              "required": [
              "flags",
              "tag",
              "value"
              ],
              "type": "object"
              },
              "minItems": 1,
              "type": "array"
              },
              "settings": {
              "properties": {
              "ttl": {
              "oneOf": [
              {
              "properties": {
              "seconds": {
              "maximum": 86400,
              "minimum": 60,
              "type": "integer"
              }
              },
              "required": [
              "seconds"
              ],
              "type": "object"
              },
              {
              "properties": {
              "auto": {
              "description": "this will always be true",
              "type": "boolean"
              }
              },
              "required": [
              "auto"
              ],
              "type": "object"
              }
              ]
              }
              },
              "type": "object"
              }
              },
              "required": [
              "records",
              "settings"
              ],
              "type": "object"
              }
              ]
              },
              "cname": {
              "oneOf": [
              {
              "additionalProperties": false,
              "properties": {},
              "type": "object"
              },
              {
              "properties": {
              "fqdn": {
              "format": "idn-dnsname",
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
              },
              "settings": {
              "properties": {
              "ttl": {
              "oneOf": [
              {
              "properties": {
              "seconds": {
              "maximum": 86400,
              "minimum": 60,
              "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": 60,
              "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": 255,
              "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": 60,
              "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": 255,
              "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": 60,
              "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": 60,
              "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",
              "caa"
              ],
              "type": "object"
              }
              },
              "required": [
              "id",
              "domain",
              "recordSet"
              ],
              "type": "object"
              },
              "type": "array"
              }

              Usage examples​

              $ curl \
              --fail \
              --location \
              -H "Authorization: Bearer $MITTWALD_API_TOKEN" \
              https://api.mittwald.de/v2/projects/string/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": "string"
              });

              assertStatus(response, 200);

              use \Mittwald\ApiClient\Generated\V2\Clients\Domain\DnsListDnsZones\DnsListDnsZonesRequest;

              $client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

              $request = (new DnsListDnsZonesRequest(
              projectId: "string"
              ));
              $response = $client->domain()->dnsListDnsZones($request);

              var_dump($response->getBody();

              On this page