Yes, this API seems to allow me to do what I want.
Code is going to be convoluted, I need to navigate though all the nodes, navigate through all the LXVs and VMs on the node and then get the last task run for in that node for that vmid and if it's no "OK", raise the issue.
Not the easiest...