PowerDNS Authoritative HTTP API (0.0.15)

Download OpenAPI specification:Download

License: MIT

Will always generate an error

Authorizations:
APIKeyHeader

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "errors": [
    ]
}

servers

List all servers

Authorizations:
APIKeyHeader

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List a server

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

Responses

Response samples

Content type
application/json
{
  • "config_url": "string",
  • "daemon_type": "string",
  • "id": "string",
  • "type": "string",
  • "url": "string",
  • "version": "string",
  • "zones_url": "string"
}

Flush a cache-entry by name

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

query Parameters
domain
required
string

The domain name to flush from the cache

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "result": "string"
}

config

Returns all ConfigSettings for a single server

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a specific ConfigSetting for a single server

NOT IMPLEMENTED

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

config_setting_name
required
string

The name of the setting to retrieve

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "type": "string",
  • "value": "string"
}

search

Search the data inside PowerDNS

Search the data inside PowerDNS for search_term and return at most max_results. This includes zones, records and comments. The * character can be used in search_term as a wildcard character and the ? character can be used as a wildcard for a single character.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

query Parameters
q
required
string

The string to search for

max
required
integer

Maximum number of entries to return

object_type
string

Type of data to search for, one of “all”, “zone”, “record”, “comment”

Responses

Response samples

Content type
application/json
[
  • {
    }
]

stats

Query statistics.

Query PowerDNS internal statistics.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

query Parameters
statistic
string

When set to the name of a specific statistic, only this value is returned. If no statistic with that name exists, the response has a 422 status and an error message.

includerings
boolean
Default: true

“true” (default) or “false”, whether to include the Ring items, which can contain thousands of log messages or queried domains. Setting this to ”false” may make the response a lot smaller.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

tsigkey

Get all TSIGKeys on the server, except the actual key

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a TSIG key

This methods add a new TSIGKey. The actual key can be generated by the server or be provided by the client

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server

Request Body schema: application/json

The TSIGKey to add

algorithm
string

The algorithm of the TSIG key

key
string

The Base64 encoded secret key, empty when listing keys. MAY be empty when POSTing to have the server generate the key material

name
string

The name of the key

Responses

Request samples

Content type
application/json
{
  • "algorithm": "string",
  • "key": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "algorithm": "string",
  • "id": "string",
  • "key": "string",
  • "name": "string",
  • "type": "string"
}

Delete the TSIGKey with tsigkey_id

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve the key from

tsigkey_id
required
string

The id of the TSIGkey. Should match the "id" field in the TSIGKey object

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "errors": [
    ]
}

Get a specific TSIGKeys on the server, including the actual key

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve the key from

tsigkey_id
required
string

The id of the TSIGkey. Should match the "id" field in the TSIGKey object

Responses

Response samples

Content type
application/json
{
  • "algorithm": "string",
  • "id": "string",
  • "key": "string",
  • "name": "string",
  • "type": "string"
}

putTSIGKey

The TSIGKey at tsigkey_id can be changed in multiple ways:

  • Changing the Name, this will remove the key with tsigkey_id after adding.
  • Changing the Algorithm
  • Changing the Key

Only the relevant fields have to be provided in the request body.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve the key from

tsigkey_id
required
string

The id of the TSIGkey. Should match the "id" field in the TSIGKey object

Request Body schema: application/json

A (possibly stripped down) TSIGKey object with the new values

algorithm
string

The algorithm of the TSIG key

key
string

The Base64 encoded secret key, empty when listing keys. MAY be empty when POSTing to have the server generate the key material

name
string

The name of the key

Responses

Request samples

Content type
application/json
{
  • "algorithm": "string",
  • "key": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "algorithm": "string",
  • "id": "string",
  • "key": "string",
  • "name": "string",
  • "type": "string"
}

zones

List all Zones in a server

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

query Parameters
zone
string

When set to the name of a zone, only this zone is returned. If no zone with that name exists, the response is an empty array. This can e.g. be used to check if a zone exists in the database without having to guess/encode the zone's id or to check if a zone exists.

dnssec
boolean
Default: true

“true” (default) or “false”, whether to include the “dnssec” and ”edited_serial” fields in the Zone objects. Setting this to ”false” will make the query a lot faster.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Creates a new domain, returns the Zone on creation.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

query Parameters
rrsets
boolean
Default: true

“true” (default) or “false”, whether to include the “rrsets” in the response Zone object.

Request Body schema: application/json

The zone struct to patch with

account
string

MAY be set. Its value is defined by local policy

api_rectify
boolean

Whether or not the zone will be rectified on data changes via the API

dnssec
boolean

Whether or not this zone is DNSSEC signed (inferred from presigned being true XOR presence of at least one cryptokey with active being true)

edited_serial
integer

The SOA serial as seen in query responses. Calculated using the SOA-EDIT metadata, default-soa-edit and default-soa-edit-signed settings

id
string

Opaque zone id (string), assigned by the server, should not be interpreted by the application. Guaranteed to be safe for embedding in URLs.

kind
string
Enum: "Native" "Master" "Slave"

Zone kind, one of “Native”, “Master”, “Slave”

master_tsig_key_ids
Array of strings

The id of the TSIG keys used for master operation in this zone

masters
Array of strings

List of IP addresses configured as a master for this zone (“Slave” type zones only)

name
string

Name of the zone (e.g. “example.com.”) MUST have a trailing dot

nameservers
Array of strings

MAY be sent in client bodies during creation, and MUST NOT be sent by the server. Simple list of strings of nameserver names, including the trailing dot. Not required for slave zones.

notified_serial
integer

The SOA serial notifications have been sent out for

nsec3narrow
boolean

Whether or not the zone uses NSEC3 narrow

nsec3param
string

The NSEC3PARAM record

presigned
boolean

Whether or not the zone is pre-signed

Array of objects (RRSet)

RRSets in this zone (for zones/{zone_id} endpoint only; omitted during GET on the .../zones list endpoint)

serial
integer

The SOA serial number

slave_tsig_key_ids
Array of strings

The id of the TSIG keys used for slave operation in this zone

soa_edit
string

The SOA-EDIT metadata item

soa_edit_api
string

The SOA-EDIT-API metadata item

type
string

Set to “Zone”

url
string

API endpoint for this zone

zone
string

MAY contain a BIND-style zone file when creating a zone

Responses

Request samples

Content type
application/json
{
  • "account": "string",
  • "api_rectify": true,
  • "dnssec": true,
  • "edited_serial": 0,
  • "id": "string",
  • "kind": "Native",
  • "master_tsig_key_ids": [
    ],
  • "masters": [
    ],
  • "name": "string",
  • "nameservers": [
    ],
  • "notified_serial": 0,
  • "nsec3narrow": true,
  • "nsec3param": "string",
  • "presigned": true,
  • "rrsets": [
    ],
  • "serial": 0,
  • "slave_tsig_key_ids": [
    ],
  • "soa_edit": "string",
  • "soa_edit_api": "string",
  • "type": "string",
  • "url": "string",
  • "zone": "string"
}

Response samples

Content type
application/json
{
  • "account": "string",
  • "api_rectify": true,
  • "dnssec": true,
  • "edited_serial": 0,
  • "id": "string",
  • "kind": "Native",
  • "master_tsig_key_ids": [
    ],
  • "masters": [
    ],
  • "name": "string",
  • "nameservers": [
    ],
  • "notified_serial": 0,
  • "nsec3narrow": true,
  • "nsec3param": "string",
  • "presigned": true,
  • "rrsets": [
    ],
  • "serial": 0,
  • "slave_tsig_key_ids": [
    ],
  • "soa_edit": "string",
  • "soa_edit_api": "string",
  • "type": "string",
  • "url": "string",
  • "zone": "string"
}

Deletes this zone, all attached metadata and rrsets.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "errors": [
    ]
}

zone managed by a server

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

query Parameters
rrsets
boolean
Default: true

