netbox-agent
netbox-agent copied to clipboard
Handle Netbox API versions
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"