description:The domain name to flush from the cache
type:string
responses:
'200':
description:Flush successful
schema:
$ref:'#/definitions/CacheFlushResult'
'/servers/{server_id}/zones':
get:
security:
- APIKeyHeader:[]
summary:List all Zones in a server
operationId:listZones
tags:
- zones
parameters:
- name:server_id
in:path
required:true
description:The id of the server to retrieve
type:string
- name:zone
in:query
required:false
type:string
description:|
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.
responses:
'200':
description:An array of Zones
schema:
type:array
items:
$ref:'#/definitions/Zone'
post:
security:
- APIKeyHeader:[]
summary:Creates a new domain, returns the Zone on creation.
operationId:createZone
tags:
- zones
parameters:
- name:server_id
in:path
required:true
description:The id of the server to retrieve
type:string
- name:rrsets
in:query
description:'“true” (default) or “false”, whether to include the “rrsets” in the response Zone object.'
type:boolean
default:true
- name:zone_struct
description:The zone struct to patch with
required:true
in:body
schema:
$ref:'#/definitions/Zone'
responses:
'201':
description:A zone
schema:
$ref:'#/definitions/Zone'
'/servers/{server_id}/zones/{zone_id}':
get:
security:
- APIKeyHeader:[]
summary:zone managed by a server
operationId:listZone
tags:
- zones
parameters:
- name:server_id
in:path
required:true
description:The id of the server to retrieve
type:string
- name:zone_id
type:string
in:path
required:true
description:The id of the zone to retrieve
responses:
'200':
description:A Zone
schema:
$ref:'#/definitions/Zone'
delete:
security:
- APIKeyHeader:[]
summary:Deletes this zone, all attached metadata and rrsets.
operationId:deleteZone
tags:
- zones
parameters:
- name:server_id
in:path
required:true
description:The id of the server to retrieve
type:string
- name:zone_id
type:string
in:path
required:true
description:The id of the zone to retrieve
responses:
'204':
description:'Returns 204 No Content on success.'
patch:
security:
- APIKeyHeader:[]
summary:'Creates/modifies/deletes RRsets present in the payload and their comments. Returns 204 No Content on success.'
operationId:patchZone
tags:
- zones
parameters:
- name:server_id
in:path
required:true
description:The id of the server to retrieve
type:string
- name:zone_id
type:string
in:path
required:true
- name:zone_struct
description:The zone struct to patch with
required:true
in:body
schema:
$ref:'#/definitions/Zone'
responses:
'204':
description:'Returns 204 No Content on success.'
put:
security:
- APIKeyHeader:[]
summary:Modifies basic zone data (metadata).
description: 'Allowed fields in client body:all except id, url and name. Returns 204 No Content on success.'
operationId:putZone
tags:
- zones
parameters:
- name:server_id
in:path
required:true
description:The id of the server to retrieve
type:string
- name:zone_id
type:string
in:path
required:true
- name:zone_struct
description:The zone struct to patch with
required:true
in:body
schema:
$ref:'#/definitions/Zone'
responses:
'204':
description:'Returns 204 No Content on success.'
'/servers/{server_id}/zones/{zone_id}/notify':
put:
security:
- APIKeyHeader:[]
summary:Send a DNS NOTIFY to all slaves.
description:'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.'
summary:'Returns a specific ConfigSetting for a single server'
description:'NOT IMPLEMENTED'
operationId:getConfigSetting
tags:
- config
parameters:
- name:server_id
in:path
required:true
description:The id of the server to retrieve
type:string
- name:config_setting_name
in:path
required:true
description:The name of the setting to retrieve
type:string
responses:
'200':
description:List of config values
schema:
$ref:'#/definitions/ConfigSetting'
'/servers/{server_id}/statistics':
get:
security:
- APIKeyHeader:[]
summary:'Query statistics.'
description:'Query PowerDNS internal statistics. Returns a list of BaseStatisticItem derived elements.'
operationId:getStats
tags:
- stats
parameters:
- name:server_id
in:path
required:true
description:The id of the server to retrieve
type:string
responses:
'200':
description:List of Statistic Items
schema:
type:array
items:
# these can be commented because the swagger code generator fails on them
# and replaced with
# type: string
# or something like that
- $ref:'#/definitions/StatisticItem'
- $ref:'#/definitions/MapStatisticItem'
- $ref:'#/definitions/RingStatisticItem'
'/servers/{server_id}/search-data':
get:
security:
- APIKeyHeader:[]
summary:'Search the data inside PowerDNS'
description:'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.'
operationId:searchData
tags:
- search
parameters:
- name:server_id
in:path
required:true
description:The id of the server to retrieve
type:string
- name:q
in:query
required:true
description:'The string to search for'
type:string
- name:max
in:query
required:true
description:'Maximum number of entries to return'
type:integer
responses:
'200':
description:Returns a JSON array with results
schema:
$ref:'#/definitions/SearchResults'
'/servers/{server_id}/zones/{zone_id}/metadata':
get:
security:
- APIKeyHeader:[]
summary:Get all the MetaData associated with the zone.
operationId:listMetadata
tags:
- zonemetadata
parameters:
- name:server_id
in:path
required:true
description:The id of the server to retrieve
type:string
- name:zone_id
type:string
in:path
required:true
description:The id of the zone to retrieve
responses:
'200':
description:List of Metadata objects
schema:
type:array
items:
$ref:'#/definitions/Metadata'
post:
security:
- APIKeyHeader:[]
summary:'Creates a set of metadata entries'
description:'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.'
summary:'Get all CryptoKeys for a zone, except the privatekey'
operationId:listCryptokeys
tags:
- zonecryptokey
parameters:
- name:server_id
in:path
required:true
description:The id of the server to retrieve
type:string
- name:zone_id
type:string
in:path
required:true
description:The id of the zone to retrieve
responses:
'200':
description:List of Cryptokey objects
schema:
type:array
items:
$ref:'#/definitions/Cryptokey'
post:
security:
- APIKeyHeader:[]
summary:'Creates a Cryptokey'
description:'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.'
description:'“recursor” for the PowerDNS Recursor and “authoritative” for the Authoritative Server'
version:
type:string
description:'The version of the server software'
url:
type:string
description:'The API endpoint for this server'
config_url:
type:string
description:'The API endpoint for this server’s configuration'
zones_url:
type:string
description:'The API endpoint for this server’s zones'
Servers:
type:array
items:
$ref:'#/definitions/Server'
Zone:
title:Zone
description:This represents an authoritative DNS Zone.
properties:
id:
type:string
description:'Opaque zone id (string), assigned by the server, should not be interpreted by the application. Guaranteed to be safe for embedding in URLs.'
name:
type:string
description:'Name of the zone (e.g. “example.com.”) MUST have a trailing dot'
type:
type:string
description:'Set to “Zone”'
url:
type:string
description:'API endpoint for this zone'
kind:
type:string
enum:
- 'Native'
- 'Master'
- 'Slave'
description:'Zone kind, one of “Native”, “Master”, “Slave”'
rrsets:
type:array
items:
$ref:'#/definitions/RRSet'
description:'RRSets in this zone'
serial:
type:integer
description:'The SOA serial number'
notified_serial:
type:integer
description:'The SOA serial notifications have been sent out for'
masters:
type:array
items:
type:string
description:' List of IP addresses configured as a master for this zone (“Slave” type zones only)'
dnssec:
type:boolean
description:'Whether or not this zone is DNSSEC signed (inferred from presigned being true XOR presence of at least one cryptokey with active being true)'
nsec3param:
type:string
description:'The NSEC3PARAM record'
nsec3narrow:
type:boolean
description:'Whether or not the zone uses NSEC3 narrow'
presigned:
type:boolean
description:'Whether or not the zone is pre-signed'
soa_edit:
type:string
description:'The SOA-EDIT metadata item'
soa_edit_api:
type:string
description:'The SOA-EDIT-API metadata item'
api_rectify:
type:boolean
description:' Whether or not the zone will be rectified on data changes via the API'
zone:
type:string
description:'MAY contain a BIND-style zone file when creating a zone'
account:
type:string
description:'MAY be set. Its value is defined by local policy'
nameservers:
type:array
items:
type:string
description:'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.'
tsig_master_key_ids:
type:array
items:
type:string
description:'The id of the TSIG keys used for master operation in this zone'
description:This represents a Resource Record Set (all records with the same name and type).
required:
- name
- type
- ttl
- changetype
- records
properties:
name:
type:string
description:'Name for record set (e.g. “www.powerdns.com.”)'
type:
type:string
description:'Type of this record (e.g. “A”, “PTR”, “MX”)'
ttl:
type:integer
description:'DNS TTL of the records, in seconds. MUST NOT be included when changetype is set to “DELETE”.'
changetype:
type:string
description: 'MUST be added when updating the RRSet. Must be REPLACE or DELETE. With DELETE, all existing RRs matching name and type will be deleted, including all comments. With REPLACE:when records is present, all existing RRs matching name and type will be deleted, and then new records given in records will be created. If no records are left, any existing comments will be deleted as well. When comments is present, all existing comments for the RRs matching name and type will be deleted, and then new comments given in comments will be created.'
records:
type:array
description:'All records in this RRSet. When updating Records, this is the list of new records (replacing the old ones). Must be empty when changetype is set to DELETE. An empty list results in deletion of all records (and comments).'
items:
$ref:'#/definitions/Record'
comments:
type:array
description:'List of Comment. Must be empty when changetype is set to DELETE. An empty list results in deletion of all comments. modified_at is optional and defaults to the current server time.'
items:
$ref:'#/definitions/Comment'
Record:
title:Record
description:The RREntry object represents a single record.
required:
- content
- disabled# PatchZone endpoint complains if this is missing
properties:
content:
type:string
description:'The content of this record'
disabled:
type:boolean
description:'Whether or not this record is disabled'
set-ptr:
type:boolean
description:'If set to true, the server will find the matching reverse zone and create a PTR there. Existing PTR records are replaced. If no matching reverse Zone, an error is thrown. Only valid in client bodies, only valid for A and AAAA types. Not returned by the server.'
Comment:
title:Comment
description:A comment about an RRSet.
properties:
content:
type:string
description:'The actual comment'
account:
type:string
description:'Name of an account that added the comment'
modified_at:
type:integer
description:'Timestamp of the last change to the comment'
TSIGKey:
title:TSIGKey
description:A TSIG key that can be used to authenticate NOTIFYs and AXFRs
properties:
name:
type:string
description:'The name of the key'
id:
type:string
description:'The ID for this key, used in the TSIGkey URL endpoint.'
readOnly:true
algorithm:
type:string
description:'The algorithm of the TSIG key'
key:
type:string
description:'The Base64 encoded secret key, empty when listing keys. MAY be empty when POSTing to have the server generate the key material'
type:
type:string
description:'Set to "TSIGKey"'
readOnly:true
PDNSAdminZones:
title:PDNSAdminZones
description:A ApiKey that can be used to manage domains through API
type:array
items:
properties:
id:
type:integer
description:'The ID for this PDNSAdmin zone'
readOnly:true
name:
type:string
description:'Name of the zone'
PDNSAdminApiKeyRole:
title:PDNSAdminApiKeyRole
description:Role of ApiKey, defines privileges on domains
properties:
id:
type:integer
description:'The ID for this PDNSAdmin role'
readOnly:true
name:
type:string
description:'Name of role'
ApiKey:
title:ApiKey
description:A ApiKey that can be used to manage domains through API
properties:
id:
type:integer
description:'The ID for this key, used in the ApiKey URL endpoint.'
readOnly:true
plain_key:
type:string
description:'ApiKey key is return in plain text only at first POST'
key:
type:string
description:'not used on POST, POSTing to server generates the key material'
domains:
type:array
items:
$ref:'#/definitions/PDNSAdminZones'
description:'domains to which this apikey has access'