4

[API] Will rewrites be modifiable from the API?

Rewrites "set or override the DNS response for any domain. Rewrites apply to subdomains as well, and local IP addresses are supported as answers."

 

It would be great if rewrites were modifiable from the API. It'd make my life a lot easier :p

3 replies

null
    • Allen
    • 1 yr ago
    • Reported - view

    I'm trying to modify them right now and have been able to retrieve the list of rewrites as well as add new ones and delete existing ones, but I haven't been able to modify existing entries yet. Technically if the master list was stored on the client you could delete them all and then add them again every time, but it's kludgy. Personally, I'm looking for way to add an entire list of addresses at once ala bulk import.

      • Ignacio_Portal
      • 1 yr ago
      • Reported - view

      Allen How did you do that? that's not documented. Did you reverse engineer the API the website uses? 🤔

      • Allen
      • 1 yr ago
      • Reported - view

      Ignacio Portal I just used the API as documented at https://nextdns.github.io/api/. The endpoint is https://api.nextdns.io/profiles/xxxxxx/rewrites/ and you can GET, POST, and DELETE as necessary. The only annoying this is, as I mentioned, they don't appear to have implemented replacing the entire array with a PUT command. If you figure out how to get that working I'd love to hear about it, but I suspect they have only enabled the functionality present on the web UI itself.

Content aside

  • 4 Likes
  • 1 yr agoLast active
  • 3Replies
  • 254Views
  • 4 Following