Before you start
- An Iru API token with MCP turned on and permissions that cover the calls below (recipe 1).
- The device ID and the name of the Library Item that failed.
Prompt for your agent
List the Library Items on the device with ID [device ID] using GET /api/v1/devices/{device_id}/library-items. Find [Library Item name] and show me its status, reported_at, log, last_audit_run, last_audit_log, control_log and item_id. Tell me which of these fields hold text about the failure. Then read that item's activity with GET /api/v1/library/library-items/{library_item_id}/activity, using the item_id from the first call. Show me every entry from newest to oldest with its activity_type, activity_time and user_email, and point out any edit or assignment change made shortly before the failure.
Steps
Read the item's status on the device
The call returns every Library Item on the device with its
status,log,last_audit_run,last_audit_log,control_loganditem_id. A failed audit shows asERROR, and a configuration profile that failed to install shows asfailed.The log fields in the example are empty, so have the agent say which field held the failure text.
GET/api/v1/devices/{device_id}/library-itemsRead the item's activity log
Activity comes back from newest to oldest. The
activity_typevalues arelibrary_item_created,library_item_edited,library_item_deleted,library_item_duplicatedandlibrary_item_assignment_changed, and each entry names the user who made the change.Use this log to find out whether someone edited the item or changed its assignment before the failure.
GET/api/v1/library/library-items/{library_item_id}/activityCompare with the Status tab
In the web app, open the Library Item, select the Status tab and expand the device to see its last install status, including Last Audit, Last Install and the associated errors.
Retry after you fix the cause
Some Library Items stop after a failed install. Once you have resolved the cause, select Flush next to the device on the Status tab and Iru attempts the installation again. Flush applies to Apple devices.
Source: Using the Flush Action
Common pitfalls
- The activity log records changes to the item itself, such as edits and assignment changes. The device's own status and log fields hold the failure details.
- An Error status generates an alert, so check Alerts in the top navigation for the matching entry.
- Flush only after you have identified and resolved the cause, or the install fails again.
FAQ
Which API call shows a Library Item's status on one device?
GET /api/v1/devices/{device_id}/library-items returns every Library Item on the device with its status and log fields.
What does the Library Item activity log show?
GET /api/v1/library/library-items/{library_item_id}/activity lists changes to the item from newest to oldest, such as edits and assignment changes.
What happens when a Library Item fails?
The item shows Error status on the device and Iru generates an alert.
How do I retry a failed Library Item?
After you resolve the cause, select Flush next to the device on the item's Status tab. Flush applies to Apple devices.