If I'm understanding what you're asking correctly, this may fit the bill:
https://github.com/MatthewPrins/Jamf/blob/main/Policies_Completed.py
It prints a report of all completed policies for every given computer in a computer group. If there's more information you need for your report, let me know and I can make some quick edits.
If I'm understanding what you're asking correctly, this may fit the bill:
https://github.com/MatthewPrins/Jamf/blob/main/Policies_Completed.py
It prints a report of all completed policies for every given computer in a computer group. If there's more information you need for your report, let me know and I can make some quick edits.
I was already able to get some similar results on my end, but I would need to get the detailed output of the script ran by the policy and not just the policy completion status
I was already able to get some similar results on my end, but I would need to get the detailed output of the script ran by the policy and not just the policy completion status
You may be out of luck with the API then, because this is the format of the logs through the API:
{'policy_id': 6, 'policy_name': 'Enforced Computer Names', 'username': 'xxxxxx', 'date_completed': '2022/07/11 at 4:39 PM', 'date_completed_epoch': 1657557575000, 'date_completed_utc': '2022-07-11T16:39:35.000+0000', 'status': 'Completed'}
No field for the details, unfortunately. Your best bet might be through writing a script for an extension attribute that pulls the information you need off the computer, and then getting a report from either a API call or a saved computer search.