(imported topic written by daveb91)
Howdy,
I’m new to BigFix and can barely spell “relevance”, but I’m comfortable with SOAP and have managed to query a few properties of our managed computers via SOAP. My perspective on this may be skewed due to my unfamiliarity with relevance and long-time use of SQL, so I may be thinking about this in the wrong way. Any pointers would be appreciated. I have two questions, one on Relevance and one on the SOAP API:
Relevance
: I wish to retrieve multiple properties for a list of computers that match a criteria. Specifically, I’d like to retrieve “Computer Name, CPU, Uptime - Windows” for every computer in the “10.5.5.0” subnet. Could someone provide a complete example of relevance that would do this? I’m really stumped on the criteria syntax, and I think that if I could get this completely working it would really help me “click” with relevance.
SOAP AP
I: In playing with the SOAP API, it appears that the only way to retrieve multiple properties for multiple computers is to concatenate the property values together into a string, and get an array of these strings (one for each computer).
Array (
[0] => “COMPUTERNAME1, 1000 Mhz Pentinum 4, 3 days”
[1] => “COMPUTERNAME5, 2000 Mhz Pentinum 4, 1 days”
[2] => “COMPUTERNAME9, 1500 Mhz Pentinum 4, 5 days”
)
I believe this works, and I can live with it, but when using SOAP (as opposed to XML-RPC) I’m used to thinking of arrays of objects (literally, arrays of SOAP type “XSD:STRUCT”) which greatly appeals to my personal preference to use associative arrays for everything, even when it doesn’t add value.
I’m wondering if there is a syntax available that would return an array of structs (array of associative arrays) that would be closer to the following. Can either of these be done?
Array (
[0] => Array (
Computer Name
=> “COMPUTERNAME1”,
CPU
=> “1000 Mhz Pentinum 4”,
Uptime - Windows
=> “3 days”
)
[1] => Array (
Computer Name
=> “COMPUTERNAME2”,
CPU
=> “2000 Mhz Pentinum 4”,
Uptime - Windows
=> “1 days”
)
[2] => Array (
Computer Name
=> “COMPUTERNAME3”,
CPU
=> “1500 Mhz Pentinum 4”,
Uptime - Windows
=> “5 days”
)
)
As you might imagine, an array of SOAP “structs” per the above is very easy to dereference in the resulting code (in most of the languages I use, it is deserialized directly into an associative array). Yeah, not a show-stopper, but thought I’d ask.
I’d really appreciate a working example of the relevance above. If anyone knows a trick for the SOAP that would be icing on the cake.
Thanks,
David