Adjustments DNS PHP API v.3 to v.4?

I use this PHP API to update secondary DNS from Powerdns to Linode
https://github.com/srpurdy/WHMCS-Linode-DNS-Addon/tree/master/linodedns/linode_api/Services

What do I have to adjust in following files to make it work with API v.4?

Linode.php
https://github.com/srpurdy/WHMCS-Linode-DNS-Addon/blob/master/linodedns/linode_api/Services/Linode.php

api.xml
https://github.com/srpurdy/WHMCS-Linode-DNS-Addon/blob/master/linodedns/linode_api/Services/api.xml

also …
does v.4 require a new API account and can the old one continue to be used alongside the v.4 account during adjustments?

1 Reply

To use that PHP API with Linode APIv4, you would need to make a few adjustments to your code. The Linode APIv4 utilizes a different endpoint structure as compared to v3. You can find examples of this updated structure at the following links:

https://www.linode.com/docs/products/tools/api/guides/upgrade-to-v4/

https://www.linode.com/docs/api/

https://www.linode.com/docs/api/linode-instances/

Regarding your second question, the authentication method has changed in Linode APIv4. Instead of using the previous authentication method, Linode APIv4 requires the use of a Personal Access Token (PAT). The good news is that you can continue using your existing account for API access. However, you will need to modify your request structure and include that PAT.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct