Skip to main content
Question

Software Updates field


Forum|alt.badge.img+12

I have been trying to find an answer to this question but alas I am unable to through various search permutations. Is there a way to pull the information out of the Software Update field in the User inventory? I am looking fo an API call or a smart group anyway I can use the information in that user inventory field.

4 replies

Forum|alt.badge.img+4
  • New Contributor
  • 7 replies
  • April 22, 2019

following.


Forum|alt.badge.img+11
  • Contributor
  • 225 replies
  • April 22, 2019

Not seeing a way for that particular field. However, you may be able to create an EA utilizing the softwareupdate -l command, getting the results then you should be able to pull info from that EA field.


mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • April 22, 2019

If you're referring to this section in a computer record:

That shows items like this:

Then that is available in each computer record's API info. It's listed under the software section, in a sub section called available_software_updates

Example code to get it with the API:

curl -H "Accept: application/xml" -sfku apiuser:apipass https://your.jamfpro.url/JSSResource/computers/serialnumber/<serialnumber> | xpath '/computer/software/available_software_updates/name/text()'

I'm not sure how the above works when there are multiple updates available. I don't currently have a machine on hand that needs several updates so I don't have a way to test that. But give that a try against an existing system on your end and see how it works.


mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • April 22, 2019

BTW, technically this is also available for Smart Groups. You can use the "Available Software Updates" or "Available SWUs" criteria and plug something in there to gather machines that have certain updates showing.
Unfortunately, that criteria item doesn't seem to take any regex matching. It has to be an exact string. At least in my brief tests I wasn't able to get it to show any Mac that had a "macOS Update" available, regardless of the version by using a regex pattern.

There is also a "Number of available updates" item for Smart Groups too, that would take an integer value. It can use greater than/less than modifiers.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings