Session Relevance to fetch Action ID Start and End time along with Behaviour

So, I am working on creating an API to fetch when the action will be starting, its behavior. I am able to get results, however I am unable to display action run time. For example in one of the test, I am running with below behavior -
This action will never expire.

It will run between 1:00:00 AM and 2:59:00 AM client local time, only on Sunday and Saturday.

If the action becomes relevant after it has successfully executed, the action will be periodically reapplied up to 2 times, waiting 15 minutes between reapplications.

If the action fails, it will be retried up to 2 times, waiting 1 hour between attempts.

Below is the API being used, I am still unable to get the execution time -
https://BigFixserver:52311/api/query?relevance= ( id of it, name of it, concatenation ", " of (day_of_week constraints of it as string), (start time_of_day of it as string | "No Start"), (end time_of_day of it as string | "No End"), (reapplication limit of it as string | "0"), (reapplication interval of it as string | "00:00:00"), (retry limit of it as string | "0"), (retry delay of it as string | "00:00:00") ) of bes actions whose (id of it = 1234)

What you have is working fine but it is limited to the action definition as submitted by the operator (i.e. if they have configured “start time” it will display it, if they left it unchecked then it won’t be there).

If you instead are after the actual time the job was executed, that is within the “action results” instead but it is per-device value.

(id of it, name of it, concatenation ", " of (day_of_week constraints of it as string), (start time_of_day of it as string | "No Start"), (end time_of_day of it as string | "No End"), (reapplication limit of it as string | "0"), (reapplication interval of it as string | "00:00:00"), (retry limit of it as string | "0"), (retry delay of it as string | "00:00:00"), (name of computer of it, start time of it as string|"Not Started", end time of it as string|"Not ended", status of it as string) of results of it) of bes actions whose (id of it = 1234)

1 Like

Thanks @ageorgiev ,
I am assuming we cannot get the constraint here and only once job kicks in we can capture the Action start time. I am still working to get the particular information “It will run between 1:00:00 AM and 2:59:00 AM client local time”
Thank you for sharing more polished version.

Don’t have any jobs to test it on but give time range start & time range end as sub-inspector of the bes action: https://developer.bigfix.com/relevance/reference/bes-action.html

yes this should retrieve them.

time range start of it as string | "any", time range end of it as string | "any"

Put into your larger query

( id of it, name of it, concatenation ", " of (day_of_week constraints of it as string), (start time_of_day of it as string | "No Start"), (end time_of_day of it as string | "No End"), (reapplication limit of it as string | "0"), (reapplication interval of it as string | "00:00:00"), (retry limit of it as string | "0"), (retry delay of it as string | "00:00:00"),  time range start of it as string | "any", time range end of it as string | "any" ) of bes actions whose (id of it = 1234)
2 Likes

Yes, this is now retrieving start and end time of job. Thank you @JasonWalker