Import DNSSEC key

This function imports a DNSSEC security key.

Note:

Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn't use PowerDNS, you will receive an error.

Authorizations:
query Parameters
domain
required
string

The domain for which to import the security key.

Example: domain=example.com
key_data
required
string

The security key's data that the pdnsuti utility's export-zone-key call returns.

Example: key_data=Private-key-format:%20v1.2%0AAlgorithm:%2013%20\(ECDSAP256SHA256\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A
key_type
required
string

The security key's type.

  • ksk — Key-Signing Key
  • zsk — Zone Signing Key

Note:

You must call these values in lowercase.

Example: key_type=ksk

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty import_zone_key domain='example.com' key_type='ksk' key_data='Private-key-format:%20v1.2%0AAlgorithm:%2013%20\(ECDSAP256SHA256\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A'

Response samples

Content type
application/json
{
  • "data": {
    • "import_key_id": 1
    },
  • "metadata": {
    • "command": "import_zone_key",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}