nautobot / pynautobot

Nautobot Python SDK
https://pynautobot.readthedocs.io/en/latest/index.html
Apache License 2.0
36 stars 32 forks source link

`custom-fields` and `custom-field-choices` are supposed to be different endpoint #114

Closed nautics889 closed 1 year ago

nautics889 commented 1 year ago

In App class of pynautobot library there is method for retrieving data from '/api/extras/custom-fields/' endpoint. The method has name custom_choices(). And it can make some mess, because Nautobot service actually provide another endpoint "/api/extras/custom-field-choices/". So such naming can be somewhat confusing: from /api/extras:

Extras API root view

GET /api/extras/

{
    ...
    "custom-field-choices": "http://localhost:8888/api/extras/custom-field-choices/",
    "custom-fields": "http://localhost:8888/api/extras/custom-fields/",
    ...
}

And they return completely different data.

Futhermore, there is no method to get data from "/api/extras/custom-field-choices/". Perhaps it should be implemented.