[Pdns-users] API to add additional IP to an existing hostname

Brian Candler b.candler at pobox.com
Wed Nov 25 14:41:08 UTC 2020


On 25/11/2020 14:23, Rudy Setiawan via Pdns-users wrote:
> So sorry I think there is a misunderstanding, I am not thinking of 
> replacing an existing rrset but more of adding a new rrset with the 
> same hostname but different IP address.
>
> For example:
> app.test.com <http://app.test.com> IN A 1.1.1.1
> app.test.com <http://app.test.com> IN A 2.2.2.2
> and so on.
>
> Is there a way to do that?

Notice that your original JSON data contains a *list* of records:

                     "records": [
                         {
                             "content": "2.2.2.2",
                             "disabled": false,
                             "type": "A",
                             "priority": 0
                         }
                     ]

What you need to do is to provide a list with both records:

                     "records": [
                         {
                             "content": "1.1.1.1",
                             "disabled": false,
                             "type": "A",
                             "priority": 0
                         },
                         {
                             "content": "2.2.2.2",
                             "disabled": false,
                             "type": "A",
                             "priority": 0
                         }
                     ]

This replaces the set of A records (rrset) with the provided data.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20201125/57dd665b/attachment.htm>


More information about the Pdns-users mailing list