Closed PieterL75 closed 1 year ago
This was no pynetbox issue. Was fixed partially in https://github.com/netbox-community/netbox/issues/10241. Not yet fixed on NetBox side: https://github.com/netbox-community/netbox/issues/11326
So this issue can be closed.
@PieterL75 is correct: The NetBox REST API requires related objects to be identified either by their numeric primary keys or by some set of attributes sufficient to uniquely identify each object.
@jeremystretch How would you propose pynetbox as a generic library shall jiggle CF DataTypes efficiently? This comes at extra cost with expensive API calls.
As I see it, it either
This issue was solved in https://github.com/netbox-community/netbox/pull/10479
NetBox allows dicts in a customerfield POST
A customfield is provided as 'array of dicts' by the API, But when returning, it has to be an array of integers. There is a bug report for that on NetBox git https://github.com/netbox-community/netbox/issues/10241 and https://github.com/netbox-community/netbox/pull/10479 It is however not clear on how this will be fixed.
Will the API send ID's only, or will it accept dicts.
I'm creating this bugreport, as pynetbox might need to be adjusted, depending on the decision made in the NetBox API