Posted on 01-11-2016 01:52 PM
Hey everyone, I was wondering if there was a way using the Api that you can tell what JAMF policies have failed per system?
Our corporate it team builds laptops, then runs a postbuild QA script on the system. From there I would love to be able to write something else to pull down a status if any of the policies have failed to install.
Basically if I wanted to check if mymacbookpro's policies were installed or if they failed, before the laptop is handed off to the user.
I am not sure if that is enough info, but if necessary I can provide more.
Posted on 01-11-2016 03:06 PM
I don't think thats been implemented. It wasn't there this time last year and I just looked at the API docs with no sign of it being added.
My suggestion for a workaround is in this thread: https://jamfnation.jamfsoftware.com/discussion.html?id=13092
You can get the info via a MySQL read instead.
Posted on 01-11-2016 05:40 PM
It would be awesome to be able to get policy status from the API, but @davidacland is correct. Its not an option... yet. I'm hoping at some point JAMF adds that to the API. The more items we can access via the API, the better IMO.
Posted on 01-12-2016 11:05 AM
Just tossing out some ideas...Perhaps you could get this done with Smart Groups or an EA?
I like scoping my policies to smart groups that look for whatever I deployed through the policy and then set the policy to ongoing. I know this isn't always an option in some environments or certain policies.
For this specific case you could do a Smart Group that see if a device is a member of the other smart groups. When it successfully deploys the policy and falls out of the smart groups it would then come in scope of the smart group which would indicate that it is ready for deployment.
Another thought would be to use and Extension Attribute to comb over the jamf log on the local machine and return a list of failed policies or a number.
Good luck and have fun!
PS: It would be nice if it were in the API!