Unable to add DNS zone via API
I'm trying to write a script which involves adding a DNS zone to our DNS cluster, but in trying to test the Add DNS zone functionality of the API via curl, I get told that I need to enter an IP despite doing so.
The exact I'm running is:
Which gives:
Is there something obvious I'm missing?
curl -u root:pwd https://foo.com:2087/xml-api/adddns?domain=bar.com&ip=xxx.xxx.xxx.xxx&template=standard&trueowner=rootWhich gives:
0
Sorry, you must enter an ip. Please try again.
Is there something obvious I'm missing?
-
Hello :) I was unable to reproduce this issue. Are you using a valid security token in the URL? For example, my test request looked like this: https://1.2.3.4:2087/cpsess5542266702/xml-api/adddns?domain=cptesting.com&ip=1.2.3.4&template=standard&trueowner=root
Also, do you notice the same issue across multiple browsers? Thank you.0 -
I hadn't done, but I was assuming that using curl with the -u flag handled the security authentication? 0 -
[quote="btaylor927, post: 1548721">I hadn't done, but I was assuming that using curl with the -u flag handled the security authentication?
That's correct. I just noticed that you were using "curl" in the example you provided. I tested again using curl this time, and it still worked as expected. Do you experience the same problem when using this method to add the zone directly via the command line instead of through your custom script? Thank you.0
Please sign in to leave a comment.
Comments
3 comments