Rest API - Action start & end time

Can some one please guide me getting action start/end time using rest API for all action start with a specific name.

@vk.khurava—

Have you reviewed the https://developer.bigfix.com/, https://developer.bigfix.com/rest-api/api/action.html and http://www.restapitutorial.com/ sites?

You can query the root BigFix server to get action details using the following nomenclature.

https://<bigfix_root_server>:52311/api/action/<action_id>

Obviously you have to change the hostname and action ID in the above URL string for your environment.

Hope this helps.
—Casey

:edit: This is exposed via REST, just not via Session Relevance.

Just to clarify, as it’s been asked several times, this api Session Relevance will not tell you the time the action began and ended on a particular endpoint; this will only give the start times & expiration time of the Action itself (as these were supplied on the ‘Take Action’ dialog).

The REST API does expose this, see my note later this thread.

@JasonWalker—

To your point, while the stop time of an endpoint is available in the local BESClient log, I don’t believe that level of details is reported back into the BFENT database.

@vk.khurava—

What’s your requirement to know the action start/end time?

—Casey

I figure it’s gotta be in there somewhere, because the console can display it when you use the “View action info” on the reported computer of an action.

Looks like @leewei made a Web Report for this some time back, but I don’t know whether it’s still valid in 9.5 - https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014744532

Ah! and most importantly, it’s not exposed in Session Relevance, but is exposed in REST (- and thanks again Lee Wei) Actual action start and end time

We are aware its not in session relevance, and nor is the action exit code, so stay tuned that may show up at some point.

Thx Jason for response but intent is read that info from action or server side not from client side, so if you can help me to get start end timing for some specific actions.

I just want to get the some specific action’s Action time start & end timing with their name which we need to share with concern person or Team.

OK I got the option how to get the actions with start & end date but got into any problem.

Requirement is, powershell script will call REST API for running action & its ID, action end time, server name.
On basis of that, that powershell script will finish their task

The link I posted was REST API, contacting the BES Server and retrieving that information on the action status.

Replace https://localhost:52311 with your BES Server, and action/399/status with one of your action IDs.

This sample result shows that Action 399 is expired, was issued on May 4 2015 at 1:09:51, and that on computer id “TINTIN” it completed with exit code 0, running from May 4 2015 from 1:11:16 until 1:11:57.
I did a check on one of my own actions, and retrieved similar status from each reported client.

And yes, you can definitely query REST via PowerShell, have a look at https://developer.bigfix.com

1 Like