Get task details

Get the detailed information about the task with the ID specified in the request.

Steps to follow

1. Import Toloka-Kit

Connect the Toloka-Kit library to your script.

import toloka.client as toloka

2. Instantiate TolokaClient

Replace the sample API key with your own one.

toloka_client = toloka.
TolokaClient
('PlaceYourRealApiKey_Here', 'PRODUCTION');

3. Get task information

Find out the ID of the task for which you want to get the detailed information. Then get this info calling the get_task() method.

task = toloka_client.
get_task
('000012bb84--62d80429f20bf20e50f36a27')

4. Print task ID, overlap, and creation date

The get_task() request will return the Task class object. You can use its attributes to print the information you need.

print(task.id, task.overlap, task.created.date())

You should get an output with the task ID, overlap, and creation date which looks like this.

00022da5a7--6388b40547c84000494cdc58 3 2022-12-01

Complete code: Get task details

import toloka.client as toloka
toloka_client = toloka.TolokaClient('PlaceYourRealApiKey_Here', 'PRODUCTION')
task = toloka_client.get_task('000012bb84--62d80429f20bf20e50f36a27')
print(task.id, task.overlap, task.created.date())
List of classes and methods used in this recipe

See also

Last updated: February 7, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming