- API Reference
- Domain
- List DNS Zones belonging to a Project
List DNS Zones belonging to a Project
Request
- projectIdstringrequired
ID of the Project to list DNSZones for.
Responses
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"
}
Validation Error caused by invalid input data in the request
- type"ValidationError"required
- messagestring
- validationErrorsarray of objectrequired
- Array[
- *object
- messagestringrequired
The standard error message
- pathstringrequired
The path to the part of the data that was validated. JavaScript property access notation (e.g., ".prop[1].subProp") is used.
- typestringrequired
ajv validation error type (e.g. "format", "required", "type") or own validation error types
- contextobject
The object with the additional information about the error that can be used to create custom error messages. Keys depend on the type that failed validation (e.g. "missingProperty" for type "required")
- *string
]
Content-Type: application/json
{
"type": "ValidationError",
"message": "Validation failed",
"validationErrors": [
{
"message": "should be string",
"path": ".address.street",
"type": "format",
"context": {
"format": "email"
}
}
]
}
{
"type": "object",
"required": [
"type",
"validationErrors"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ValidationError"
]
},
"message": {
"type": "string",
"example": "Validation failed"
},
"validationErrors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"path",
"type"
],
"properties": {
"message": {
"type": "string",
"description": "The standard error message",
"example": "should be string"
},
"path": {
"type": "string",
"description": "The path to the part of the data that was validated. JavaScript property access notation (e.g., \".prop[1].subProp\") is used.\n",
"example": ".address.street"
},
"type": {
"type": "string",
"description": "ajv validation error type (e.g. \"format\", \"required\", \"type\") or own validation error types",
"example": "format"
},
"context": {
"type": "object",
"example": {
"format": "email"
},
"description": "The object with the additional information about the error that can be used to create custom error messages. Keys depend on the\ntype that failed validation (e.g. \"missingProperty\" for type \"required\")\n",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
}
Your request ran into a rate limit. You have to wait until rate limit expires
- messagestring
- typestring
Content-Type: application/json
{
"message": "too many requests",
"type": "RateLimitError"
}
{
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "too many requests"
},
"type": {
"type": "string",
"example": "RateLimitError"
}
}
}
An unexpected Error that occurred while handling the request
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
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();