netbox-community / pynetbox

Python API client library for Netbox.
Apache License 2.0
567 stars 168 forks source link

No longer works with Netbox as of v3.5.0 due to OpenAPI change #548

Closed K0HAX closed 1 year ago

K0HAX commented 1 year ago

When targeting a Netbox instance of v3.5.0 I get the error pynetbox.core.query.RequestError: The requested url: https://<url>/api/docs/?format=openapi could not be found. when calling pynetbox.api('<url>', token='<token>')

markkuleinio commented 1 year ago

Creating the API object works here:

>>> import pynetbox
>>> pynetbox.__version__
'7.0.1'
>>> netbox = pynetbox.api("http://netbox-test.lein.io/", token="176d4c04ccc8f2a549ea6fd39312367d9da5a796ff")
>>> netbox.version
'3.5'
>>> netbox.status()["netbox-version"]
'3.5.0'
>>>

I see you already noticed https://github.com/netbox-community/pynetbox/pull/547 that deals with the OpenAPI change.

photonicnet commented 1 year ago

Is the change in #547 and the commit going into 7.0.2? We have not noticed anything else with netbox 3.5.x other than the OpenAPI change at this stage. We have not worked with any of the new features as of yet though.