Digital Toolkit

Details

Consumer API > API Reference > v0 > Task Events > Details

Basic Task Events


All tasks have a TaskStarted task event for when that task started:

{ "type": "TaskStarted", "date": "2011-07-26T23:21:19.792Z" }

and a TaskEnded task event for when the task ended whether it be success, failure, or a timeout:

{ "type": "TaskEnded", "date": "2011-07-26T23:21:23.242Z" }

Retrieving task events

There are two methods of retrieving a task’s events: Blocking and a plain GET.

- The endpoint that takes a sinceVersion parameter blocks for up to
7 seconds until it sees another task event and returns task events
since the version parameter.

- The "plain get" without the sinceVersion parameter just returns
everything it currently has with no blocking.

It is much preferable to use the blocking request over polling a plain GET request as results will be realtime and much less strain on the server and client.


Have a Question?
Have a how-to question? Seeing a weird error? Get help on StackOverflow.
Register for the Digital Toolkit Meetup where we answer technical Q&A from the audience.
Last updated Mon Jul 24 2023