API v4 - Job List
In API v3 we have linode.job.list(). It was useful to wait for shutdown, reboot, resize disks, etc.
It was very simple to apply in php:
$pending = '';
while (!$pending) {
$send = filegetcontents("https://api.linode.com/?apikey=xxx&apiaction=linode.job.list&LinodeID=$linodeId&pendingOnly=1");
$update = json_decode($send, TRUE);
sleep(10);
if (empty($update['DATA'])){
$pending = true;//when $update['DATA'] returns empty: there is no more jobs pending
}
How do I verify pending jobs in API v4?
Regards
Fabricio