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

Rudy Setiawan rudy at rudal.com
Thu Nov 26 02:45:07 UTC 2020


Awesome, thanks! Kevin, Brian for the explanation.

Cheers,
Rudy


On Wed, Nov 25, 2020 at 9:41 PM Brian Candler <b.candler at pobox.com> wrote:

> 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 IN A 1.1.1.1
> 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/20201126/0b2af312/attachment.htm>


More information about the Pdns-users mailing list