-
NetBox Secrets plugin versionv1.10.1 NetBox versionv3.7.1 Steps to ReproduceAfter updating from 3.6 / 1.9 I found that my scripts that rely on using the REST API to query and filter on "assigned_object_id" no longer function. It seems that "assigned_object_id" while part of the returned object, is not filterable anymore. In previous versions this worked, it's only after updating to 3.7.1 / 1.10.1 that it has stopped working. In looking at the behavior of e.g. dcim.interfaces I see that they now use a "device_id" instead of "assigned_object_id" to define the device. In looking at the docs, it seems that there is still a (filterable) "assigned_object_type_id" but I have no idea what this value is, as it's not part of the returned json objects. Expected BehaviorI expect "https://netbox/api/plugins/secrets/secrets/?assigned_object_id=416" to return secret objects with "assigned_object_id=416". Observed BehaviorAn unfiltered list of all secret objects is returned. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
This is not a bug. Secrets can be attached to any object and filtering just using the object id has no meaning because any object can have that I'd in django. You do need to specify the assigned object type as well as the plugin doesn't make assumptions that it has to be device model. |
Beta Was this translation helpful? Give feedback.
-
Updating to 1.10.2 has restored the original behavior. Thank you for your help, and for this project. |
Beta Was this translation helpful? Give feedback.
There was an incorrect commit released in v1.9.1 that went out undetected due to incorrect tests. Try with v1.10.2 and let me know