Reply

REST API version Best practice

Authority
Posts: 5
3376     0

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.

 

Thanks!

 

Craig

Re: REST API version Best practice

[ Edited ]
Moderator
Moderator
Posts: 315
3376     0

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.

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You