Baseline API - Relevance

Currently I was wondering how to do the following things if possible.

  1. Is there a way to get the computer names and not ID using the following API call:

https://SERVERNAME:52311/api/baseline/custom/WinPWSTeam/221620/Computers

  1. Can I add a relevance statement to this API call? If so How?

  2. use the output=json

Any help would be great.

The way I read your question, you want to pull back the computer names (not the IDs) of the relevant machines of a baseline, you would need to run a custom query. I’m no relevance expert, but here’s something I pulled together with the BigFix Excel Connector:

(item 0 of it as string, item 1 of it as string) 
of (
	(if (exists Name of Computer of it | false) then (concatenations "%0A" of (Name of Computer of it as string)) else ("<none>")), 
	(if (exists Operating System of Computer of it | false) then (concatenations "%0A" of (Operating System of Computer of it as string)) else ("<none>"))) 
of 
	results whose(ID of Fixlet of it = 221620) 
	of bes fixlets whose (name of site of it = "WinPWSTeam")

I would use the post method to: https://SERVERNAME:52311/api/query
with “relevance=< your query>” and “output=json”

Here’s my test with postmane:

Hope that points you in the right direction!