API call to get operator that initiated action

As the title says, is there an API call to get the operator that initiated an action? I can use https://my.local.bigfix:52311/api/actions to get the actions then https://my.local.bigfix:52311/api/action/28876 to get action information then finally https://my.local.bigfix:52311/api/action/28876/status to get the status. However, I have not found the operator information in there to see who initiated the action. Am I overlooking something or just totally missed a call?

You may have to use a session relevance query using the bes action object and the bes user object

http://mybigfixserver:52311/api/query?relevance=name of issuer of bes action whose (id of it is 36)

GIves

<BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd">
<Query Resource="name of issuer of bes action whose (id of it is 36)">
<Result>
<Answer type="string">BESAdmin</Answer>
</Result>
<Evaluation>
<Time>1.586ms</Time>
<Plurality>Singular</Plurality>
</Evaluation>
</Query>
</BESAPI>

Or if you choose the json output option in 9.2.5+, see: IBM BigFix 9.1 REST API Serve in JSON?

{"result":["BESAdmin"],"plural":false,"type":"string","evaltime_ms":0}

http://support.bigfix.com/inspectors/Session%20Objects_Any.html#bes%20action
http://support.bigfix.com/inspectors/Session%20Objects_Any.html#bes%20user

1 Like

Thanks @gearoid that’s exactly what I needed!

1 Like

The normal REST API interactions tend to give you lists of items with limited information, but also how to find more information or how to interact with them. It also doesn’t give you much opportunity to filter the results server side.

Session relevance really lets you query much more and is more general purpose. It lets you be very specific about what info you want and about which objects.