“true” (default) or “false”, whether to include the “rrsets” in the response Zone object.

Responses

Response samples

Content type
application/json
{
  • "account": "string",
  • "api_rectify": true,
  • "dnssec": true,
  • "edited_serial": 0,
  • "id": "string",
  • "kind": "Native",
  • "master_tsig_key_ids": [
    ],
  • "masters": [
    ],
  • "name": "string",
  • "nameservers": [
    ],
  • "notified_serial": 0,
  • "nsec3narrow": true,
  • "nsec3param": "string",
  • "presigned": true,
  • "rrsets": [
    ],
  • "serial": 0,
  • "slave_tsig_key_ids": [
    ],
  • "soa_edit": "string",
  • "soa_edit_api": "string",
  • "type": "string",
  • "url": "string",
  • "zone": "string"
}

Creates/modifies/deletes RRsets present in the payload and their comments. Returns 204 No Content on success.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string
Request Body schema: application/json

The zone struct to patch with

account
string

MAY be set. Its value is defined by local policy

api_rectify
boolean

Whether or not the zone will be rectified on data changes via the API

dnssec
boolean

Whether or not this zone is DNSSEC signed (inferred from presigned being true XOR presence of at least one cryptokey with active being true)

edited_serial
integer

The SOA serial as seen in query responses. Calculated using the SOA-EDIT metadata, default-soa-edit and default-soa-edit-signed settings

id
string

Opaque zone id (string), assigned by the server, should not be interpreted by the application. Guaranteed to be safe for embedding in URLs.

kind
string
Enum: "Native" "Master" "Slave"

Zone kind, one of “Native”, “Master”, “Slave”

master_tsig_key_ids
Array of strings

The id of the TSIG keys used for master operation in this zone

masters
Array of strings

List of IP addresses configured as a master for this zone (“Slave” type zones only)

name
string

Name of the zone (e.g. “example.com.”) MUST have a trailing dot

nameservers
Array of strings

MAY be sent in client bodies during creation, and MUST NOT be sent by the server. Simple list of strings of nameserver names, including the trailing dot. Not required for slave zones.

notified_serial
integer

The SOA serial notifications have been sent out for

nsec3narrow
boolean

Whether or not the zone uses NSEC3 narrow

nsec3param
string

The NSEC3PARAM record

presigned
boolean

Whether or not the zone is pre-signed

Array of objects (RRSet)

RRSets in this zone (for zones/{zone_id} endpoint only; omitted during GET on the .../zones list endpoint)

serial
integer

The SOA serial number

slave_tsig_key_ids
Array of strings

The id of the TSIG keys used for slave operation in this zone

soa_edit
string

The SOA-EDIT metadata item

soa_edit_api
string

The SOA-EDIT-API metadata item

type
string

Set to “Zone”

url
string

API endpoint for this zone

zone
string

MAY contain a BIND-style zone file when creating a zone

Responses

Request samples

Content type
application/json
{
  • "account": "string",
  • "api_rectify": true,
  • "dnssec": true,
  • "edited_serial": 0,
  • "id": "string",
  • "kind": "Native",
  • "master_tsig_key_ids": [
    ],
  • "masters": [
    ],
  • "name": "string",
  • "nameservers": [
    ],
  • "notified_serial": 0,
  • "nsec3narrow": true,
  • "nsec3param": "string",
  • "presigned": true,
  • "rrsets": [
    ],
  • "serial": 0,
  • "slave_tsig_key_ids": [
    ],
  • "soa_edit": "string",
  • "soa_edit_api": "string",
  • "type": "string",
  • "url": "string",
  • "zone": "string"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "errors": [
    ]
}

Modifies basic zone data.

The only fields in the zone structure which can be modified are: kind, masters, account, soa_edit, soa_edit_api, api_rectify, dnssec, and nsec3param. All other fields are ignored.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string
Request Body schema: application/json

The zone struct to patch with

account
string

MAY be set. Its value is defined by local policy

api_rectify
boolean

