API v4 - Job List

Hello.

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

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct