You can find our user documentation at docs.cpanel.net.

Check out our new API beta site!

Child pages
  • WHM API 1 Functions - export_zone_dnskey
Skip to end of metadata
Go to start of metadata

Description

This function exports a domain's DNSKEY record value.


Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/export_zone_dnskey?api.version=1&domain=example.com&key_id=12345
 Command Line
whmapi1 export_zone_dnskey domain=example.com key_id=12345


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
   "data":{ 
"dnskey":"AwEAAch8SGW4vE6PjFWA9rbUm0AfTq+gJ0HC/nLu+2axdWHBIStt9lsOzKDorAr4vlmhlJzEzA62s96xp6mZ7XHUyWnkFwLs8obo6upL2in4h1ToOxzVl3lTs8O+kWtDq5/h1nwFlPDs9zpLJhlkTCtx2OTGbvimEYeqwPolUuSQR/Yb",
      "key_id":12345
      },
   "metadata":{
      "version":1,
      "command":"export_zone_dnskey",
      "reason":"OK",
      "result":1
   }
}


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

ParameterTypeDescriptionPossible valuesExample
domainstring

Required

The domain from which to fetch the DNSKEY record value.

A valid domain.example.com
key_idinteger

Required

The DNSSEC record's ID.

A positive integer.

12345

Returns

ReturnTypeDescriptionPossible valuesExample

dnskey

string

The DNSKEY record value.

A valid DNSKEY record.
 Click to view...

AwEAAch8SGW4vE6PjFWA9rbUm0AfTq+gJ0HC/nLu+2axdWHBIStt9lsOzKDorAr4vlmhlJzEzA62s96xp6mZ7XHUyWnkFwLs8obo6upL2in4h1ToOxzVl3lTs8O+kWtDq5/h1nwFlPDs9zpLJhlkTCtx2OTGbvimEYeqwPolUuSQR/Yb

key_idintegerThe security key's ID.A positive integer.12345