Whether or not the zone will be rectified on data changes via the API

dnssec
boolean

Whether or not this zone is DNSSEC signed (inferred from presigned being true XOR presence of at least one cryptokey with active being true)

edited_serial
integer

The SOA serial as seen in query responses. Calculated using the SOA-EDIT metadata, default-soa-edit and default-soa-edit-signed settings

id
string

Opaque zone id (string), assigned by the server, should not be interpreted by the application. Guaranteed to be safe for embedding in URLs.

kind
string
Enum: "Native" "Master" "Slave"

Zone kind, one of “Native”, “Master”, “Slave”

master_tsig_key_ids
Array of strings

The id of the TSIG keys used for master operation in this zone

masters
Array of strings

List of IP addresses configured as a master for this zone (“Slave” type zones only)

name
string

Name of the zone (e.g. “example.com.”) MUST have a trailing dot

nameservers
Array of strings

MAY be sent in client bodies during creation, and MUST NOT be sent by the server. Simple list of strings of nameserver names, including the trailing dot. Not required for slave zones.

notified_serial
integer

The SOA serial notifications have been sent out for

nsec3narrow
boolean

Whether or not the zone uses NSEC3 narrow

nsec3param
string

The NSEC3PARAM record

presigned
boolean

Whether or not the zone is pre-signed

Array of objects (RRSet)

RRSets in this zone (for zones/{zone_id} endpoint only; omitted during GET on the .../zones list endpoint)

serial
integer

The SOA serial number

slave_tsig_key_ids
Array of strings

The id of the TSIG keys used for slave operation in this zone

soa_edit
string

The SOA-EDIT metadata item

soa_edit_api
string

The SOA-EDIT-API metadata item

type
string

Set to “Zone”

url
string

API endpoint for this zone

zone
string

MAY contain a BIND-style zone file when creating a zone

Responses

Request samples

Content type
application/json
{
  • "account": "string",
  • "api_rectify": true,
  • "dnssec": true,
  • "edited_serial": 0,
  • "id": "string",
  • "kind": "Native",
  • "master_tsig_key_ids": [
    ],
  • "masters": [
    ],
  • "name": "string",
  • "nameservers": [
    ],
  • "notified_serial": 0,
  • "nsec3narrow": true,
  • "nsec3param": "string",
  • "presigned": true,
  • "rrsets": [
    ],
  • "serial": 0,
  • "slave_tsig_key_ids": [
    ],
  • "soa_edit": "string",
  • "soa_edit_api": "string",
  • "type": "string",
  • "url": "string",
  • "zone": "string"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "errors": [
    ]
}

Retrieve slave zone from its master.

Fails when zone kind is not Slave, or slave is disabled in the configuration. Clients MUST NOT send a body.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "errors": [
    ]
}

Returns the zone in AXFR format.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

Responses

Response samples

Content type
application/json
"string"

Send a DNS NOTIFY to all slaves.

Fails when zone kind is not Master or Slave, or master and slave are disabled in the configuration. Only works for Slave if renotify is on. Clients MUST NOT send a body.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "errors": [
    ]
}

Rectify the zone data.

This does not take into account the API-RECTIFY metadata. Fails on slave zones and zones that do not have DNSSEC.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

Responses

Response samples

Content type
application/json
"string"

zonecryptokey

Get all CryptoKeys for a zone, except the privatekey

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Creates a Cryptokey

This method adds a new key to a zone. The key can either be generated or imported by supplying the content parameter. if content, bits and algo are null, a key will be generated based on the default-ksk-algorithm and default-ksk-size settings for a KSK and the default-zsk-algorithm and default-zsk-size options for a ZSK.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string
Request Body schema: application/json

Add a Cryptokey

active
boolean

Whether or not the key is in active use

algorithm
string

The name of the algorithm of the key, should be a mnemonic

bits
integer

The size of the key

cds
Array of strings

An array of DS records for this key, filtered by CDS publication settings

dnskey
string

The DNSKEY record for this key

ds
Array of strings

An array of DS records for this key

