- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Printer Friendly Page
REST API version Best practice
12-30-2019 06:35 AM
What is the best practice on using the REST API (wapi) version?
Do you use the lastest version in each script you develop?
Do you use a known version that has the functionality you need, for example v1.2.1?
Do you manage your version in a global place that changes it for all your scripts?
Follow up question to the approach from above that you are using, and describe when you would change that value?
For instance you use a global place and change the version after doing a NIOS upgrade to the latest version that NIOS works with.
Also, wondering if there is a latest concept for the API?
Refering to how when using Docker Containers you can specify the specific version or latest if you want the most recent.
Solved! Go to Solution.
Re: REST API version Best practice[ Edited ]
12-30-2019 08:25 AM - edited 12-30-2019 08:26 AM
It's a pretty subjective topic, ask 5 engineers and you will get 10 answers!
For me it depends on the target audience / target grid. I write scripts for myself to support customers, but also as a customer deliverable.
I always template the API version, near the top of my perl scripts I put:
my $api = "wapi/v2.9";
and then use the variable in every call so that it's simple to change.
So far I haven't found anything that's not backwards compatible. i.e. changing the version from v2.0 to v2.9 shoudn't have any ill effects.
I would recomend:
For scripts that will be used by the general public, use the lowest API version that is fully supported by Infoblox and that will support every feature you need.
For scripts that will be used by a specific customer or set of customers, use the highest API version that is common to every grid you ned to support.