netbox-agent icon indicating copy to clipboard operation
netbox-agent copied to clipboard

Handle Netbox API versions

Open Solvik opened this issue 4 years ago • 0 comments

At some point, Netbox versions will depreciate or change some behavior. The project has been developed with Netbox 2.6

One way to change the behavior depending of the version will be to match the HTTP header API-Version:

➜  ~ curl -i https://netbox.company.com/api/
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 29 Aug 2019 15:58:27 GMT
Content-Type: application/json
Content-Length: 325
Connection: keep-alive
Vary: Accept, Cookie, Origin
Allow: GET, HEAD, OPTIONS
API-Version: 2.6
X-Frame-Options: SAMEORIGIN
P3P: CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"

Solvik avatar Aug 29 '19 16:08 Solvik