Rest API for patch and patch install date

I can see we can get the last patch date and last patches installed once a server has been patched via web report portal , but i wan to get the REST API info for this so that i can fetch the same info and provide to a team so that they would add this info into their asset management system to have the patchs and patch install date.

Web report

Asset management data need last two columns for patchs and install date

The “Patch and Install Date” is a custom property someone created in your deployment, so you would need to submit a session relevance query via the REST API to return the data. You would use the query function, https://developer.bigfix.com/rest-api/api/query.html and submit a query like:

(id of computer of it, concatenation "|" of values of it) of results whose (exists values of it) of bes property "Patch and Install Date"
1 Like

Hi Steve,

Thanks for your awesome help, actually i was looking out a relevance query which you helped.

So i am using currently this query

curl -k --insecure --user XXXX:XXXX --data-urlencode “relevance=(id of computer of it, Names of Computer of it, concatenation “”|”" of values of it) of results whose (exists values of it) of bes property ““Patch and Install Date””" https://server1:52311/api/query -o c:\temp\data-19jan.xml

One question how Oracle team should connect this code? is it via curl or any other method remotely they should use?

Thanks

@mail2vij

Any chance you could share the relevance for the custom property “Patch and Install Date”?

Thanks,
Bob_K

It depends on what data connectors they have available. If they have a mechanism to make REST or SOAP calls, then they can make the calls directly. If not, then they may have to use curl or some other REST client to pull the data to a file, and process the file. I’d expect the DBAs to be aware of what integration options they have.

Patch & Install Date relevance

((if (exists property "HotFixID" of it) then (string value of property "HotFixID" of it) else ("")), (if (exists property "InstalledOn" of it) then ((if (exists hexadecimal integer (it)) then (((month of it as integer as string&"/"& day_of_month of it as integer as string&"/"&year of it as string) of ((january 1 of 1601)+((hexadecimal integer (it)/(864000000000))*day))) of it) else (it)) of string value of property "InstalledOn" of it) else ("")), (if (exists property "Description" of it) then (string value of property "Description" of it) else (""))) of select objects "* from Win32_QuickFixEngineering" of WMI

2 Likes

ok thanks…

When trying to define this in manage properties it says there is a syntax error

I updated the original post from @mail2vij to add code tags around his relevance query. The forum was interpreting some of the text as forum tags, for instance losing the “*” in (some number * day)

1 Like