id
integer

The internal identifier, read only

keytype
string
Enum: "ksk" "zsk" "csk"
privatekey
string

The private key in ISC format

published
boolean

Whether or not the DNSKEY record is published in the zone

type
string

set to "Cryptokey"

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "algorithm": "string",
  • "bits": 0,
  • "cds": [
    ],
  • "dnskey": "string",
  • "ds": [
    ],
  • "id": 0,
  • "keytype": "ksk",
  • "privatekey": "string",
  • "published": true,
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "active": true,
  • "algorithm": "string",
  • "bits": 0,
  • "cds": [
    ],
  • "dnskey": "string",
  • "ds": [
    ],
  • "id": 0,
  • "keytype": "ksk",
  • "privatekey": "string",
  • "published": true,
  • "type": "string"
}

This method deletes a key specified by cryptokey_id.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

cryptokey_id
required
string

The id value of the Cryptokey

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "errors": [
    ]
}

Returns all data about the CryptoKey, including the privatekey.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

cryptokey_id
required
string

The id value of the CryptoKey

Responses

Response samples

Content type
application/json
{
  • "active": true,
  • "algorithm": "string",
  • "bits": 0,
  • "cds": [
    ],
  • "dnskey": "string",
  • "ds": [
    ],
  • "id": 0,
  • "keytype": "ksk",
  • "privatekey": "string",
  • "published": true,
  • "type": "string"
}

This method (de)activates a key from zone_name specified by cryptokey_id

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string
cryptokey_id
required
string

Cryptokey to manipulate

Request Body schema: application/json

the Cryptokey

active
boolean

Whether or not the key is in active use

algorithm
string

The name of the algorithm of the key, should be a mnemonic

bits
integer

The size of the key

cds
Array of strings

An array of DS records for this key, filtered by CDS publication settings

dnskey
string

The DNSKEY record for this key

ds
Array of strings

An array of DS records for this key

id
integer

The internal identifier, read only

keytype
string
Enum: "ksk" "zsk" "csk"
privatekey
string

The private key in ISC format

published
boolean

Whether or not the DNSKEY record is published in the zone

type
string

set to "Cryptokey"

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "algorithm": "string",
  • "bits": 0,
  • "cds": [
    ],
  • "dnskey": "string",
  • "ds": [
    ],
  • "id": 0,
  • "keytype": "ksk",
  • "privatekey": "string",
  • "published": true,
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "errors": [
    ]
}

zonemetadata

Get all the Metadata associated with the zone.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Creates a set of metadata entries

Creates a set of metadata entries of given kind for the zone. Existing metadata entries for the zone with the same kind are not overwritten.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string
Request Body schema: application/json

Metadata object with list of values to create

kind
string

Name of the metadata

metadata
Array of strings

Array with all values for this metadata kind.

Responses

Request samples

Content type
application/json
{
  • "kind": "string",
  • "metadata": [
    ]
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "errors": [
    ]
}

Delete all items of a single kind of domain metadata.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

metadata_kind
required
string

The kind of metadata

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "errors": [
    ]
}

Get the content of a single kind of domain metadata as a Metadata object.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string

The id of the zone to retrieve

metadata_kind
required
string

The kind of metadata

Responses

Response samples

Content type
application/json
{
  • "kind": "string",
  • "metadata": [
    ]
}

Replace the content of a single kind of domain metadata.

Creates a set of metadata entries of given kind for the zone. Existing metadata entries for the zone with the same kind are removed.

Authorizations:
APIKeyHeader
path Parameters
server_id
required
string

The id of the server to retrieve

zone_id
required
string
metadata_kind
required
string

The kind of metadata

Request Body schema: application/json

metadata to add/create

kind
string

Name of the metadata

metadata
Array of strings

Array with all values for this metadata kind.

Responses

Request samples

Content type
application/json
{
  • "kind": "string",
  • "metadata": [
    ]
}

Response samples

Content type
application/json
{
  • "kind": "string",
  • "metadata": [
    ]
}