openapi: 3.1.0
-servers:
- - url: http://localhost/api/vi
-
info:
version: "0.0.17"
title: PowerDNS Authoritative HTTP API
- description: PowerDNS Authoritative HTTP API
license:
name: MIT
- contact:
- name: "PowerDNS"
- url: "https://www.powerdns.com/"
+
+servers:
+ - url: /api/v1
security:
- APIKeyHeader: []
-tags:
- - name: zones
- description: Zone related endpoints
- - name: zonecryptokey
- description: Zone DNSSEC Key related endpoints
- - name: zonemetadata
- description: Zone Metadata related endpoints
- - name: tsigkey
- description: TSIG related endpoints
- - name: views
- description: View related endpoints
- - name: networks
- description: Network related endpoints
- - name: servers
- description: Server related endpoints
- - name: autoprimary
- description: Auto-Primary related endpoints
- - name: search
- description: Search related endpoints
- - name: stats
- description: Statistics related endpoints
- - name: config
- description: Configuration related endpoints
- - name: errors
- description: Endpoints for errors
-
# Overall TODOS:
# TODO: Return types are not consistent across documentation
# We need to look at the code and figure out the default HTTP response
# codes and adjust docs accordingly.
-components:
- schemas:
- Server:
- $id: Server
- type: object
- title: Server
- properties:
- type:
- type: string
- description: "Set to 'Server'"
- const: Server
- id:
- type: string
- description: "The id of the server, “localhost”"
- daemon_type:
- type: string
- description: "“recursor” for the PowerDNS Recursor and “authoritative” for the Authoritative Server"
- enum:
- - authoritative
- - recursor
- 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"
+paths:
+ "/error":
+ get:
+ summary: Will always generate an error
+ operationId: error
+ responses:
+ default:
+ $ref: "#/components/responses/Error"
- Servers:
- $id: Servers
- type: array
- items:
- $ref: "#/components/schemas/Server"
+ "/servers":
+ get:
+ summary: List all servers
+ operationId: listServers
+ tags:
+ - servers
+ responses:
+ "200":
+ description: An array of servers
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: "#/components/schemas/Server"
+ default:
+ $ref: "#/components/responses/Error"
- Zone:
- $id: Zone
- title: Zone
- description: This represents an authoritative DNS Zone.
- type: object
- 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'"
- const: Zone
- url:
- type: string
- description: "API endpoint for this zone"
- kind:
- type: string
- enum:
- - "Native"
- - "Master"
- - "Slave"
- - "Producer"
- - "Consumer"
- description: "Zone kind, one of “Native”, “Master”, “Slave”, “Producer”, “Consumer”"
- rrsets:
- type: array
- items:
- $ref: "#/components/schemas/RRSet"
- description: "RRSets in this zone (for zones/{zone_id} endpoint only; omitted during GET on the .../zones list endpoint)"
- serial:
- type: integer
- description: "The SOA serial number"
- notified_serial:
- type: integer
- description: "The SOA serial notifications have been sent out for"
- edited_serial:
- type: integer
- description: "The SOA serial as seen in query responses. Calculated using the SOA-EDIT metadata, default-soa-edit and default-soa-edit-signed settings"
- masters:
- type: array
- items:
+ "/servers/{server_id}":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ get:
+ summary: List a server
+ operationId: listServer
+ tags:
+ - servers
+ responses:
+ "200":
+ description: An server
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Server"
+ default:
+ $ref: "#/components/responses/Error"
+
+ "/servers/{server_id}/cache/flush":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ put:
+ summary: Flush a cache-entry by name
+ operationId: cacheFlushByName
+ tags:
+ - servers
+ parameters:
+ - name: domain
+ in: query
+ required: true
+ description: The domain name to flush from the cache
+ schema:
type: string
- description: "List of IP addresses configured as a primary 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"
- catalog:
- type: string
- description: "The catalog this zone is a member of"
- account:
- type: string
- description: "MAY be set. Its value is defined by local policy"
- nameservers:
- type: array
- items:
+ responses:
+ "200":
+ description: Flush successful
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CacheFlushResult"
+ default:
+ $ref: "#/components/responses/Error"
+
+ "/servers/{server_id}/zones":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ get:
+ summary: List all Zones in a server
+ operationId: listZones
+ tags:
+ - zones
+ parameters:
+ - name: zone
+ in: query
+ required: false
+ schema:
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 secondary zones."
- master_tsig_key_ids:
- type: array
- items:
+ 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.
+ - name: dnssec
+ in: query
+ required: false
+ schema:
+ type: boolean
+ default: true
+ description: "“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:
+ "200":
+ description: An array of Zones
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: "#/components/schemas/Zone"
+ default:
+ $ref: "#/components/responses/Error"
+ post:
+ summary: Creates a new domain, returns the Zone on creation.
+ operationId: createZone
+ tags:
+ - zones
+ parameters:
+ - name: rrsets
+ in: query
+ description: "“true” (default) or “false”, whether to include the “rrsets” in the response Zone object."
+ schema:
+ type: boolean
+ default: true
+ requestBody:
+ required: true
+ description: The zone struct to patch with
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Zone"
+ responses:
+ "201":
+ description: A zone
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Zone"
+ default:
+ $ref: "#/components/responses/Error"
+
+ "/servers/{server_id}/zones/{zone_id}":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - $ref: "#/components/parameters/zone_id"
+ get:
+ summary: zone managed by a server
+ operationId: listZone
+ tags:
+ - zones
+ parameters:
+ - name: rrsets
+ in: query
+ description: "“true” (default) or “false”, whether to include the “rrsets” in the response Zone object."
+ schema:
+ type: boolean
+ default: true
+ - name: rrset_name
+ in: query
+ description: Limit output to RRsets for this name.
+ schema:
type: string
- description: "The id of the TSIG keys used for primary operation in this zone"
- externalDocs:
- url: "https://doc.powerdns.com/authoritative/tsig.html#provisioning-outbound-axfr-access"
- slave_tsig_key_ids:
- type: array
- items:
+ - name: rrset_type
+ in: query
+ description: Limit output to the RRset of this type. Can only be used together with rrset_name.
+ schema:
type: string
- description: "The id of the TSIG keys used for secondary operation in this zone"
- externalDocs:
- url: "https://doc.powerdns.com/authoritative/tsig.html#provisioning-signed-notification-and-axfr-requests"
- last_check:
- description: UNIX timestamp when the Serial was checked for the last time
- type: integer
- readonly: true
-
- Zones:
- $id: Zones
- type: array
- items:
- $ref: "#/components/schemas/Zone"
-
- RRSet:
- $id: RRSet
- title: RRSet
- type: object
- 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 one of DELETE, EXTEND, PRUNE or REPLACE. EXTEND and PRUNE are available since versions 4.9.12 and 5.0.2. With DELETE, all existing RRs matching name and type will be deleted, including all comments. With EXTEND, only a single record shall be present, and it will be added to the RRSet if not already present. With PRUNE, only a single record shall be present, and it will be deleted from the RRSet if present. 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, and must contain only one element when changetype is set to EXTEND or PRUNE. An empty list results in deletion of all records (and comments)."
- items:
- $ref: "#/components/schemas/Record"
- comments:
- type: array
- description: "List of Comment. Must be empty when changetype is set to DELETE, EXTEND or PRUNE. An empty list results in deletion of all comments. modified_at is optional and defaults to the current server time."
- items:
- $ref: "#/components/schemas/Comment"
-
- Record:
- $id: Record
- title: Record
- type: object
- description: The RREntry object represents a single record.
- required:
- - content
- properties:
+ - name: include_disabled
+ in: query
+ description: "“true” (default) or “false”, whether to include disabled RRsets in the response."
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: A Zone
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Zone"
+ default:
+ $ref: "#/components/responses/Error"
+ delete:
+ summary: Deletes this zone, all attached metadata and rrsets.
+ operationId: deleteZone
+ tags:
+ - zones
+ responses:
+ "204":
+ description: "Returns 204 No Content on success."
+ default:
+ $ref: "#/components/responses/Error"
+ patch:
+ summary: "Creates/modifies/deletes RRsets present in the payload and their comments. Returns 204 No Content on success."
+ operationId: patchZone
+ tags:
+ - zones
+ requestBody:
+ required: true
+ description: The zone struct to patch with
content:
- type: string
- description: "The content of this record"
- disabled:
- type: boolean
- description: "Whether or not this record is disabled. When unset, the record is not disabled"
- modified_at:
- type: integer
- description: "Timestamp of the last change to the record"
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Zone"
+ responses:
+ "204":
+ description: "Returns 204 No Content on success."
+ default:
+ $ref: "#/components/responses/Error"
- Comment:
- $id: Comment
- title: Comment
- type: object
- description: A comment about an RRSet.
- properties:
+ put:
+ summary: Modifies basic zone data.
+ description: "The only fields in the zone structure which can be modified are: kind, masters, catalog, account, soa_edit, soa_edit_api, api_rectify, dnssec, and nsec3param. All other fields are ignored."
+ operationId: putZone
+ tags:
+ - zones
+ requestBody:
+ required: true
+ description: The zone struct to patch with
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"
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Zone"
+ responses:
+ "204":
+ description: "Returns 204 No Content on success."
+ default:
+ $ref: "#/components/responses/Error"
- TSIGKey:
- $id: TSIGKey
- title: TSIGKey
- type: object
- description: A TSIG key that can be used to authenticate NOTIFY, AXFR, and DNSUPDATE queries.
- 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
- const: TSIGKey
+ "/servers/{server_id}/zones/{zone_id}/notify":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - $ref: "#/components/parameters/zone_id"
+ put:
+ 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."
+ operationId: notifyZone
+ tags:
+ - zones
+ responses:
+ "200":
+ description: OK
+ default:
+ $ref: "#/components/responses/Error"
- Autoprimary:
- $id: Autoprimary
- title: Autoprimary server
- type: object
- description: An autoprimary server that can provision new domains.
- properties:
- ip:
- type: string
- description: "IP address of the autoprimary server"
- nameserver:
- type: string
- description: "DNS name of the autoprimary server"
- account:
- type: string
- description: "Account name for the autoprimary server"
+ "/servers/{server_id}/zones/{zone_id}/axfr-retrieve":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - $ref: "#/components/parameters/zone_id"
+ put:
+ summary: Retrieve slave zone from its master.
+ description: "Fails when zone kind is not Slave, or slave is disabled in the configuration. Clients MUST NOT send a body."
+ operationId: axfrRetrieveZone
+ tags:
+ - zones
+ responses:
+ "200":
+ description: OK
+ default:
+ $ref: "#/components/responses/Error"
- ConfigSetting:
- $id: ConfigSetting
- title: ConfigSetting
- type: object
- properties:
- name:
- type: string
- description: 'set to "ConfigSetting"'
- const: ConfigSetting
- type:
- type: string
- description: "The name of this setting (e.g. ‘webserver-port’)"
- value:
- type: string
- description: "The value of setting name"
+ "/servers/{server_id}/zones/{zone_id}/export":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - $ref: "#/components/parameters/zone_id"
+ get:
+ summary: "Returns the zone in AXFR format."
+ operationId: axfrExportZone
+ tags:
+ - zones
+ responses:
+ "200":
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: string
+ default:
+ $ref: "#/components/responses/Error"
- SimpleStatisticItem:
- $id: SimpleStatisticItem
- title: SimpleStatisticItem
- type: object
- properties:
- name:
- type: string
- description: "Item name"
- value:
- type: string
- description: "Item value"
+ "/servers/{server_id}/zones/{zone_id}/rectify":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - $ref: "#/components/parameters/zone_id"
+ put:
+ summary: "Rectify the zone data."
+ description: "This does not take into account the API-RECTIFY metadata. Fails on slave zones and zones that do not have DNSSEC."
+ operationId: rectifyZone
+ tags:
+ - zones
+ responses:
+ "200":
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: string
+ default:
+ $ref: "#/components/responses/Error"
- StatisticItem:
- $id: StatisticItem
- title: StatisticItem
- type: object
- properties:
- name:
- type: string
- description: "Item name"
- type:
- type: string
- description: "set to 'StatisticItem'"
- const: StatisticItem
- value:
- type: string
- description: "Item value"
+ "/servers/{server_id}/config":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ get:
+ summary: "Returns all ConfigSettings for a single server"
+ operationId: getConfig
+ tags:
+ - config
+ responses:
+ "200":
+ description: List of config values
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: "#/components/schemas/ConfigSetting"
+ default:
+ $ref: "#/components/responses/Error"
- MapStatisticItem:
- $id: MapStatisticItem
- title: MapStatisticItem
- type: object
- properties:
- name:
- type: string
- description: "Item name"
- type:
+ "/servers/{server_id}/config/{config_setting_name}":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - name: config_setting_name
+ in: path
+ required: true
+ description: The name of the setting to retrieve
+ schema:
type: string
- description: 'Set to "MapStatisticItem"'
- const: MapStatisticItem
- value:
- type: array
- description: "Named values"
- items:
- $ref: "#/components/schemas/SimpleStatisticItem"
+ get:
+ summary: "Returns a specific ConfigSetting for a single server"
+ description: "NOT IMPLEMENTED"
+ operationId: getConfigSetting
+ tags:
+ - config
+ responses:
+ "200":
+ description: List of config values
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ConfigSetting"
+ default:
+ $ref: "#/components/responses/Error"
- RingStatisticItem:
- $id: RingStatisticItem
- title: RingStatisticItem
- type: object
- properties:
- name:
- type: string
- description: "Item name"
- type:
- type: string
- description: 'Set to "RingStatisticItem"'
- const: RingStatisticItem
- size:
- type: integer
- description: "Ring size"
- value:
- type: array
- description: "Named values"
- items:
- $ref: "#/components/schemas/SimpleStatisticItem"
+ "/servers/{server_id}/statistics":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ get:
+ summary: "Query statistics."
+ description: "Query PowerDNS internal statistics."
+ operationId: getStats
+ tags:
+ - stats
+ parameters:
+ - name: statistic
+ in: query
+ required: false
+ schema:
+ type: string
+ description: |
+ 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.
+ - name: includerings
+ in: query
+ required: false
+ schema:
+ type: boolean
+ default: true
+ description: "“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:
+ "200":
+ description: List of Statistic Items
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: object
+ discriminator:
+ propertyName: object_type
+ mapping:
+ StatisticItem: "#/components/schemas/StatisticItem"
+ MapStatisticItem: "#/components/schemas/MapStatisticItem"
+ RingStatisticItem: "#/components/schemas/RingStatisticItem"
+ oneOf:
+ - $ref: "#/components/schemas/StatisticItem"
+ - $ref: "#/components/schemas/MapStatisticItem"
+ - $ref: "#/components/schemas/RingStatisticItem"
+ "422":
+ description: "Returned when a non-existing statistic name has been requested. Contains an error message"
+ default:
+ $ref: "#/components/responses/Error"
- SearchResultZone:
- $id: SearchResultZone
- title: SearchResultZone
- type: object
- properties:
- name:
- type: string
- object_type:
- type: string
- description: 'set to "zone"'
- const: zone
- zone_id:
- type: string
+ "/servers/{server_id}/search-data":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ get:
+ 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: q
+ in: query
+ required: true
+ description: "The string to search for"
+ schema:
+ type: string
+ - name: max
+ in: query
+ required: true
+ description: "Maximum number of entries to return"
+ schema:
+ type: integer
+ - name: object_type
+ in: query
+ required: false
+ description: "Type of data to search for, one of “all”, “zone”, “record”, “comment”"
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Returns a JSON array with results
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/SearchResults"
+ default:
+ $ref: "#/components/responses/Error"
- SearchResultRecord:
- $id: SearchResultRecord
- title: SearchResultRecord
- type: object
- properties:
- content:
- type: string
- disabled:
- type: boolean
- name:
- type: string
- object_type:
- type: string
- description: 'set to "record"'
- const: record
- zone_id:
- type: string
- zone:
- type: string
- type:
- type: string
- ttl:
- type: integer
+ "/servers/{server_id}/zones/{zone_id}/metadata":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - $ref: "#/components/parameters/zone_id"
+ get:
+ summary: "Get all the Metadata associated with the zone."
+ operationId: listMetadata
+ tags:
+ - zonemetadata
+ responses:
+ "200":
+ description: List of Metadata objects
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: "#/components/schemas/Metadata"
+ default:
+ $ref: "#/components/responses/Error"
+ post:
+ 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."
+ operationId: createMetadata
+ tags:
+ - zonemetadata
- SearchResultComment:
- $id: SearchResultComment
- title: SearchResultComment
- type: object
- properties:
+ requestBody:
+ required: true
+ description: Metadata object with list of values to create
content:
- type: string
- name:
- type: string
- object_type:
- type: string
- description: 'set to "comment"'
- const: comment
- zone_id:
- type: string
- zone:
- type: string
-
- SearchResult:
- $id: SearchResult
- anyOf:
- - $ref: "#/components/schemas/SearchResultZone"
- - $ref: "#/components/schemas/SearchResultRecord"
- - $ref: "#/components/schemas/SearchResultComment"
-
- SearchResults:
- $id: SearchResults
- type: array
- items:
- $ref: "#/components/schemas/SearchResult"
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Metadata"
+ responses:
+ "204":
+ description: OK
+ default:
+ $ref: "#/components/responses/Error"
- Metadata:
- $id: Metadata
- title: Metadata
- type: object
- description: Represents zone metadata
- properties:
- kind:
+ "/servers/{server_id}/zones/{zone_id}/metadata/{metadata_kind}":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - $ref: "#/components/parameters/zone_id"
+ - name: metadata_kind
+ schema:
type: string
- description: "Name of the metadata"
- metadata:
- type: array
- items:
- type: string
- description: "Array with all values for this metadata kind."
+ in: path
+ required: true
+ description: The kind of metadata
+ get:
+ summary: "Get the content of a single kind of domain metadata as a Metadata object."
+ operationId: getMetadata
+ tags:
+ - zonemetadata
+ responses:
+ "200":
+ description: Metadata object with list of values
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Metadata"
+ default:
+ $ref: "#/components/responses/Error"
+ put:
+ summary: "Replace the content of a single kind of domain metadata."
+ description: "Creates a set of metadata entries of given kind for the zone. Existing metadata entries for the zone with the same kind are removed."
+ operationId: modifyMetadata
+ tags:
+ - zonemetadata
+ responses:
+ "200":
+ description: Metadata object with list of values
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Metadata"
+ default:
+ $ref: "#/components/responses/Error"
+ delete:
+ summary: "Delete all items of a single kind of domain metadata."
+ operationId: deleteMetadata
+ tags:
+ - zonemetadata
+ responses:
+ "204":
+ description: OK
+ default:
+ $ref: "#/components/responses/Error"
- Cryptokey:
- $id: Cryptokey
- title: Cryptokey
- type: object
- description: "Describes a DNSSEC cryptographic key"
- properties:
- type:
- type: string
- description: 'set to "Cryptokey"'
- const: Cryptokey
- id:
- type: integer
- description: "The internal identifier, read only"
- keytype:
- type: string
- enum: [ksk, zsk, csk]
- active:
- type: boolean
- description: "Whether or not the key is in active use"
- published:
- type: boolean
- description: "Whether or not the DNSKEY record is published in the zone"
- dnskey:
- type: string
- description: "The DNSKEY record for this key"
- ds:
- type: array
- items:
- type: string
- description: "An array of DS records for this key"
- cds:
- type: array
- items:
- type: string
- description: "An array of DS records for this key, filtered by CDS publication settings"
- privatekey:
- type: string
- description: "The private key in ISC format"
- algorithm:
- type: string
- description: "The name of the algorithm of the key, should be a mnemonic"
- bits:
- type: integer
- description: "The size of the key"
-
- Error:
- $id: Error
- title: Error
- type: object
- description: "Returned when the server encounters an error, either in client input or internally"
- properties:
- error:
- type: string
- description: "A human readable error message"
- errors:
- type: array
- items:
- type: string
- description: "Optional array of multiple errors encountered during processing"
- required:
- - error
-
- CacheFlushResult:
- $id: CacheFlushResult
- title: CacheFlushResult
- type: object
- description: "The result of a cache-flush"
- properties:
- count:
- type: number
- description: "Amount of entries flushed"
- result:
- type: string
- description: 'A message about the result like "Flushed cache"'
-
- View:
- $id: View
- title: View
- type: object
- properties:
- zones:
- type: array
- items:
- type: string
- description: "An array of zone names"
-
- Views:
- $id: Views
- title: Views
- type: object
- properties:
- views:
- type: array
- items:
- type: string
- description: "An array of view names"
-
- Network:
- $id: Network
- title: Network
- type: object
- properties:
- network:
- type: string
- description: "Network specification in human-readable form base address/prefix length"
- view:
- type: string
- description: "The name of the view"
+ "/servers/{server_id}/zones/{zone_id}/cryptokeys":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - $ref: "#/components/parameters/zone_id"
+ get:
+ summary: "Get all CryptoKeys for a zone, except the privatekey"
+ operationId: listCryptokeys
+ tags:
+ - zonecryptokey
+ responses:
+ "200":
+ description: List of Cryptokey objects
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: "#/components/schemas/Cryptokey"
+ default:
+ $ref: "#/components/responses/Error"
+ post:
+ 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."
+ operationId: createCryptokey
+ tags:
+ - zonecryptokey
- Networks:
- $id: Networks
- title: Networks
- type: object
- properties:
- networks:
- type: array
- items:
- $ref: "#/components/schemas/Network"
+ requestBody:
+ required: true
+ description: Add a Cryptokey
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Cryptokey"
+ responses:
+ "201":
+ description: Created
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Cryptokey"
+ default:
+ $ref: "#/components/responses/Error"
- Result:
- $id: Result
- title: An operational result
- type: object
- properties:
- result:
+ "/servers/{server_id}/zones/{zone_id}/cryptokeys/{cryptokey_id}":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - $ref: "#/components/parameters/zone_id"
+ - name: cryptokey_id
+ schema:
type: string
-
- securitySchemes:
- APIKeyHeader:
- type: apiKey
- in: header
- name: X-API-Key
-
- parameters:
- server_id:
- name: server_id
- in: path
- required: true
- description: The id of the server to retrieve
- schema:
- type: string
- zone_id:
- name: zone_id
- schema:
- type: string
- in: path
- required: true
- description: The id of the zone to retrieve
- config_setting_name:
- name: config_setting_name
- schema:
- type: string
in: path
required: true
- description: The name of the config setting
- view:
- name: view
- schema:
- type: string
- in: path
- required: true
- description: The name of the view to update
- metadata_kind:
- name: metadata_kind
- schema:
- type: string
- in: path
- required: true
- description: The kind of metadata
- cryptokey_id:
- name: cryptokey_id
- in: path
- required: true
- description: "The id value of the CryptoKey"
- schema:
- type: string
- tsigkey_id:
- name: tsigkey_id
- in: path
- required: true
- description: 'The id of the TSIGkey. Should match the "id" field in the TSIGKey object'
- schema:
- type: string
-
- responses: &commonErrors
- "400":
- description: The supplied request was not valid
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "404":
- description: Requested item was not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "422":
- description: The input to the operation was not valid
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "500":
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
-
-paths:
- "/servers":
+ description: "The id value of the CryptoKey"
get:
- description: List all servers
- operationId: listServers
+ summary: "Returns all data about the CryptoKey, including the privatekey."
+ operationId: getCryptokey
tags:
- - servers
+ - zonecryptokey
responses:
"200":
- description: An array of servers
+ description: Cryptokey
content:
application/json:
schema:
- $ref: "#/components/schemas/Servers"
- "400":
- $ref: "#/components/responses/400"
- "404":
- $ref: "#/components/responses/404"
- "422":
- $ref: "#/components/responses/422"
- "500":
- $ref: "#/components/responses/500"
+ $ref: "#/components/schemas/Cryptokey"
+ default:
+ $ref: "#/components/responses/Error"
+ put:
+ summary: "This method (de)activates a key from zone_name specified by cryptokey_id"
+ operationId: modifyCryptokey
+ tags:
+ - zonecryptokey
+ responses:
+ "204":
+ description: OK
+ default:
+ $ref: "#/components/responses/Error"
+ delete:
+ summary: "This method deletes a key specified by cryptokey_id."
+ operationId: deleteCryptokey
+ tags:
+ - zonecryptokey
+ responses:
+ "204":
+ description: OK
+ default:
+ $ref: "#/components/responses/Error"
- "/servers/{server_id}":
+ "/servers/{server_id}/tsigkeys":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
get:
- description: List a server
- operationId: listServer
+ summary: "Get all TSIGKeys on the server, except the actual key"
+ operationId: listTSIGKeys
tags:
- - servers
- parameters:
- - $ref: "#/components/parameters/server_id"
+ - tsigkey
responses:
"200":
- description: An server
+ description: List of TSIGKey objects
content:
application/json:
schema:
- $ref: "#/components/schemas/Server"
- <<: *commonErrors
-
- "/servers/{server_id}/cache/flush":
- put:
- description: Flush a cache-entry by name
- operationId: cacheFlushByName
+ type: array
+ items:
+ $ref: "#/components/schemas/TSIGKey"
+ default:
+ $ref: "#/components/responses/Error"
+ post:
+ summary: "Add a TSIG key"
+ description: "This methods add a new TSIGKey. The actual key can be generated by the server or be provided by the client"
+ operationId: createTSIGKey
tags:
- - servers
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: domain
- in: query
- required: true
- description: The domain name to flush from the cache
- schema:
- type: string
+ - tsigkey
+ requestBody:
+ required: true
+ description: The TSIGKey to add
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/TSIGKey"
responses:
- "200":
- description: Flush successful
+ "201":
+ description: Created
content:
application/json:
schema:
- $ref: "#/components/schemas/CacheFlushResult"
- <<: *commonErrors
+ $ref: "#/components/schemas/TSIGKey"
+ "409":
+ description: An item with this name already exists
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ default:
+ $ref: "#/components/responses/Error"
- "/servers/{server_id}/zones":
+ "/servers/{server_id}/tsigkeys/{tsigkey_id}":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - name: tsigkey_id
+ in: path
+ required: true
+ description: 'The id of the TSIGkey. Should match the "id" field in the TSIGKey object'
+ schema:
+ type: string
get:
- description: List all Zones in a server
- operationId: listZones
+ summary: "Get a specific TSIGKeys on the server, including the actual key"
+ operationId: getTSIGKey
tags:
- - zones
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: zone
- in: query
- required: false
- schema:
- 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.
- - name: dnssec
- in: query
- required: false
- schema:
- type: boolean
- default: true
- description: "“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."
+ - tsigkey
responses:
"200":
- description: An array of Zones
+ description: OK.
content:
application/json:
schema:
- $ref: "#/components/schemas/Zones"
- <<: *commonErrors
- post:
- description: Creates a new domain, returns the Zone on creation.
- operationId: createZone
+ $ref: "#/components/schemas/TSIGKey"
+ default:
+ $ref: "#/components/responses/Error"
+ put:
+ description: |
+ 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.
+ operationId: putTSIGKey
tags:
- - zones
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: rrsets
- in: query
- description: "“true” (default) or “false”, whether to include the “rrsets” in the response Zone object."
- schema:
- type: boolean
- default: true
+ - tsigkey
requestBody:
required: true
+ description: A (possibly stripped down) TSIGKey object with the new values
content:
application/json:
schema:
- type: object
- schema:
- $ref: "#/components/schemas/Zone"
+ $ref: "#/components/schemas/TSIGKey"
responses:
- "201":
- description: A zone
+ "200":
+ description: OK. TSIGKey is changed.
content:
application/json:
schema:
- $ref: "#/components/schemas/Zone"
- <<: *commonErrors
-
- "/servers/{server_id}/zones/{zone_id}":
- get:
- description: zone managed by a server
- operationId: listZone
- tags:
- - zones
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
- - name: rrsets
- in: query
- description: "“true” (default) or “false”, whether to include the “rrsets” in the response Zone object."
- schema:
- type: boolean
- default: true
- - name: rrset_name
- in: query
- description: Limit output to RRsets for this name.
- schema:
- type: string
- - name: rrset_type
- in: query
- description: Limit output to the RRset of this type. Can only be used together with rrset_name.
- schema:
- type: string
- - name: include_disabled
- in: query
- description: "“true” (default) or “false”, whether to include disabled RRsets in the response."
- schema:
- type: boolean
- default: true
- responses:
- "200":
- description: A Zone
+ $ref: "#/components/schemas/TSIGKey"
+ "409":
+ description: An item with this name already exists
content:
application/json:
schema:
- $ref: "#/components/schemas/Zone"
- <<: *commonErrors
+ $ref: "#/components/schemas/Error"
+ default:
+ $ref: "#/components/responses/Error"
delete:
- description: Deletes this zone, all attached metadata and rrsets.
- operationId: deleteZone
+ summary: "Delete the TSIGKey with tsigkey_id"
+ operationId: deleteTSIGKey
tags:
- - zones
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
+ - tsigkey
responses:
"204":
- description: "Returns 204 No Content on success."
- <<: *commonErrors
- patch:
- description: "Creates/modifies/deletes RRsets present in the payload and their comments. Returns 204 No Content on success."
- operationId: patchZone
+ description: "OK, key was deleted"
+ default:
+ $ref: "#/components/responses/Error"
+
+ "/servers/{server_id}/autoprimaries":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ get:
+ summary: "Get a list of autoprimaries"
+ operationId: getAutoprimaries
tags:
- - zones
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- schema:
- $ref: "#/components/schemas/Zone"
+ - autoprimary
responses:
- "204":
- description: "Returns 204 No Content on success."
- <<: *commonErrors
-
- put:
- summary: Modifies basic zone data.
- description: "The only fields in the zone structure which can be modified are: kind, masters, catalog, account, soa_edit, soa_edit_api, api_rectify, dnssec, and nsec3param. All other fields are ignored."
- operationId: putZone
+ "200":
+ description: OK.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Autoprimary"
+ default:
+ $ref: "#/components/responses/Error"
+ post:
+ summary: "Add an autoprimary"
+ description: "This methods add a new autoprimary server."
+ operationId: createAutoprimary
tags:
- - zones
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
+ - autoprimary
requestBody:
required: true
+ description: autoprimary entry to add
content:
application/json:
schema:
- type: object
- schema:
- $ref: "#/components/schemas/Zone"
- responses:
- "204":
- description: "Returns 204 No Content on success."
- <<: *commonErrors
-
- "/servers/{server_id}/zones/{zone_id}/notify":
- put:
- summary: Send a DNS NOTIFY to all secondaries.
- description: "Fails when zone kind is not Master or Slave, or primary and secondary are disabled in the configuration. Only works for Slave if renotify is on. Clients MUST NOT send a body."
- operationId: notifyZone
- tags:
- - zones
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
+ $ref: "#/components/schemas/Autoprimary"
responses:
- "200":
- description: OK
- <<: *commonErrors
+ "201":
+ description: Created
+ default:
+ $ref: "#/components/responses/Error"
- "/servers/{server_id}/zones/{zone_id}/axfr-retrieve":
- put:
- summary: Retrieve secondary zone from its primary.
- description: "Fails when zone kind is not Slave, or secondary is disabled in the configuration. Clients MUST NOT send a body."
- operationId: axfrRetrieveZone
+ "/servers/{server_id}/autoprimaries/{ip}/{nameserver}":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - name: ip
+ in: path
+ required: true
+ description: "IP address of autoprimary"
+ schema:
+ type: string
+ - name: nameserver
+ in: path
+ required: true
+ description: "DNS name of the autoprimary"
+ schema:
+ type: string
+ delete:
+ summary: "Delete the autoprimary entry"
+ operationId: deleteAutoprimary
tags:
- - zones
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
+ - autoprimary
responses:
- "200":
- description: OK
- <<: *commonErrors
+ "204":
+ description: "OK, key was deleted"
+ default:
+ $ref: "#/components/responses/Error"
- "/servers/{server_id}/zones/{zone_id}/export":
+ "/servers/{server_id}/views":
get:
- description: "Returns the zone in AXFR format."
- operationId: axfrExportZone
+ summary: List all views in a server
+ operationId: listViews
tags:
- - zones
+ - views
parameters:
- $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
responses:
"200":
- description: OK
+ description: An array of view names
content:
application/json:
schema:
- $ref: "#/components/schemas/Result"
- text/plain:
- schema:
- type: string
- <<: *commonErrors
+ $ref: "#/components/schemas/Views"
+ default:
+ $ref: "#/components/responses/Error"
- "/servers/{server_id}/zones/{zone_id}/rectify":
- put:
- summary: "Rectify the zone data."
- description: "This does not take into account the API-RECTIFY metadata. Fails on secondary zones."
- operationId: rectifyZone
- tags:
- - zones
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
- responses:
- "200":
- description: OK
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Result"
- <<: *commonErrors
+ "/servers/{server_id}/views/{view}":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - $ref: "#/components/parameters/view"
- "/servers/{server_id}/config":
get:
- description: "Returns all ConfigSettings for a single server"
- operationId: getConfig
+ summary: List the contents of a given view
+ operationId: listView
tags:
- - config
- parameters:
- - $ref: "#/components/parameters/server_id"
+ - views
responses:
"200":
- description: List of config values
+ description: An array of zone names
content:
application/json:
schema:
- type: array
- items:
- $ref: "#/components/schemas/ConfigSetting"
- <<: *commonErrors
-
- "/servers/{server_id}/config/{config_setting_name}":
- get:
- summary: "Returns a specific ConfigSetting for a single server"
- description: "NOT IMPLEMENTED"
- operationId: getConfigSetting
- tags:
- - config
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: config_setting_name
- in: path
- required: true
- description: The name of the setting to retrieve
- schema:
- type: string
- responses:
- "200":
- description: List of config values
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ConfigSetting"
- <<: *commonErrors
-
- "/servers/{server_id}/statistics":
- get:
- summary: "Query statistics."
- description: "Query PowerDNS internal statistics."
- operationId: getStats
- tags:
- - stats
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: statistic
- in: query
- required: false
- schema:
- type: string
- description: |
- 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.
- - name: includerings
- in: query
- required: false
- schema:
- type: boolean
- default: true
- description: "“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:
- "200":
- description: List of Statistic Items
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- discriminator:
- propertyName: object_type
- mapping:
- StatisticItem: "#/components/schemas/StatisticItem"
- MapStatisticItem: "#/components/schemas/MapStatisticItem"
- RingStatisticItem: "#/components/schemas/RingStatisticItem"
- oneOf:
- - $ref: "#/components/schemas/StatisticItem"
- - $ref: "#/components/schemas/MapStatisticItem"
- - $ref: "#/components/schemas/RingStatisticItem"
- "422":
- description: "Returned when a non-existing statistic name has been requested. Contains an error message"
- <<: *commonErrors
-
- "/servers/{server_id}/search-data":
- get:
- 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:
- - $ref: "#/components/parameters/server_id"
- - name: q
- in: query
- required: true
- description: "The string to search for"
- schema:
- type: string
- - name: max
- in: query
- required: true
- description: "Maximum number of entries to return"
- schema:
- type: integer
- - name: object_type
- in: query
- required: false
- description: "Type of data to search for, one of “all”, “zone”, “record”, “comment”"
- schema:
- type: string
- responses:
- "200":
- description: Returns a JSON array with results
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/SearchResults"
- <<: *commonErrors
+ $ref: "#/components/schemas/View"
+ default:
+ $ref: "#/components/responses/Error"
- "/servers/{server_id}/zones/{zone_id}/metadata":
- get:
- description: "Get all the Metadata associated with the zone."
- operationId: listMetadata
- tags:
- - zonemetadata
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
- responses:
- "200":
- description: List of Metadata objects
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: "#/components/schemas/Metadata"
- <<: *commonErrors
post:
- 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."
- operationId: createMetadata
+ summary: Adds a zone to a given view, creating it if needed
+ operationId: addToView
tags:
- - zonemetadata
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
+ - views
requestBody:
required: true
+ description: The zone to add to the view
content:
application/json:
schema:
- type: object
- schema:
- $ref: "#/components/schemas/Metadata"
+ type: string
responses:
"204":
- description: OK
- <<: *commonErrors
+ description: "Returns 204 No Content on success."
+ default:
+ $ref: "#/components/responses/Error"
- "/servers/{server_id}/zones/{zone_id}/metadata/{metadata_kind}":
- get:
- description: "Get the content of a single kind of domain metadata as a Metadata object."
- operationId: getMetadata
+ "/servers/{server_id}/views/{view}/{id}":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - $ref: "#/components/parameters/view"
+ - name: id
+ description: The zone to remove from the view
+ required: true
+ in: path
+ schema:
+ type: string
+ delete:
+ summary: Removes the given zone from the given view
+ operationId: deleteFromView
tags:
- - zonemetadata
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
- - $ref: "#/components/parameters/metadata_kind"
+ - views
responses:
- "200":
- description: Metadata object with list of values
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Metadata"
- <<: *commonErrors
- put:
- summary: "Replace the content of a single kind of domain metadata."
- description: "Creates a set of metadata entries of given kind for the zone. Existing metadata entries for the zone with the same kind are removed."
- operationId: modifyMetadata
+ "204":
+ description: "Returns 204 No Content on success."
+ default:
+ $ref: "#/components/responses/Error"
+
+ "/servers/{server_id}/networks":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ get:
+ summary: List all registered networks and views in a server
+ operationId: listNetworks
tags:
- - zonemetadata
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
- - $ref: "#/components/parameters/metadata_kind"
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- schema:
- $ref: "#/components/schemas/Metadata"
+ - networks
responses:
"200":
- description: Metadata object with list of values
+ description: An array of networks
content:
application/json:
schema:
- $ref: "#/components/schemas/Metadata"
- <<: *commonErrors
- delete:
- description: "Delete all items of a single kind of domain metadata."
- operationId: deleteMetadata
- tags:
- - zonemetadata
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
- - $ref: "#/components/parameters/metadata_kind"
- responses:
- "204":
- description: OK
- <<: *commonErrors
+ $ref: "#/components/schemas/Networks"
+ default:
+ $ref: "#/components/responses/Error"
- "/servers/{server_id}/zones/{zone_id}/cryptokeys":
+ "/servers/{server_id}/networks/{ip}/{prefixlen}":
+ parameters:
+ - $ref: "#/components/parameters/server_id"
+ - name: ip
+ schema:
+ type: string
+ in: path
+ required: true
+ description: The base address of the network
+ - name: prefixlen
+ schema:
+ type: string
+ in: path
+ required: true
+ description: The length of the network prefix
get:
- description: "Get all CryptoKeys for a zone, except the privatekey"
- operationId: listCryptokeys
+ summary: Return the view associated to the given network
+ operationId: getNetwork
tags:
- - zonecryptokey
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
+ - networks
responses:
"200":
- description: List of Cryptokey objects
+ description: A network
content:
application/json:
schema:
- type: array
- items:
- $ref: "#/components/schemas/Cryptokey"
- <<: *commonErrors
- post:
- 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."
- operationId: createCryptokey
+ $ref: "#/components/schemas/Network"
+ default:
+ $ref: "#/components/responses/Error"
+
+ put:
+ summary: Sets the view associated to the given network
+ operationId: setNetwork
tags:
- - zonecryptokey
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
+ - networks
requestBody:
required: true
+ description: The name of the view to use for this network
content:
application/json:
schema:
- type: object
- schema:
- $ref: "#/components/schemas/Cryptokey"
+ type: string
+
responses:
- "201":
- description: Created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Cryptokey"
- <<: *commonErrors
+ "204":
+ description: "Returns 204 No Content on success."
+ default:
+ $ref: "#/components/responses/Error"
+
+components:
+ securitySchemes:
+ # X-API-Key: abcdef12345
+ APIKeyHeader:
+ type: apiKey
+ in: header
+ name: X-API-Key
+
+ parameters:
+ server_id:
+ name: server_id
+ in: path
+ required: true
+ description: The id of the server to retrieve
+ schema:
+ type: string
+ zone_id:
+ name: zone_id
+ schema:
+ type: string
+ in: path
+ required: true
+ description: The id of the zone to retrieve
+ view:
+ name: view
+ schema:
+ type: string
+ in: path
+ required: true
+ description: The name of the view to update
+
+ responses:
+ Error:
+ description: The input to the operation was not valid
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+
+ schemas:
+ Server:
+ title: Server
+ type: object
+ additionalProperties: False
+ properties:
+ type:
+ type: string
+ description: "Set to “Server”"
+ id:
+ type: string
+ description: "The id of the server, “localhost”"
+ daemon_type:
+ type: string
+ 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: "#/components/schemas/Server"
+
+ Zone:
+ title: Zone
+ description: This represents an authoritative DNS Zone.
+ type: object
+ additionalProperties: False
+ 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"
+ - "Producer"
+ - "Consumer"
+ description: "Zone kind, one of “Native”, “Master”, “Slave”, “Producer”, “Consumer”"
+ rrsets:
+ type: array
+ items:
+ $ref: "#/components/schemas/RRSet"
+ description: "RRSets in this zone (for zones/{zone_id} endpoint only; omitted during GET on the .../zones list endpoint)"
+ serial:
+ type: integer
+ description: "The SOA serial number"
+ notified_serial:
+ type: integer
+ description: "The SOA serial notifications have been sent out for"
+ edited_serial:
+ type: integer
+ description: "The SOA serial as seen in query responses. Calculated using the SOA-EDIT metadata, default-soa-edit and default-soa-edit-signed settings"
+ 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"
+ catalog:
+ type: string
+ description: "The catalog this zone is a member of"
+ 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."
+ master_tsig_key_ids:
+ type: array
+ items:
+ type: string
+ description: "The id of the TSIG keys used for master operation in this zone"
+ externalDocs:
+ url: "https://doc.powerdns.com/authoritative/tsig.html#provisioning-outbound-axfr-access"
+ slave_tsig_key_ids:
+ type: array
+ items:
+ type: string
+ description: "The id of the TSIG keys used for slave operation in this zone"
+ externalDocs:
+ url: "https://doc.powerdns.com/authoritative/tsig.html#provisioning-signed-notification-and-axfr-requests"
+ last_check:
+ type: integer
+
+ Zones:
+ type: array
+ items:
+ $ref: "#/components/schemas/Zone"
+
+ RRSet:
+ title: RRSet
+ description: This represents a Resource Record Set (all records with the same name and type).
+ type: object
+ additionalProperties: False
+ 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: "#/components/schemas/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: "#/components/schemas/Comment"
+
+ Record:
+ title: Record
+ description: The RREntry object represents a single record.
+ type: object
+ additionalProperties: False
+ required:
+ - content
+ properties:
+ content:
+ type: string
+ description: "The content of this record"
+ disabled:
+ type: boolean
+ description: "Whether or not this record is disabled. When unset, the record is not disabled"
+ modified_at:
+ type: integer
+ description: "Timestamp of the last change to the record"
+
+ Comment:
+ title: Comment
+ description: A comment about an RRSet.
+ type: object
+ additionalProperties: False
+ 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 NOTIFY, AXFR, and DNSUPDATE queries.
+ type: object
+ additionalProperties: False
+ 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
+
+ Autoprimary:
+ title: Autoprimary server
+ description: An autoprimary server that can provision new domains.
+ type: object
+ additionalProperties: False
+
+ properties:
+ ip:
+ type: string
+ description: "IP address of the autoprimary server"
+ nameserver:
+ type: string
+ description: "DNS name of the autoprimary server"
+ account:
+ type: string
+ description: "Account name for the autoprimary server"
+
+ ConfigSetting:
+ title: ConfigSetting
+ type: object
+ additionalProperties: False
+ properties:
+ name:
+ type: string
+ description: 'set to "ConfigSetting"'
+ type:
+ type: string
+ description: "The name of this setting (e.g. ‘webserver-port’)"
+ value:
+ type: string
+ description: "The value of setting name"
+
+ SimpleStatisticItem:
+ title: SimpleStatisticItem
+ type: object
+ additionalProperties: False
+ properties:
+ name:
+ type: string
+ description: "Item name"
+ value:
+ type: string
+ description: "Item value"
- "/servers/{server_id}/zones/{zone_id}/cryptokeys/{cryptokey_id}":
- get:
- description: "Returns all data about the CryptoKey, including the privatekey."
- operationId: getCryptokey
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
- - $ref: "#/components/parameters/cryptokey_id"
- tags:
- - zonecryptokey
- responses:
- "200":
- description: Cryptokey
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Cryptokey"
- <<: *commonErrors
- put:
- description: "This method (de)activates a key from zone_name specified by cryptokey_id"
- operationId: modifyCryptokey
- tags:
- - zonecryptokey
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
- - $ref: "#/components/parameters/cryptokey_id"
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- schema:
- $ref: "#/components/schemas/Cryptokey"
- responses:
- "204":
- description: OK
- <<: *commonErrors
- delete:
- description: "This method deletes a key specified by cryptokey_id."
- operationId: deleteCryptokey
- tags:
- - zonecryptokey
- parameters:
- - $ref: "#/components/parameters/server_id"
- - $ref: "#/components/parameters/zone_id"
- - $ref: "#/components/parameters/cryptokey_id"
- responses:
- "204":
- description: OK
- <<: *commonErrors
+ StatisticItem:
+ title: StatisticItem
+ type: object
+ additionalProperties: False
+ properties:
+ name:
+ type: string
+ description: "Item name"
+ type:
+ type: string
+ description: 'set to "StatisticItem"'
+ value:
+ type: string
+ description: "Item value"
- "/servers/{server_id}/tsigkeys":
- parameters:
- - $ref: "#/components/parameters/server_id"
- get:
- description: "Get all TSIGKeys on the server, except the actual key"
- operationId: listTSIGKeys
- tags:
- - tsigkey
- responses:
- "200":
- description: List of TSIGKey objects
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: "#/components/schemas/TSIGKey"
- <<: *commonErrors
- post:
- summary: "Add a TSIG key"
- description: "This methods add a new TSIGKey. The actual key can be generated by the server or be provided by the client"
- operationId: createTSIGKey
- tags:
- - tsigkey
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- schema:
- $ref: "#/components/schemas/TSIGKey"
- responses:
- "201":
- description: Created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TSIGKey"
- "409":
- description: An item with this name already exists
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- <<: *commonErrors
+ MapStatisticItem:
+ title: MapStatisticItem
+ type: object
+ additionalProperties: False
+ properties:
+ name:
+ type: string
+ description: "Item name"
+ type:
+ type: string
+ description: 'Set to "MapStatisticItem"'
+ value:
+ type: array
+ description: "Named values"
+ items:
+ $ref: "#/components/schemas/SimpleStatisticItem"
- "/servers/{server_id}/tsigkeys/{tsigkey_id}":
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: tsigkey_id
- in: path
- required: true
- description: 'The id of the TSIGkey. Should match the "id" field in the TSIGKey object'
- schema:
+ RingStatisticItem:
+ title: RingStatisticItem
+ type: object
+ additionalProperties: False
+ properties:
+ name:
type: string
- get:
- description: "Get a specific TSIGKeys on the server, including the actual key"
- operationId: getTSIGKey
- tags:
- - tsigkey
- responses:
- "200":
- description: OK.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TSIGKey"
- <<: *commonErrors
- put:
- description: |
- 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
+ description: "Item name"
+ type:
+ type: string
+ description: 'Set to "RingStatisticItem"'
+ size:
+ type: integer
+ description: "Ring size"
+ value:
+ type: array
+ description: "Named values"
+ items:
+ $ref: "#/components/schemas/SimpleStatisticItem"
- Only the relevant fields have to be provided in the request body.
- operationId: putTSIGKey
- tags:
- - tsigkey
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- schema:
- $ref: "#/components/schemas/TSIGKey"
- responses:
- "200":
- description: OK. TSIGKey is changed.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TSIGKey"
- "409":
- description: An item with this name already exists
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- <<: *commonErrors
- delete:
- description: "Delete the TSIGKey with tsigkey_id"
- operationId: deleteTSIGKey
- tags:
- - tsigkey
- responses:
- "204":
- description: "OK, key was deleted"
- <<: *commonErrors
+ SearchResultZone:
+ title: SearchResultZone
+ type: object
+ additionalProperties: False
+ properties:
+ name:
+ type: string
+ object_type:
+ type: string
+ description: 'set to "zone"'
+ const: zone
+ zone_id:
+ type: string
- "/servers/{server_id}/autoprimaries":
- parameters:
- - $ref: "#/components/parameters/server_id"
- get:
- description: "Get a list of autoprimaries"
- operationId: getAutoprimaries
- tags:
- - autoprimary
- responses:
- "200":
- description: OK.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Autoprimary"
- <<: *commonErrors
- post:
- description: "This method add a new autoprimary server."
- operationId: createAutoprimary
- tags:
- - autoprimary
- requestBody:
- required: true
+ SearchResultRecord:
+ title: SearchResultRecord
+ type: object
+ additionalProperties: False
+ properties:
content:
- application/json:
- schema:
- type: object
- schema:
- $ref: "#/components/schemas/Autoprimary"
- responses:
- "201":
- description: Created
- <<: *commonErrors
+ type: string
+ disabled:
+ type: boolean
+ name:
+ type: string
+ object_type:
+ type: string
+ description: 'set to "record"'
+ const: record
+ zone_id:
+ type: string
+ zone:
+ type: string
+ type:
+ type: string
+ ttl:
+ type: integer
- "/servers/{server_id}/autoprimaries/{ip}/{nameserver}":
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: ip
- in: path
- required: true
- description: "IP address of autoprimary"
- schema:
+ SearchResultComment:
+ title: SearchResultComment
+ type: object
+ additionalProperties: False
+ properties:
+ content:
type: string
- - name: nameserver
- in: path
- required: true
- description: "DNS name of the autoprimary"
- schema:
+ name:
+ type: string
+ object_type:
+ type: string
+ description: 'set to "comment"'
+ const: comment
+ zone_id:
+ type: string
+ zone:
+ type: string
+ type:
type: string
- delete:
- description: "Delete the autoprimary entry"
- operationId: deleteAutoprimary
- tags:
- - autoprimary
- responses:
- "204":
- description: "OK, key was deleted"
- <<: *commonErrors
- "/servers/{server_id}/views":
- parameters:
- - $ref: "#/components/parameters/server_id"
- get:
- description: List all views in a server
- operationId: listViews
- tags:
- - views
- responses:
- "200":
- description: An array of view names
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Views"
- <<: *commonErrors
+ SearchResult:
+ title: SearchResult
+ type: object
+ additionalProperties: False
+ oneOf:
+ - $ref: "#/components/schemas/SearchResultZone"
+ - $ref: "#/components/schemas/SearchResultRecord"
+ - $ref: "#/components/schemas/SearchResultComment"
+ discriminator:
+ propertyName: object_type
+ mapping:
+ zone: "#/components/schemas/SearchResultZone"
+ record: "#/components/schemas/SearchResultRecord"
+ comment: "#/components/schemas/SearchResultComment"
- "/servers/{server_id}/views/{view}":
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: view
- schema:
+ SearchResults:
+ type: array
+ items:
+ $ref: "#/components/schemas/SearchResult"
+
+ Metadata:
+ title: Metadata
+ description: Represents zone metadata
+ type: object
+ additionalProperties: False
+ properties:
+ kind:
type: string
- in: path
- required: true
- description: The name of the view to retrieve
- get:
- description: List the contents of a given view
- operationId: listView
- tags:
- - views
- responses:
- "200":
- description: An array of zone names
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/View"
- <<: *commonErrors
- post:
- description: Adds a zone to a given view, creating it if needed
- operationId: addToView
- tags:
- - views
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: view
- schema:
+ description: "Name of the metadata"
+ metadata:
+ type: array
+ items:
type: string
- in: path
- required: true
- description: The name of the view to update
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - name
- properties:
- name:
- description: The zone to add to the view
- type: string
- responses:
- "204":
- description: "Returns 204 No Content on success."
- <<: *commonErrors
+ description: "Array with all values for this metadata kind."
- "/servers/{server_id}/views/{view}/{id}":
- delete:
- description: Removes the given zone from the given view
- operationId: deleteFromView
- tags:
- - views
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: view
- schema:
+ Cryptokey:
+ title: Cryptokey
+ description: "Describes a DNSSEC cryptographic key"
+ type: object
+ additionalProperties: False
+ properties:
+ type:
+ type: string
+ description: 'set to "Cryptokey"'
+ id:
+ type: integer
+ description: "The internal identifier, read only"
+ keytype:
+ type: string
+ enum: [ksk, zsk, csk]
+ active:
+ type: boolean
+ description: "Whether or not the key is in active use"
+ published:
+ type: boolean
+ description: "Whether or not the DNSKEY record is published in the zone"
+ dnskey:
+ type: string
+ description: "The DNSKEY record for this key"
+ ds:
+ type: array
+ items:
type: string
- in: path
- required: true
- description: The name of the view to update
- - name: id
- description: The zone to remove from the view
- required: true
- in: path
- schema:
+ description: "An array of DS records for this key"
+ cds:
+ type: array
+ items:
type: string
- responses:
- "204":
- description: "Returns 204 No Content on success."
- <<: *commonErrors
-
- "/servers/{server_id}/networks":
- get:
- description: List all registered networks and views in a server
- operationId: listNetworks
- tags:
- - networks
- parameters:
- - $ref: "#/components/parameters/server_id"
- responses:
- "200":
- description: An array of networks
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Networks"
- <<: *commonErrors
+ description: "An array of DS records for this key, filtered by CDS publication settings"
+ privatekey:
+ type: string
+ description: "The private key in ISC format"
+ algorithm:
+ type: string
+ description: "The name of the algorithm of the key, should be a mnemonic"
+ bits:
+ type: integer
+ description: "The size of the key"
- "/servers/{server_id}/networks/{ip}/{prefixlen}":
- get:
- description: Return the view associated to the given network
- operationId: getNetwork
- tags:
- - networks
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: ip
- schema:
- type: string
- in: path
- required: true
- description: The base address of the network
- - name: prefixlen
- schema:
+ Error:
+ title: Error
+ description: "Returned when the server encounters an error, either in client input or internally"
+ type: object
+ additionalProperties: False
+ properties:
+ error:
+ type: string
+ description: "A human readable error message"
+ errors:
+ type: array
+ items:
type: string
- in: path
- required: true
- description: The length of the network prefix
- responses:
- "200":
- description: OK
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Network"
- <<: *commonErrors
+ description: "Optional array of multiple errors encountered during processing"
+ required:
+ - error
- put:
- description: Sets the view associated to the given network
- operationId: setNetwork
- tags:
- - networks
- parameters:
- - $ref: "#/components/parameters/server_id"
- - name: ip
- schema:
+ CacheFlushResult:
+ title: CacheFlushResult
+ description: "The result of a cache-flush"
+ type: object
+ additionalProperties: False
+ properties:
+ count:
+ type: number
+ description: "Amount of entries flushed"
+ result:
+ type: string
+ description: 'A message about the result like "Flushed cache"'
+
+ View:
+ title: View
+ properties:
+ zones:
+ type: array
+ items:
type: string
- in: path
- required: true
- description: The base address of the network
- - name: prefixlen
- schema:
+ description: "An array of zone names"
+
+ Views:
+ title: Views
+ properties:
+ views:
+ type: array
+ items:
type: string
- in: path
- required: true
- description: The length of the network prefix
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - view
- properties:
- view:
- description: The name of the view to use for this network
- type: string
- responses:
- "204":
- description: "Returns 204 No Content on success."
- <<: *commonErrors
+ description: "An array of view names"
+
+ Network:
+ title: Network
+ properties:
+ network:
+ type: string
+ description: "Network specification in human-readable form base address/prefix length"
+ view:
+ type: string
+ description: "The name of the view"
+
+ Networks:
+ title: Networks
+ properties:
+ networks:
+ type: array
+ items:
+ $ref: "#/components/schemas/Network"