• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Forwarded to devs XML-RPC doesn't return TTL for DNS records

Kaspar

API expert
Plesk Guru
Username:

TITLE

XML-RPC doesn't return TTL for DNS records

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk version 18.0.39

PROBLEM DESCRIPTION

Plesk supports modifying TTL values for individual since version 18.0.31, however but this isn't available for the XML-API yet. This isn't a bug (obviously), but rather a lacking feature of core functionally in the XML-API (imho). Since the REST API doesn't seem to support adding DNS records to a domain (yet), it would be useful to have TTL supported in the RCP-XML api.

STEPS TO REPRODUCE

Body for XML-RCP API
XML:
<packet><dns><get_rec><filter><dns-zone-name>example.com</dns-zone-name></filter></get_rec></dns></packet>

ACTUAL RESULT

XML Response
XML:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.9.1">
    <dns>
        <get_rec>
            <result>
                <status>ok</status>
                <id>1</id>
                <data>
                    <site-id>302</site-id>
                    <type>CNAME</type>
                    <host>www.example.com.</host>
                    <value>example.com.</value>
                    <opt></opt>
                </data>
            </result>
        </get_rec>
    </dns>
</packet>

EXPECTED RESULT

XML Response
XML:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.9.1">
    <dns>
        <get_rec>
            <result>
                <status>ok</status>
                <id>1</id>
                <data>
                    <site-id>302</site-id>
                    <type>CNAME</type>
                    <host>www.example.com.</host>
                    <value>example.com.</value>
                    <ttl>1800</ttl>
                    <opt></opt>
                </data>
            </result>
        </get_rec>
    </dns>
</packet>

ANY ADDITIONAL INFORMATION

(DID NOT ANSWER QUESTION)

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Help with sorting out
 
"It is now possible to add and manage DNS records (including TTL) in a DNS zone via REST API.": https://docs.plesk.com/release-notes/obsidian/change-log/#plesk-18036
Thats unfortunate, because the REST API doesn't seem to support adding DNS records. Even tough the change log for Plesk 18.0.36 mentions the option to add DNS records via the REST API the methode actually isn't available. Only methodes for retrieving (GET) or updating (PUT) DNS records are actually available for the REST API.

Schermafbeelding 2021-11-24 om 10.06.00.png

Which means there is no option to add DNS records to Plesk with TTL values with either the REST API or the XML-RCP API.

Or am I perhaps missing something?
 
Last edited:
@Rasp, you are correct. Internal task PPP-55178 ("Allow adding/removing DNS records via REST API") is created.
 
Back
Top