the worlds gone mad

we've lost the hope we had

Posted on 2 March 2022   4 min read

Pynetbox API calls using variables

using variables for netbox api urls and filters

Recently whilst using pynetbox to create NetBox environment objects I had a need to use variables in the URL of the API calls to allow for reusable functions to perform API calls based on the URL and data fed in as arguments. The reason the URL needs to be fed in as an argument when calling the function is because each NetBox element uses a different API URL.