Get Policy Completed Status via API

djrich29
New Contributor III

Hi All, is it possible to query the API for completed status of a policy, Also, is there a way to see/get this information from the JSS mysql database?

Thanks

1 ACCEPTED SOLUTION

davidacland
Honored Contributor II
Honored Contributor II

Looking at the MySQL tables, it seems that policies only hold information about the policy entry itself, rather than the logs / statuses. There is a table called logs which appears to hold the policy log entries which might hold the info you're looking for but there doesn't appear to be any API options for it.

I have looked at accessing the MySQL DB directly before and much prefer using APIs where possible. The main difficulty, apart from not being officially supported, was correlating data from one table to another. Information for individual items you can see in the JSS web interface can be spread over lots of different MySQL tables with no obvious way to correlate them.

View solution in original post

4 REPLIES 4

mm2270
Legendary Contributor III

Not via the API that I'm aware of. You can get a lot of information on the policy's configuration and settings, but not its current complete/not complete status.

Not sure about MySQL, but my uneducated guess would be yes its possible, since the JSS is obviously storing it and displaying it in the JSS console.

davidacland
Honored Contributor II
Honored Contributor II

Looking at the MySQL tables, it seems that policies only hold information about the policy entry itself, rather than the logs / statuses. There is a table called logs which appears to hold the policy log entries which might hold the info you're looking for but there doesn't appear to be any API options for it.

I have looked at accessing the MySQL DB directly before and much prefer using APIs where possible. The main difficulty, apart from not being officially supported, was correlating data from one table to another. Information for individual items you can see in the JSS web interface can be spread over lots of different MySQL tables with no obvious way to correlate them.

djrich29
New Contributor III

Thanks for the info guys!!

vao
New Contributor III

Bump for a feature request in the api...having pass/fail easily pulled from api would be amazing.