Is there a way of passing the "Latest Version" variable from Patch Reporting of an application into a script in a policy?
Thanks
Is there a way of passing the "Latest Version" variable from Patch Reporting of an application into a script in a policy?
Thanks
Best answer by mm2270
Thanks.
I was thinking of a Self Service option to download (curl) app installers/dmgs where the file name has the version number on it. It would be easy if I could just pass the variable into the script's parameter.
Ok, I was mistaken. The URL is still active. It's just that they seem to still have a lot of older titles in it that show up way at the top with some old last modification dates, like going back to 2020. But searching through the output, I can see the latest version of Google Chrome in there, as an example.
{
"name": "Google Chrome",
"publisher": "Google",
"lastModified": "2023-10-11T06:43:20Z",
"currentVersion": "118.0.5993.70",
"id": "0BC"
},
That's just from 2 days ago, so it's current.
The URL is https://jamf-patch.jamfcloud.com/v1/software
Here's an example of how I might pull the latest version of Chrome. Back in the day I might have used a call to pass the output into python to get the specific information, but with python being removed from the macOS, it doesn't make much sense to use that anymore.
curl -s https://jamf-patch.jamfcloud.com/v1/software | grep -A4 "Google Chrome" | awk -F'"' '/currentVersion/{print $4}'
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.