Bigfix Actions API

Is it possible to return the target value (Computer ID/ Customer Relevance) by relevance query? We are currently working with the following REST call:

https://hostname/api/query?relevance=(id of it, name of it, state of it) of bes actions whose (name of it starts with "PP_" and state of it is "Open")

That gets us a snippet of the following response:

    <Answer type="integer">2050668</Answer>
				<Answer type="string">PP_Testing: (1/6)</Answer>
				<Answer type="string">Open</Answer>

We are having to then issue an additional query using the Action ID returned to run:

https://hostname/api/action/2050668

Which returns all the specifics about that action including what we desire “Target”

As we understand it, the target can come in the form of a “ComputerID” or “CustomRelevance”. Was curious if there was an easier way from the first request to list the actions following a naming scheme and obtain the targets of those actions?

You can expand on the initial session relevance to attempt to get everything in the first query.

Try:

https://hostname/api/query?relevance=(id of it, name of it, state of it, targeting relevance of it) of bes actions whose (name of it starts with "PP_" and state of it is "Open")

1 Like

Should you be using https://hostname/api/action/2050668/status

Thanks Brolly! This got me the data I needed. I also explored https://developer.bigfix.com/relevance/reference/bes-action.html#casts for additional insight in case anyone else needs a good reference.

1 Like

@djrobin we do that as well. We were initially trying to obtain the data sets we needed from a single request (ID, name, state, and target).