i have to generate a report against all installed software in windows server via rest api connection , for this i would use curl.
can someone plz assist me on this
Thanks
i have to generate a report against all installed software in windows server via rest api connection , for this i would use curl.
can someone plz assist me on this
Thanks
do you have an analysis for the software installed already?
Or are you running BFI and running software scans?
i have an analysis for the installed software , but want to use the relevance query to get the data in xml format
OK then, that makes it easy. Hereâs a good resource on how the RESTAPI works.
https://developer.bigfix.com/rest-api/api/query.html
If you have your query already, you can use a simple get in the URL to test, or use the post method. I like the post method b/c there is no limit to the size of the query:
curl -k -u un:pw -d 'relevance=names of bes computers' https://server.domain.com:52311/api/query
Thanks for your help, i am using the below query but not getting the desired result
curl -v -k --insecure --user Admin:password --data-urlencode ârelevance=(name of computer of it) of results of bes properties whose (name of it contains ââInstalled Applications - Windowsââ and name of source analysis of it = ââApplication Information (Windows)ââ)â https://server1:52311/api/query
Two things, the quotation marks were the MS pretty version, not the literal " ones. Your command could choke on that. Also, you may want to try using the escape \ character in your cure.
Try this:
curl -v -k --insecure --user Admin:password --data-urlencode "relevance=(name of computer of it) of results of bes properties whose (name of it contains \"Installed Applications - Windows\" and name of source analysis of it = \"Application Information (Windows)\")" https://server1:52311/api/query
Using single quotes:
curl -v -k --insecure --user Admin:password --data-urlencode 'relevance=(name of computer of it) of results of bes properties whose (name of it contains "Installed Applications - Windows" and name of source analysis of it = "Application Information (Windows)")' https://server1:52311/api/query
the last query which you mentioned is not working
app.xml
[quote=âmasonje, post:6, topic:25371â]
the above query is working but getting the host name only , want to get the application name as well
Sorry, not the best at relevance⌠but:
(
names of it,
values whose(it as string as lowercase contains "Application Information (Windows)" as lowercase ) of results from (bes property "Installed Applications - Windows" ) of it
)
of (members of bes computer groups whose (name of it = "Windows Servers") )
I added in the group part because it helps the query run faster. Limits who your asking the question of. If you want you could just make it just âBES Computersâ if you want.
Hi @masonje,
Looks like query is good , but i am not getting any result of it , and showing me result item â0â
You need to modify the query to match a computer group that exists in your deployment. This was just an example.
i have 2 computers into the desired group. but output it still âzeroâ
(names of it, values whose(it as string as lowercase contains âApplication Information (Windows)â as lowercase) of results from (bes property âInstalled Applications - Windowsâ ) of it) of (members of bes computer groups whose (name of it = âWindows Serversâ))
Well⌠I can only speculate at this point. That query works with some of my analyses with multi-line results.
What are the exact names of your analysis result names? What software are you looking for? Are you looking for a line of each software package of all packages installed?
Validate spelling and lower/uppercase (where applicable) words.
This query works fine for me in general:
when i execute the sample query i got the result but not getting result for application installed
intention is to get Server name with all windows application installed for each server in group
As I mentioned, validate the BES Property/analisis name in the query. I doubt your inventory exists in âDownloaded Filesâ analisis results. That analisis is for the relay cache downloads and is a standard analisis. I was just showing that the query syntax works.
So it sounds like you want all of the results from your software analisis. So we can clean it up a bit and remove the âwhose(âŚ)â part of it.
(
names of it,
values of results from (bes property "Installed Applications - Windows" ) of it
)
of (members of bes computer groups whose (name of it = "Windows Servers") )
If that doesnât give you a result, you need to check the spelling and/or name of your analisis.