Trying to gather a list of devices using the data/Devices call, and filtering based on manufacturerPartNrs->manufacturerPartNr(list). The device Type is unreliable in the sense that a WS-C2960C-8PC-L and a WS-C2960X-48FPS-L are "Cisco Catalyst 29xx Stack-able Ethernet Switch" but they are two completely different architectures and want to treat them differently. should be able to use something like:
However, any iteration . Have tried returns the same thing as if running
Just a guess here, can you try "manufacturerPartNrs.manufacturerPartNr" instead of "manufacturerPartNrs.manufacturerPartNrs"
You can also try manufacturerPartNrs.manufacturerPartNr="WS-C2960X-48FPS-L"
manufacturerPartNrs.manufacturerPartNr have tried all combinations.
tried other filter options like:
with the same result - full list of devices.
To address the following use case, try query using our Inventory Details resource:
or use the following:
The issue was going by using the "dotted notation" under Filtering Syntax section for a nested parameter.
To get into the weeds a little bit, because the presentation that we do here (<manufacturerPartNrs><manuFacturerPartNr>) doesn't represent the actual structure of the data, it's just a cosmetic way for us to take the array of Strings and display and marshal them into XML. The actual filtering that needs to happen is against elements parameter of the array itself (hence, the filter parameter is manufacturerPartNr.elements). When we do dotted notation against other collections, what you see in the XML represents the actual structure of our data; for example, in the InventoryDetails query above, summary is a reference to a separate object, so using the dotted notation lets the filtering logic know that it needs to apply that filter to the other object, rather than to the root InventoryDetails object. Not sure if you wanted these details, but that's why there's this difference here.
Please sign in to leave a comment.