• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Add DNS Record via REST API

NicoDeluxe

New Pleskian
Hi,

i need to add DNS records to an existing domain. In the documentaion i cannot find it, how can i do this or where can i find more Information? I just find how to add a whole domain
 
I am afraid this can't be done trough the REST API. It is possible trough the XML api or using the CLI.
 
Thank you. Ca you give me some more info? I can find something regarding xml api but don’t get find any details to this xml api
 
So contrary to my previous post, I think you can actually use the REST API to add DNS records. You'll have to use the CLI methode from the API to do so. The CLI methode allows you to run any of the PLESK CLI functions trough the REST API. More information on the CLI functions for the can be found here: dns: DNS Zones on Domains

Alternatively you can use the XML API. General information about the XML API can be found here: About XML API. The specific reference for DNS can be found here:

And a PHP wrapper/sdk is available from Github: plesk/api-php-lib
 
Last edited:
Definitely need this in the REST API. Full control over DNS Records. Add, Delete and Update should be there by default.
 
Seems you're right. Not sure why there isn't an option to add records. (You could try a POST to the API to see if it works anyway.)

The change log entry for Plesk 18.0.36 made it sound like there would also be an option to add DNS records. My bad.
 
Seems you're right. Not sure why there isn't an option to add records. (You could try a POST to the API to see if it works anyway.)

The change log entry for Plesk 18.0.36 made it sound like there would also be an option to add DNS records. My bad.
Given that it literally says:

It is now possible to add and manage DNS records (including TTL) in a DNS zone via REST API

I'd try a POST request (maybe Plesk didn't update their reference? ) or contact Plesk to clarify
 
Back
Top