openapi: 3.2.0 info: contact: email: cs@cpanel.net name: WebPros International, LLC url: https://cpanel.net/support/ description: UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings. license: name: cPanel License url: https://cpanel.net/legal-notices/ termsOfService: https://cpanel.net/legal-notices/ title: cPanel U DNSSEC API version: 11.137.9999.106 x-api-evangelist-provenance: 'Harvested verbatim from cPanel''s developer portal on 2026-09-05 via the MCP tool get-full-api-description at https://api.docs.cpanel.net/mcp. ONE mechanical change was made before storage: example values containing PEM private-key or certificate blocks, and AWS-access-key-shaped example strings, were replaced with REDACTED_* placeholders so the file can be stored in a public git repository without tripping secret scanning. No path, operation, parameter, schema or description was altered, added or removed.' servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. security: - BasicAuth: [] tags: - description: The DNSSEC module for UAPI. name: DNSSEC paths: /DNSSEC/activate_zone_key: get: x-readonly: false x-rollback: none description: 'This function activates a DNSSEC security key. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNSSEC-activate_zone_key parameters: - description: The security key's domain. in: query name: domain required: true schema: example: example.com format: domain type: string - description: The security key's ID. in: query name: key_id required: true schema: example: 1 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: activate_zone_key type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: example: domain: example.com key_id: '1' success: 1 properties: domain: description: The domain for which the system activated a security key. example: example.com format: domain type: string error: description: 'An error message that describes why the system could not activate the security key. **Note:** The function **only** displays this return when the `success` return is a `0` value.' example: 'Error: Invalid key_id or domain specified: No such key present for domain.' type: string key_id: description: The security key's ID. example: '1' type: string success: description: 'Whether the system activated the security key. * `1` - Activated. * `0` - The system failed to activate the security key. ' enum: - 1 - 0 example: 1 type: integer type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` - Success. * `0` - Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Enable DNSSEC security key tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n activate_zone_key \\\n domain='example.com' \\\n key_id='1'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/activate_zone_key?domain=example.com&key_id=1 - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_activate_zone_key.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_activate_zone_key.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/activate_zone_key/,\n {\n 'domain' => 'example.com',\n 'key_id' => '1',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_activate_zone_key.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_activate_zone_key.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'activate_zone_key',\n array (\n 'domain' => 'example.com',\n 'key_id' => '1',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 84 /DNSSEC/add_zone_key: get: x-readonly: false x-rollback: none description: 'This function generates a DNSSEC zone key for a domain. **Note:** * After you enable DNSSEC on the domain, you **must** add the DS records to your registrar. * You **cannot** modify the DNSSEC security key. To make any changes, you **must** disable (and delete) and re-create the DNSSEC security key. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNSSEC-add_zone_key parameters: - description: 'The algorithm that the system uses to generate the security key. * `5` — RSA/SHA-1 * `6` — DSA-NSEC3-SHA1 * `7` — RSASHA1-NSEC3-SHA1 * `8` — RSA/SHA-256 * `10` — RSA/SHA-512 * `13` — ECDSA Curve P-256 with SHA-256 * `14` — ECDSA Curve P-384 with SHA-384 **Note:** We recommend that you use ''ECDSA Curve P-256 with SHA-256'' if your registrar supports it.' in: query name: algo_num required: true schema: enum: - 5 - 6 - 7 - 8 - 10 - 13 - 14 example: 8 type: integer - description: The domain on which to enable DNSSEC. in: query name: domain required: true schema: example: example.com format: domain type: string - description: 'The type of key to add. * `ksk` * `zsk`' in: query name: key_type required: true schema: enum: - ksk - zsk example: ksk type: string - description: 'Whether to activate the newly-created key. * `1` — Activate the key. * `0` — Do **not** activate the key.' in: query name: active required: false schema: default: 1 enum: - 0 - 1 example: 1 type: integer - description: 'The key''s size, in bits. **Note:** For the following `algo_num` and `key_type` parameters, the `key_size` defaults to the following values: * `5` — ksk `2048` zsk `1024` * `6` — ksk `2048` zsk `1024` * `7` — ksk `2048` zsk `1024` * `8` — ksk `2048` zsk `1024` * `10` — ksk `2048` zsk `1024` * `13` — ksk `256` zsk `256` * `14` — ksk `384` zsk `384` ' in: query name: key_size required: false schema: example: 2048 maximum: 2048 minimum: 256 type: integer responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: add_zone_key type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: properties: domain: description: The domain for which the system added a security key. example: example.com format: domain type: string error: description: 'An error message that describes why the system could not add the security key. **Note:** The function **only** displays this return when the `success` return is a `0` value.' example: 'Error: Invalid key_id or domain specified: No such key present for domain.' type: string new_key_id: description: The security key's ID. example: '1' type: string success: description: 'Whether the system added the security key. * `1` — The system added the security key. * `0` — The system failed to add the security key.' enum: - 1 - 0 example: 1 type: integer type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '- 1 - Success - 0 - Failed: Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Create DNSSEC security key tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n add_zone_key \\\n domain='example.com' \\\n algo_num='8' \\\n key_type='ksk'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/add_zone_key?domain=example.com&algo_num=8&key_type=ksk - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_add_zone_key.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_add_zone_key.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/add_zone_key/,\n {\n 'domain' => 'example.com',\n 'algo_num' => '8',\n 'key_type' => 'ksk',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_add_zone_key.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_add_zone_key.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'add_zone_key',\n array (\n 'domain' => 'example.com',\n 'algo_num' => '8',\n 'key_type' => 'ksk',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 84 /DNSSEC/deactivate_zone_key: get: x-readonly: false x-rollback: none description: 'This function deactivates a DNSSEC security key. **Important:** When you disable the *DNS* role, the system **disables** this function.' operationId: DNSSEC-deactivate_zone_key parameters: - description: The security key's domain. in: query name: domain required: true schema: example: example.com format: domain type: string - description: The security key's ID. in: query name: key_id required: true schema: example: 1 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: deactivate_zone_key type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: properties: domain: description: The domain for which the system deactivated a security key. example: example.com format: domain type: string error: description: 'An error message that describes why the system could not deactivate the security key. **Note** The function **only** displays this return when the `success` return is a `0` value.' example: 'Error: Invalid key_id or domain specified: No such key present for domain.' type: string key_id: description: The security key's ID. example: '1' type: string success: description: 'Whether the system deactivated the security key. * `1` - Deactivated. * `0` - The system failed to deactivate the security key.' enum: - 1 - 0 example: 1 type: integer type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` - Success * `0` - Failed. Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Disable DNSSEC security key tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n deactivate_zone_key \\\n domain='example.com' \\\n key_id='1'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/deactivate_zone_key?domain=example.com&key_id=1 - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_deactivate_zone_key.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_deactivate_zone_key.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/deactivate_zone_key/,\n {\n 'domain' => 'example.com',\n 'key_id' => '1',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_deactivate_zone_key.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_deactivate_zone_key.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'deactivate_zone_key',\n array (\n 'domain' => 'example.com',\n 'key_id' => '1',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 84 /DNSSEC/disable_dnssec: get: x-readonly: false x-rollback: none description: 'This function disables DNSSEC on the domain. **Warning:** * This action is **irreversible**. If you disable DNSSEC on the domain, you will lose the associated keys. You can only retrieve the previous state with a full backup. * If you disable DNSSEC, you **must** remove the DNS records at the registrar. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNSSEC-disable_dnssec parameters: - description: "The domain on which to disable DNSSEC.\n\n**Note:**\n\n To enable DNSSEC on multiple domains, increment the parameter name. For example: `domain-0`, `domain-1`, `domain-2`." examples: multiple: summary: To enable DNSSEC on multiple domains. value: domain-0=example0.com&domain-1=example1.com&domain-2=example2.com single: summary: To enable DNSSEC on a single domain. value: example.com in: query name: domain required: true schema: format: domain type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: disable_dnssec type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: example: disabled: example.com: 1 properties: disabled: description: An array of objects that contain the domains for which the system disabled DNSSEC. properties: additionalProperties: description: 'Information about the domains for which the system disabled DNSSEC. * `1` — Disabled. * `0` — The system failed to disable DNSSEC. **Note:** This return''s name is the `domain` parameter''s value.' enum: - 0 - 1 example: 1 type: integer type: object type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` - Success. * `0` - Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Disable DNSSEC tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n disable_dnssec \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/disable_dnssec?domain=example.com - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_disable_dnssec.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_disable_dnssec.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/disable_dnssec/,\n {\n 'domain' => 'example.com',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_disable_dnssec.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_disable_dnssec.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'disable_dnssec',\n array (\n 'domain' => 'example.com',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 60 /DNSSEC/enable_dnssec: get: x-readonly: false x-rollback: none description: 'This function enables DNSSEC on the domain. **Note:** * After you enable DNSSEC on the domain, you **must** add the DNS records to your registrar. * You **cannot** modify the DNSSEC security key. To make any changes, you **must** disable (and delete) and re-create the DNSSEC security key. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNSSEC-enable_dnssec parameters: - description: "The domain on which to enable DNSSEC.\n\n**Note:**\n\n To enable DNSSEC on multiple domains, increment the parameter name. For example: `domain-0`, `domain-1`, `domain-2`." examples: multiple: summary: To enable DNSSEC on multiple domains. value: domain-0=example0.com&domain-1=example1.com&domain-2=example2.com single: summary: To enable DNSSEC on a single domain. value: example.com in: query name: domain required: true schema: format: domain type: string - description: 'Whether to activate the newly-created key. * `1` — Activate the key. * `0` — Do **not** activate the key.' in: query name: active required: false schema: default: 1 enum: - 0 - 1 example: 1 type: integer - description: "The algorithm that the system uses to generate the security key.\n\n* `5` — RSA/SHA-1\n* `6` — DSA-NSEC3-SHA1\n* `7` — RSASHA1-NSEC3-SHA1\n* `8` — RSA/SHA-256\n* `10` — RSA/SHA-512\n* `13` — ECDSA Curve P-256 with SHA-256\n* `14` — ECDSA Curve P-384 with SHA-384\n\n**Note:**\n\n We recommend that you use `ECDSA Curve P-256 with SHA-256` if your registrar supports it." in: query name: algo_num required: false schema: default: 8 example: 8 maximum: 255 minimum: 0 type: integer - description: 'The manner in which the system creates the security key. * `simple` — Use a single key for both KSK and ZSK. Use this value when the `algo_nom` parameter is greater than `8`. * `classic` — Use separate keys for KSK and ZSK. Use this value when the `algo_nom` parameter is equal to or less than `8`.' in: query name: key_setup required: false schema: default: classic enum: - simple - classic example: classic type: string - description: 'The number of times that the system rehashes the first resource record hash operation. A positive integer less than `501`. **Note:** In cPanel & WHM version 132 and earlier, the default value is `7`.' in: query name: nsec3_iterations required: false schema: default: 0 example: 7 maximum: 500 minimum: 0 type: integer - description: 'Whether NSEC3 will operate in Narrow or Inclusive mode. In Narrow mode, PowerDNS sends out white lies about the next secure record. Rather than query the resource record in the database, PowerDNS sends the hash plus `1` as the next secure record. * `1` — Narrow mode. * `0` — Inclusive mode.' in: query name: nsec3_narrow required: false schema: default: 1 enum: - 0 - 1 example: 1 type: integer - description: "Whether the system will create records for all delegations.\n\n* `1` — Create records for all delegations.\n* `0` — Create records only for secure delegations.\n\n**Note:**\n\n **Only** select `1` if you **must** create records for all delegations." in: query name: nsec3_opt_out required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer - description: 'A hexadecimal string that the system appends to the domain name before it applies the hash function to the name. For more information about the salt value, read the [RFC 5155](https://tools.ietf.org/html/rfc5155#section-3.1.5) documentation. **NOTE:** * In cPanel & WHM version 132 and later, this parameter also accepts the literal value `-` to indicate that no salt should be used. If you do not declare a value, the system defaults to no salt. * In cPanel & WHM version 130 and earlier, if you did not declare a value, the system defaulted to a random 64-bit value.' in: query name: nsec3_salt required: false schema: default: '-' example: 1A2B3C4D5E6F format: hex maxLength: 255 type: string - description: "Whether the domain will use [Next Secure Record](https://tools.ietf.org/html/rfc4470) (NSEC) or NSEC3 semantics.\n\n* `1` — Use NSEC3 semantics.\n* `0` — Use NSEC semantics.\n\n**Note:**\n\n If you use NSEC semantics (`0`), the system ignores the other NSEC3 options." in: query name: use_nsec3 required: false schema: default: 1 enum: - 0 - 1 example: 1 type: integer responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: enable_dnssec type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: example: enabled: example.com: enabled: 1 new_key_id: '1' nsec_version: NSEC3 properties: enabled: description: An object containing information about the domains for which the system enabled DNSSEC. properties: additionalProperties: description: 'Information about the domain for which the system enabled DNSSEC. **Note:** This return''s name is the `domain` parameter''s value.' properties: enabled: description: 'Whether the system enabled DNSSEC. * `1` — The system enabled DNSSEC. * `0` — The system failed to enable DNSSEC.' enum: - 1 - 0 type: integer new_key_id: description: The assigned security key ID. example: 1 type: integer nsec_version: description: 'The version of DNSSEC the system used. * `NSEC3` * `NSEC`' enum: - NSEC3 - NSEC type: string type: object type: object type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` - Success. * `0` - Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Enable DNSSEC tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n enable_dnssec \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/enable_dnssec?domain=example.com - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_enable_dnssec.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_enable_dnssec.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/enable_dnssec/,\n {\n 'domain' => 'example.com',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_enable_dnssec.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_enable_dnssec.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'enable_dnssec',\n array (\n 'domain' => 'example.com',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 60 /DNSSEC/export_zone_dnskey: get: x-readonly: true description: 'This function exports a domain''s DNSKEY record value. **Important:** When you disable the _DNS_ role, the system **disables** this function.' operationId: DNSSEC-export_zone_dnskey parameters: - description: The domain from which to fetch the DNSKEY record value. in: query name: domain required: true schema: example: example.com format: domain type: string - description: The DNSSEC record's ID. in: query name: key_id required: true schema: example: 12345 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: export_zone_dnskey type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: properties: dnskey: description: The DNSKEY record value. example: AwEAAch8SGW4vE6PjFWA9rbUm0AfTq+gJ0HC/nLu+2axdWHBIStt9lsOzKDorAr4vlmhlJzEzA62s96xp6mZ7XHUyWnkFwLs8obo6upL2in4h1ToOxzVl3lTs8O+kWtDq5/h1nwFlPDs9zpLJhlkTCtx2OTGbvimEYeqwPolUuSQR/Yb type: string key_id: description: The DNSSEC record's ID. example: 12345 minimum: 1 type: integer success: description: 'Whether the DNSKEY record exported successfully. * `1` - The system exported the record successfully. * `0` - The system failed to export the record.' enum: - 0 - 1 example: 1 type: integer type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` - Success * `0` - Failed: Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Export DNSKEY record value tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n export_zone_dnskey \\\n domain='example.com' \\\n key_id='12345'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/export_zone_dnskey?domain=example.com&key_id=12345 - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_export_zone_dnskey.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_export_zone_dnskey.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/export_zone_dnskey/,\n {\n 'domain' => 'example.com',\n 'key_id' => '12345',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_export_zone_dnskey.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_export_zone_dnskey.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'export_zone_dnskey',\n array (\n 'domain' => 'example.com',\n 'key_id' => '12345',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 88 /DNSSEC/export_zone_key: get: x-readonly: false x-rollback: none description: 'This function exports a DNSSEC security key. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNSSEC-export_zone_key parameters: - description: The security key's domain. in: query name: domain required: true schema: example: example.com format: domain type: string - description: The security key's ID. in: query name: key_id required: true schema: example: 12345 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: export_zone_key type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: properties: domain: description: The security key's domain. example: example.com format: domain type: string key_content: description: The content of the key, which includes the algorithm. example: 'Private-key-format: v1.2 Algorithm: 8 (RSASHA256) Modulus: 9i8AlGZkwKJj6HYZX+9OcOyCMQ0L9eHBaTg2Y83cVBSaIyiIWo54QpuiJykiuFYYHihOi+LW8vfU9A9jXLBs7DaeDkXO49OqYxfgD1vwmztJeXCQlmgxqUeD181gtSTNO43uUMkCisZft+OsJ96bdUof1UeJ1+IuSENBr1TZgYjmzBgIkmjdv8T5muPaaDfeOISLJKGOG2gI0xlyQ39ppd3CeB90cpIvFpCGjNC8nGvIqN4oyny6NftcEhaRFudbEhB6t2gI362wS5ohERK1F1rBTt+mqUwszCv46Y6p3Za3PsebWK7fR6ITnsW7KGyn3r8BxpJTHlHMwOtBPosaXw== PublicExponent: AQAB PrivateExponent: MZO5nCkatSh+0jumVImO1HLsrRAhjnzORHBLk8HLUytq9xWckBAM6+0HtLc2BMVhygD4AHfILdn3CsdmjS4CYXeGUP2B8qOXtqkCOFWdmMVRwKEInSGSjrKWPIlhplko84tbqO0yE9xrPk8dRlIwIGizDHKBsfYct/TDb5m4y7rvEHcBSm2DZz7AQL1qqC/WYI54qxHFXTId+nKsYMx/alRUV3AOSL20VSgL56VcM1luFS76ylDIWEOrQVyTFCtEcHvw3FLIOEVCM/CAErLFNlFdXHnYcRYnG/oXcsPW0DjpPNrqx8iaAOuhYFd/pu9CvKQnxYLLqXByOkSUIO3ggQ== Prime1: /mtiBD3gJ5Yu5ARsLew4eohRAobl4c3Bt9Gw62wmHiOJfgjbnY91H/bxc/ilnQh92yZUfxfm5z6FXEqluh0ZN3BOQTwzUEuTT9Pn00FhRfemL0UMpHn0BkoXCLwjs1XRyI0hXTOhGhH7XVczuYw/S7kWT5Cmfo4MODZ6cooR8SE= Prime2: 97aFfZxJcTYTKkZTc7yeUQVWTtKF25L780TRuCiG83hTSNKlmuWE2bAU/Cl2CX2NdW5sBmO5z9fEI5rA8LhuWHlKF82cXg1h50CsXkaAhFKrThMmb6SRSjIksxlz7rtK777z4En/V9v3l1yKcQ5eSQYQRHg1cCkn6NNlZPZ2G38= Exponent1: LoHarQPSken2MGBOliZ0PJHmnRujsh82pi+Cs8ZVQXUlkRB1dNvggTNW9+gf/hCrUQA0ufbYkrTvE+vhV6AyF9xDsdEbYDYwe4s0+X0eFvgqPMHWicpxPSUWCNa7f/DUJGEIFE13yZg35twl7GkiuOjglzLN/Jxix3PN9loe5YE= Exponent2: Mya4iAimzb7p1DfzcZnIY1ijyuEEDSRb7I8Qc2PDAjGdmRMOaV7twPnwS2XQXwNTG6Wyntsm+nlGokeJgevDtXdOSn4FxRIkXllnfow2a5yajSO9Mx6bdePG2kjuPKTmQ3195JnDJYRhqxrL566c351l7I2aE1AcUqKcdG3EU8c= Coefficient: T4dFDz5pQhVUQSjV0hhKHHZ1wBxiXdZeCFIfbyypWEdxGXdX2lIN264u9cGQhI+iExTEjZCaYASMBzOqnIhkHhj0M1DGYrhRCdTpgxmDwdcHniRl/XMxPGqpmsP4WFCBxmIbr3SdnqoiPMXix0SjWkHTisq5i09DBMNGIGQyqS8= ' type: string key_id: description: The security key's ID. example: 12345 minimum: 1 type: integer key_tag: description: The security key's internal identifier. example: 51640 minimum: 1 type: integer key_type: description: 'The security key''s signing type. * `CSK` - Combined Signing Key. * `KSK` - Key Signing Key. * `ZSK` - Zone Signing Key.' enum: - CSK - KSK - ZSK example: KSK type: string success: description: 'Whether the function succeeded. * `1` - The function succeeded. * `0` - The function failed.' enum: - 0 - 1 example: 1 type: integer type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '- 1 - Success - 0 - Failed: Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Export DNSSEC security key tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n export_zone_key \\\n domain='example.com' \\\n key_id='12345'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/export_zone_key?domain=example.com&key_id=12345 - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_export_zone_key.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_export_zone_key.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/export_zone_key/,\n {\n 'domain' => 'example.com',\n 'key_id' => '12345',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_export_zone_key.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_export_zone_key.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'export_zone_key',\n array (\n 'domain' => 'example.com',\n 'key_id' => '12345',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 84 /DNSSEC/fetch_ds_records: get: x-readonly: false x-rollback: none description: 'This function fetches a domain''s Delegation of Signing (DS) records. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNSSEC-fetch_ds_records parameters: - description: "The domain from which to fetch DS records.\n\n**Note:**\n\n To enable DNSSEC on multiple domains, increment the parameter name. For example: `domain-0`, `domain-1`, `domain-2`." examples: multiple: summary: To fetch DS records on multiple domains. value: domain-0=example0.com&domain-1=example1.com&domain-2=example2.com single: summary: To fetch DS records on a single domain. value: example.com in: query name: domain required: true schema: format: domain type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: fetch_ds_records type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: example: example.com: keys: '33930': active: 1 algo_desc: RSA/SHA-256 algo_num: '8' algo_tag: RSASHA256 bits: 1024 created: '1590002705' flags: 256 key_id: 2 key_tag: 33930 key_type: ZSK privatekey: 'Private-key-format: v1.2 Algorithm: 8 (RSASHA256) Modulus: wcZl882v587qKmt3M7+y6u+kzSgCvfgyiSGQHE2EulDcAnfEmz/ryanXMveHGBsO4L/GynYYUUsGvD2jHK1ITh8CeISiqmbUmPolf9HLQgwcT5pVcvwJ0Wmzpw5Ukmx67N7TTX+yieI5OyflP23GnJYQ5EQUzBu/DhdxhL90hYU= PublicExponent: AQAB PrivateExponent: EnoBdKrTMA5Jw7u1hQitXbt2Al3jTQvifbLmk9xMYJufLtkOtSL2L6dzLpftmL3TwFho8xspnG7D+KUD7ZMURrwxnLlqTttaL2PeaYJdQ184ezuflExppkDkdTEOqcIUuSylfAbyIdeGkVFuWr0cdjM9OFKMAkoYaVeAUP0SYU0= Prime1: 4eslxBBwyvXzmFqKx5TTiHfU7EHIAxUru3ykOMqD2tVMHbRAq5AMKZL6ZhuTXk8mnGppEfC6qqNKnf3VT5jLxw== Prime2: 25OUAsWWAJrQ4uLytsXoSbjHsVyh61DgZ4S4n2Mv7RsSHt0Q/VcuyvHXuAKb8Y0XCYczZBtEW+ZoPte/HHnsUw== Exponent1: Xkb4AqLtvvT2i8y0/2avA9MmCtXEtuydzGbOTVjNv4OlePvgxPee67aHQhcd34xeS4XohPEVpOHx4I6t9sKHvw== Exponent2: ulZDBRcodNrs6Z4u22yX8/gbfyhdQJUh2reG9bv2sAB/wEJaaKPT0eXqav3L2PKfCjbyJcH+AP9G+A2e4UuWgQ== Coefficient: mynNLSgStpQMktIEdysefyOg5jpXE3VeDZF6fbEOUg+E2ZnLBkLu4KPrriCwfl+cLagwgzx2M6wV/1QWkm8vPQ==' nsec_details: nsec3_hash_algo_desc: SHA-1 nsec3_hash_algo_num: '1' nsec3_iterations: '3' nsec3_narrow: 1 nsec3_opt_out: '0' nsec3_salt: fa1ac2c1rd7fbab4 nsec_version: NSEC3 properties: additionalProperties: description: 'An object containing the domain''s DS record information. **Note:** The return''s name is the domain''s name.' properties: keys: description: The DS keys on the requested domain. properties: additionalProperties: description: 'The information related to the domain''s DNSSEC record. **Note:** The return''s name is the `key_tag` return''s integer value.' properties: active: description: 'Whether the DS key is active. * `1` - Active. * `0` - Inactive.' enum: - 0 - 1 example: 1 type: integer algo_desc: description: 'A description of the algorithm that the DS key uses.' example: RSA/SHA-256 type: string algo_num: description: 'The algorithm the system generated for the security key. * `5` - RSA/SHA-1 * `6` - DSA-NSEC3-SHA1 * `7` - RSASHA1-NSEC3-SHA1 * `8` - RSA/SHA-256 * `10` - RSA/SHA-512 * `13` - ECDSA Curve P-256 with SHA-256 * `14` - ECDSA Curve P-384 with SHA-384' enum: - 5 - 6 - 7 - 8 - 10 - 13 - 14 example: 8 type: integer algo_tag: description: The short-form reference to the algorithm. example: RSASHA256 type: string bits: description: The DS key's size, in bits. example: 2048 minimum: 1 multipleOf: 64 type: integer created: description: The key's creation time. example: 1590002705 format: unix_timestamp type: integer digests: description: "The information that\n the registrar uses to populate the DS records." items: properties: algo_desc: description: "A description of the algorithm\n that the DS key uses." example: SHA-256 type: string algo_num: description: A IETF-recognized DNSSEC Algorithm Number. example: 2 minimum: 1 type: integer digest: description: The actual digest in the DS record. example: 4de3e58f1238fb7fc7caa84389ef6fa27d42572c35f1152c7f2ea3b899400019 type: string type: object type: array flags: description: 'An integer that determines the `key_type` value. * `256` - A Zone Signing Key (ZSK). * `257` - A Combined Signing Key (CSK) or Key Signing Key (KSK).' enum: - 256 - 257 example: 257 type: integer key_id: description: PowerDNS's internal identifier. example: 1 minimum: 1 type: integer key_tag: description: The DS key's identification number. example: 34519 minimum: 1 type: integer key_type: description: 'The DS key''s signing type. * `CSK` - Combined Signing Key. * `KSK` - Key Signing Key. * `ZSK` - Zone Signing Key.' enum: - CSK - KSK - ZSK example: KSK type: string privatekey: description: The DS key's private key, in ISC format. example: 'Private-key-format: v1.2 Algorithm: 8 (RSASHA256) Modulus: wcZl882v587qKmt3M7+y6u+kzSgCvfgyiSGQHE2EulDcAnfEmz/ryanXMveHGBsO4L/GynYYUUsGvD2jHK1ITh8CeISiqmbUmPolf9HLQgwcT5pVcvwJ0Wmzpw5Ukmx67N7TTX+yieI5OyflP23GnJYQ5EQUzBu/DhdxhL90hYU= PublicExponent: AQAB PrivateExponent: EnoBdKrTMA5Jw7u1hQitXbt2Al3jTQvifbLmk9xMYJufLtkOtSL2L6dzLpftmL3TwFho8xspnG7D+KUD7ZMURrwxnLlqTttaL2PeaYJdQ184ezuflExppkDkdTEOqcIUuSylfAbyIdeGkVFuWr0cdjM9OFKMAkoYaVeAUP0SYU0= Prime1: 4eslxBBwyvXzmFqKx5TTiHfU7EHIAxUru3ykOMqD2tVMHbRAq5AMKZL6ZhuTXk8mnGppEfC6qqNKnf3VT5jLxw== Prime2: 25OUAsWWAJrQ4uLytsXoSbjHsVyh61DgZ4S4n2Mv7RsSHt0Q/VcuyvHXuAKb8Y0XCYczZBtEW+ZoPte/HHnsUw== Exponent1: Xkb4AqLtvvT2i8y0/2avA9MmCtXEtuydzGbOTVjNv4OlePvgxPee67aHQhcd34xeS4XohPEVpOHx4I6t9sKHvw== Exponent2: ulZDBRcodNrs6Z4u22yX8/gbfyhdQJUh2reG9bv2sAB/wEJaaKPT0eXqav3L2PKfCjbyJcH+AP9G+A2e4UuWgQ== Coefficient: mynNLSgStpQMktIEdysefyOg5jpXE3VeDZF6fbEOUg+E2ZnLBkLu4KPrriCwfl+cLagwgzx2M6wV/1QWkm8vPQ==' type: string type: object type: object nsec_details: description: "An object containing the [Next Secure Record](https://tools.ietf.org/html/rfc4470) (NSEC) information for the selected domain.\n\n**Note:**\n\n If the domain uses NSEC semantics, only the `nsec_version` return appears in the object." properties: nsec3_hash_algo_desc: description: A description of the NSEC3 key's algorithm. example: SHA-1 type: string nsec3_hash_algo_num: description: The DNSSEC Digest Algorithm Number. example: 1 type: integer nsec3_iterations: description: The number of times that the system rehashes the first hash operation. example: 12 type: integer nsec3_narrow: description: "Whether NSEC3 will operate in Narrow or Inclusive mode.\n\n* `1` - Narrow mode.\n* `0` - Inclusive mode.\n\n**Note:**\n\n For more information about these modes, read [PowerDNS's DNSSEC documentation](https://doc.powerdns.com/authoritative/dnssec/intro.html)." enum: - 0 - 1 example: 1 type: integer nsec3_opt_out: description: 'Whether NSEC3 will create records for all delegations or only for secure delegations. * `1` - Create records for all delegations. * `0` - Create records only for secure delegations.' enum: - 0 - 1 example: 1 type: integer nsec3_salt: description: "The salt value that PowerDNS uses in the hashes.\n\n**Note:**\n\n For more information about the salt value, read [RFC 5155](https://tools.ietf.org/html/rfc5155#section-3.1.5)." example: fa1ac2c1rd7fbab4 format: hex type: string nsec_version: description: 'Whether the domain uses NSEC or [Next Secure Record version 3](https://tools.ietf.org/html/rfc5155) (NSEC3) [Domain Name Security Extensions](https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions) (DNSSEC) semantics. * `NSEC` * `NSEC3`' enum: - NSEC - NSEC3 example: NSEC type: string type: object type: object type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` - Success * `0` - Failed: Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Return domain's DS records tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n fetch_ds_records \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/fetch_ds_records?domain=example.com - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_fetch_ds_records.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_fetch_ds_records.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/fetch_ds_records/,\n {\n 'domain' => 'example.com',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_fetch_ds_records.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_fetch_ds_records.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'fetch_ds_records',\n array (\n 'domain' => 'example.com',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 82 /DNSSEC/import_zone_key: get: x-readonly: false x-rollback: none description: 'This function imports a DNSSEC security key. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNSSEC-import_zone_key parameters: - description: The security key's domain. in: query name: domain required: true schema: example: example.com format: domain type: string - description: 'The security key data that the [`pdnsutil`](https://doc.powerdns.com/authoritative/manpages/pdnsutil.1.html) utility''s `export-zone-key` call returns.' in: query name: key_data required: true schema: example: Private-key-format:%20v1.2%0AAlgorithm:%2013%20\(ECDSAP256SHA256\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A type: string - description: 'The security key''s type. * `ksk` * `zsk`' in: query name: key_type required: true schema: enum: - ksk - zsk example: ksk type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: import_zone_key type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: example: domain: example.com new_key_id: '1' success: 1 properties: domain: description: The domain for which the system imported the zone key. example: example.com format: domain type: string error: description: 'An error message that describes why the system could not import the security key. **Note:** The function **only** displays this return when the `success` return is a `0` value.' example: 'Error: Invalid key_id or domain specified: No such key present for domain.' type: string new_key_id: description: The security key's ID. example: '1' type: string success: description: 'Whether the system imported the security key. * `1` - The system imported the security key. * `0` - The system **failed** to import the security key.' enum: - 0 - 1 example: 1 type: integer type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` - Success * `0` - Failed: Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Add DNSSEC security key tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n import_zone_key \\\n domain='example.com' \\\n key_type='ksk' \\\n key_data=$'Private-key-format:%20v1.2%0AAlgorithm:%2013%20\\\\(ECDSAP256SHA256\\\\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/import_zone_key?domain=example.com&key_type=ksk&key_data=Private-key-format%3a%2520v1.2%250AAlgorithm%3a%252013%2520%5c%28ECDSAP256SHA256%5c%29%250APrivateKey%3a%2520xCM281KtWE9oCsUX8fP1hDZ02%2fX7JCjp4QZA%2fDZjfX0%3d%250A%250A - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_import_zone_key.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_import_zone_key.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/import_zone_key/,\n {\n 'domain' => 'example.com',\n 'key_type' => 'ksk',\n 'key_data' => 'Private-key-format:%20v1.2%0AAlgorithm:%2013%20\\(ECDSAP256SHA256\\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_import_zone_key.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_import_zone_key.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'import_zone_key',\n array (\n 'domain' => 'example.com',\n 'key_type' => 'ksk',\n 'key_data' => 'Private-key-format:%20v1.2%0AAlgorithm:%2013%20\\(ECDSAP256SHA256\\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 84 /DNSSEC/remove_zone_key: get: x-readonly: false x-rollback: none description: 'This function removes a DNSSEC security key. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNSSEC-remove_zone_key parameters: - description: The security key's domain. in: query name: domain required: true schema: example: example.com format: domain type: string - description: The security key's ID. in: query name: key_id required: true schema: example: 1 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: remove_zone_key type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: example: domain: example.com key_id: '12' success: 1 properties: domain: description: The domain for which the system removed a security key. example: example.com format: domain type: string error: description: 'An error message that describes why the system could not remove the security key. **Note:** The function **only** displays this return when the `success` return is a `0` value.' example: 'Error: Invalid key_id or domain specified: No such key present for domain.' type: string key_id: description: The security key's ID. example: '1' type: string success: description: 'Whether the system removed the security key. * `1` — The system removed the security key. * `0` — The system failed to remove the security key.' enum: - 1 - 0 example: 1 type: integer type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '- 1 - Success - 0 - Failed: Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Remove DNSSEC security key tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n remove_zone_key \\\n domain='example.com' \\\n key_id='1'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/remove_zone_key?domain=example.com&key_id=1 - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_remove_zone_key.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_remove_zone_key.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/remove_zone_key/,\n {\n 'domain' => 'example.com',\n 'key_id' => '1',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_remove_zone_key.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_remove_zone_key.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'remove_zone_key',\n array (\n 'domain' => 'example.com',\n 'key_id' => '1',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 84 /DNSSEC/set_nsec3: get: x-readonly: false x-rollback: none description: 'This function configures the domain to use Next Secure Record 3 (NSEC3) semantics. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNSSEC-set_nsec3 parameters: - description: The domain on which to enable NSEC3 semantics. in: query name: domain required: true schema: example: example.com format: domain type: string - description: The number of times that the system re-executes the first resource record hash operation. in: query name: nsec3_iterations required: true schema: example: 7 maximum: 500 minimum: 0 type: integer - description: 'Whether NSEC3 will operate in Narrow mode or Inclusive mode. In Narrow mode, PowerDNS sends out white lies about the next secure record. Rather than query the resource record in the database, PowerDNS sends the hash plus 1 as the next secure record. * `1` - Narrow mode. * `0` - Inclusive mode.' in: query name: nsec3_narrow required: true schema: enum: - 0 - 1 example: 1 type: integer - description: "Whether the system will create records for all delegations.\n\n* `1` - Create records for all delegations.\n* `0` - Create records **only** for secure delegations.\n\n**Note:**\n\n **Only** select `1` if you **must** create records for all delegations." in: query name: nsec3_opt_out required: true schema: enum: - 0 - 1 example: 0 type: integer - description: "The salt value that PowerDNS uses in the hashes. For more information about the salt value, read the [RFC 5155 documentation](https://tools.ietf.org/html/rfc5155).\n\n **Note:**\n\n In cPanel & WHM version 132 and later, this parameter also accepts the literal value `-` to indicate no salt value." in: query name: nsec3_salt required: true schema: example: 1A2B3C4D5E6F format: hex type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: set_nsec3 type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: properties: enabled: additionalProperties: description: "Whether the system enabled NSEC3 on the domain.\n\n * `1` - Enabled.\n * `0` - The system failed to enable NSEC3." enum: - 0 - 1 type: integer description: 'Contains the domains for which the system enabled NSEC3. **Note:** This return''s name is the `domain` parameter''s value.' example: example1.com: 1 type: object type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '- 1 - Success - 0 - Failed: Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Update domain to use NSEC3 tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n set_nsec3 \\\n domain='example.com' \\\n nsec3_opt_out='0' \\\n nsec3_iterations='0' \\\n nsec3_narrow='1' \\\n nsec3_salt='-'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/set_nsec3?domain=example.com&nsec3_opt_out=0&nsec3_iterations=0&nsec3_narrow=1&nsec3_salt=- - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_set_nsec3.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_set_nsec3.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/set_nsec3/,\n {\n 'domain' => 'example.com',\n 'nsec3_opt_out' => '0',\n 'nsec3_iterations' => '0',\n 'nsec3_narrow' => '1',\n 'nsec3_salt' => '-',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_set_nsec3.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_set_nsec3.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'set_nsec3',\n array (\n 'domain' => 'example.com',\n 'nsec3_opt_out' => '0',\n 'nsec3_iterations' => '0',\n 'nsec3_narrow' => '1',\n 'nsec3_salt' => '-',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 60 /DNSSEC/unset_nsec3: get: x-readonly: false x-rollback: none description: 'This function configures the domain to use Next Secure Record (NSEC) semantics instead of Next Secure Record 3 (NSEC3) semantics. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNSSEC-unset_nsec3 parameters: - description: The domain on which to disable NSEC3 semantics and use NSEC semantics. in: query name: domain required: true schema: example: example.com type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: unset_nsec3 type: string module: description: The name of the module called. example: DNSSEC type: string result: properties: data: example: disabled: example.com: 1 properties: disabled: description: A list of the domains for which the system disabled NSEC3. properties: additionalProperties: description: 'Whether the system disabled NSEC3 on the domain. * `1` — Disabled. * `0` — The system failed to disable NSEC3. **Note:** This return''s name is the `domain` parameter''s value.' enum: - 1 - 0 type: integer type: object type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '- 1 - Success - 0 - Failed: Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Update domain to use NSEC tags: - DNSSEC x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNSSEC \\\n unset_nsec3 \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNSSEC/unset_nsec3?domain=example.com - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNSSEC_unset_nsec3.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNSSEC_unset_nsec3.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNSSEC/,\n q/unset_nsec3/,\n {\n 'domain' => 'example.com',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNSSEC_unset_nsec3.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNSSEC_unset_nsec3.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNSSEC',\n 'unset_nsec3',\n array (\n 'domain' => 'example.com',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 60 components: securitySchemes: BasicAuth: scheme: basic type: http externalDocs: url: https://cpanel.net/developers/ x-tagGroups: - name: API Development Tools tags: - API Token Management - Batch - SSE Task Management - URL Parsing - name: Authentication tags: - External Authentication - Two-Factor Settings - name: Backup Information tags: - BackupInfo - BackupInfo Status - name: Block Ip Addresses tags: - Block IP - name: Commerce Integration tags: - Market Integration - SSL Certificates - name: Contact Information tags: - Contact Information - name: cPanel Account tags: - Account Enhancements - Account Information - Account Management - AuditLog - Contact Information - cPanel Features - Disk Quotas - DomainRecommendations - Personalization - Resource Usage and Statistics - Subaccount Management - Team Roles - Team Users - name: cPanel Account Backups tags: - Backup - File Restoration - name: cPanel Plugin Framework tags: - Formbricks - Plugins - name: cPanel Theme Management tags: - Application Information - Brand Management - Branding Files - Browser Cache Management - Language - Theme Settings - name: Directory Management tags: - Directory Indexes - Directory Privacy - Directory Protection - name: DNS tags: - DNS - DNS Information - DNS Security - Dynamic DNS - Email DNS Settings - ZoneEdit - name: Domain tags: - Domain - name: Domain Management tags: - AddonDomain - Direct Link Protection (Hotlink) - Domain - Domain Information - Domain Redirection - DomainLookup - Park - SubDomain - Virtual Host Information - name: Domains tags: - Subdomains - name: Email tags: - Email Accounts - Email Filtering - Email Forwarding - Email Server Information - Email Suspensions - Mail Server Information - Mailbox Management - Mailing Lists - Signing and Encryption (GnuPG Keys) - Spam Filtering (Greylisting) - Spam Management - Spam Prevention (BoxTrapper) - Webmail Applications - Webmail Sessions - name: Extract Information tags: - ExtractInfo - ExtractInfo Status - name: File Manager tags: - Trash - name: Files tags: - FTP Accounts - FTP Server Settings - Image Tools - Jodit - Manage Files - Manage Files - WebDisk Settings - name: GIT Management tags: - Deployment Settings - Repository Management - name: InProductSurvey tags: - InProductSurvey - name: MySQL and MariaDB tags: - Database Information - Database Management - Remote Databases - User Management - name: Notifications tags: - Pushbullet - name: Optional Applications tags: - Antivirus Protection (ClamAV) - Calendar and Contacts (DAV) - Calendar and Contacts Server - WordPress Manager Backups - name: PostgreSQL tags: - PostgreSQL Database Management - PostgreSQL User Management - name: Retrieve bandwidth information tags: - Bandwidth - name: Security tags: - Known SSH Hosts Management - Login Information - name: Server Information tags: - cPanel Server Information - Notifications - Password Strength - SSH - WebPros MCP - WebProsMCP - name: ServiceProxy tags: - ServiceProxy - name: Site Quality Monitoring tags: - SiteQuality - name: SSL Certificates tags: - Auto-generated SSL Certificates - cPanel Account SSL Management - SNI Email Settings - SSL Certificate Management - Verify Domain Ownership - name: Statistics tags: - Domain Statistics - Weblog Settings - name: UserData tags: - UserData - name: Web Server Configuration tags: - EA4 - EasyApache Settings - PHP - name: Web Server Management tags: - Application Manager - ModSecurity - NginxCaching - PHP Settings - Web Apps - name: Website Configuration tags: - Handler Management - Logs - Mime Type Management - Nova - Site Information - Site Installation - Sitejet - WPX