[cPanel UAPI] How to get the serial of a DNS zone

Operating System & Version
CentOS v7.9.2009
cPanel & WHM Version
104.0.6
Sep 3, 2018
2
0
1
India
cPanel Access Level
Root Administrator
Hello,

I want to set DNS TXT records with cPanel UAPI from a PHP application. Authentication is done with API Tokens. So I was reading this documentation: Update a DNS zone.

A request sample as per docs:

https://hostname.example.com:2083/cpsess##########/execute/DNS/mass_edit_zone?zone=example.com&serial=202001010100&remove=23

'serial' is a required parameter.

How can I get the serial of a DNS zone using UAPI? I have not found this in the documentation.

Thank you.
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,032
1,741
363
cPanel Access Level
Root Administrator
Hey there! I reached out to the team and there is not an API call available that will provide the serial number. Most people use a grep/awk combination to pull that information manually.

If you'd like to see us add this, could you use the link in my signature to submit a feature request and I'll make sure the development team approves that?