API Question - Get last servers patched

Hello,
I have been tasked to add some patching information for a custom dashboard I have created. I have been attempting unsuccessfully to find a way to do the following:

  1. Retrieve a list of servers patched in the last x # of days.
  2. Possibly retrieve details on what patches were applied and if successful.

Any help would be appreciated.

Thanks!

I may have solved my own issue here. After much effort I came up with the following relevance:

(name of it, id of it, name of issuer of it, time issued of it, concatenation “,” of (names of targeted computers of it as string)) of top level bes actions whose (((now - time issued of it) < 7*day) of it)

1 Like

There’s a potentially important distinction here in terms of when a change occurred on a given endpoint vs. when the action was issued/deployed. Here’s some sample session relevance that returns action details based on when it executed on an endpoint:

((id of source fixlet of action of it as string | "n/a", id of action of it,name of action of it | "n/a", names of computers of it, detailed statuses of it ,start time of it as string | "n/a", end time of it as string | "n/a", exit code of it as string | "n/a") of results whose (start time of it > (now - 7 * day)) of bes actions)

Hi Aram,
I think I get what you are saying and believe that this might be more helpful. However, when I attempt to use that relevance statement I receive the response of “Requested resource does not exist.” I will try to play with it to see if I can’t get it working.

Thanks

The “Resource does not exist” is more likely a REST syntax error than a Relevance issue. Are you URL-encoding your query? See Add custom Property to relevance query

I am using Postman to test, it automatically encodes it for you.

relevance=%28%28id%20of%20source%20fixlet%20of%20action%20of%20it%20as%20string%20|%20%22n/a%22,%20id%20of%20action%20of%20it,name%20of%20action%20of%20it%20|%20%22n/a%22,%20names%20of%20computers%20of%20it,%20detailed%20statuses%20of%20it%20,start%20time%20of%20it%20as%20string%20|%20%22n/a%22,%20end%20time%20of%20it%20as%20string%20|%20%22n/a%22,%20exit%20code%20of%20it%20as%20string%20|%20%22n/a%22%29%20of%20results%20whose%20%28start%20time%20of%20it%20%3E%20%28now%20-%207%20%2A%20day%29%29%20of%20bes%20actions%29