create_app_item

toloka.client.TolokaClient.create_app_item | Source code

Creates an App task item in Toloka.

Parameters description

ParametersTypeDescription
app_project_idstr

The ID of the App project to create the item in.

id-

The ID of the item.

app_project_idstr

The ID of the project that contains the item.

batch_idOptional[str]

The ID of the batch that contains the item.

input_dataOptional[Dict[str, Any]]

Input data. It must follow the solution schema described in App.input_spec.

status-

The item status:

  • NEW — The item is uploaded to Toloka and ready for processing.
  • PROCESSING — The item is being processed by Tolokers.
  • COMPLETED — Item annotation is completed.
  • ERROR — An error occurred during processing.
  • CANCELLED — Item processing cancelled.
  • ARCHIVE — The item is archived.
  • NO_MONEY — There are not enough money for processing.
output_data-

Annotated data.

errors-

Errors occurred during annotation.

created_at-

The date and time when the item was created.

started_at-

The date and time when the item processing started.

finished_at-

The date and time when the item processing was completed.

  • Returns:

    Created App task item with updated parameters.

  • Return type:

    AppItem

Examples:

The following example is suitable for a project that requires query and website_url keys to be present in input data.

new_item = {
'batch_id' : '4Va2BBWKL88S4QyAgVje',
'input_data' : {
'id':'40', 'query':'toloka kit', 'website_url':'https://toloka.ai/docs/toloka-kit'
}
}
new_item = toloka_client.create_app_item(
app_project_id='Q2d15QBjpwWuDz8Z321g', app_item=new_item
)
print(new_item.created_at)

Last updated: August 28, 2023

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