title: How to interact with NetBox API using python
body: <p>I am trying to interact with NetBox by using python from CentOS. What I have done is that I installed netbox with docker , so everytime I run "docker-compose up" from centOS I am able to access netbox api in my browser. I managed to add manually some new devices. So what I am trying to do now is that I want to write a python file so as to get this information that I manually added. My problem is that I cannot understand the documentation and nothing is working from those simple examples they provide in it. </p>
  
  <p>The only thing that I managed to do is to retrieve the following json reply by importing the requests package: </p>
  
  <pre><code>{u'dcim': u'http://ansible.mpl.nh:2435/api/dcim/', u'circuits': u'http://ansible.mpl.nh:2435/api/circuits/', u'ipam': u'http://ansible.mpl.nh:2435/api/ipam/', u'secrets': u'http://ansible.mpl.nh:2435/api/secrets/', u'tenancy': u'http://ansible.mpl.nh:2435/api/tenancy/', u'extras': u'http://ansible.mpl.nh:2435/api/extras/', u'virtualization': u'http://ansible.mpl.nh:2435/api/virtualization/', u'plugins': u'http://ansible.mpl.nh:2435/api/plugins/'}
  </code></pre>
  
  <p>So what I basically do is just this: </p>
  
  <pre><code>rest_response = requests.get(url="http://ansible.../api/")
  </code></pre>
  
  <p>But this is just something very simple and basic. If I change the url I can get a reply from every API. How can I actually interact with NetBox and retrieving for example a device that I manually added in the API by using python ? </p>