create_app_items

toloka.client.TolokaClient.create_app_items | Source code

Creates task items in an App project in Toloka and adds them to an existing batch.

Parameters description

ParametersTypeDescription
app_project_idstr

The ID of the App project.

batch_idOptional[str]

The ID of the batch to place items to.

itemsOptional[List[Dict[str, Any]]]

A list with items. The items must follow the solution schema described in App.input_spec.

  • Returns:

    The IDs of created app items.

  • Return type:

    List[str]

Examples:

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

new_items = [
{'id':'20', 'query':'toloka kit', 'website_url':'https://toloka.ai/docs/toloka-kit'},
{'id':'21', 'query':'crowd kit', 'website_url':'https://toloka.ai/docs/crowd-kit'}
]
toloka_client.create_app_items(
app_project_id='Q2d15QBjpwWuDz8Z321g',
batch_id='4Va2BBWKL88S4QyAgVje',
items=new_items
)

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