Configuration for Template Builder

If, when creating a project, you specified the Editor type — Template Builder ("type": "tb") in the Task Interface parameters (view_spec), then specify the configuration for Template Builder in serialized JSON format in the config parameter.

Configuration example

Alert

Be sure to serialize the JSON code before passing it as the config parameter value.

Example of serialized JSON code

"config": "{\"view\": {\"type\": \"view.list\", \"items\": [{\"type\": \"view.image\", \"ratio\": [1, 1], \"rotatable\": true, \"url\": {\"type\": \"data.input\", \"path\": \"image\"}}, {\"type\": \"field.button-radio-group\", \"label\": \"What type of shoes do you see?\", \"options\": [{\"label\": \"Boots\", \"value\": \"boots\" }, {\"label\": \"Sneakers\", \"value\": \"sneakers\"}, {\"label\": \"Other\", \"value\": \"other\"}], \"validation\": {\"type\": \"condition.required\", \"hint\": \"choose one of the options\"}, \"data\": {\"type\": \"data.output\", \"path\": \"result\"}}]}, \"plugins\": [{\"type\": \"plugin.toloka\", \"layout\": {\"kind\": \"scroll\", \"taskWidth\": 500}}, {\"1\": {\"type\": \"action.set\", \"data\": {\"type\": \"data.output\", \"path\": \"result\"}, \"payload\": \"boots\"}, \"2\": {\"type\": \"action.set\", \"data\": {\"type\": \"data.output\", \"path\": \"result\"}, \"payload\": \"sneakers\"}, \"3\": {\"type\": \"action.set\", \"data\": {\"type\": \"data.output\", \"path\": \"result\"}, \"payload\": \"other\"}, \"type\": \"plugin.hotkeys\"}]}"
JSON code from the example above before serialization
Contact support

Last updated: July 4, 2023

Toloka API
OverviewAccessing the APIRate limiting
Quick start
Configuration for Template BuilderToloker selection
Quality control rules
Filters
Task actions
Subscriptions to events
Reference
Project
Pool
Training
Webhook-subscription
Skill
User-restriction
Task
Task-suite
Operation
Assignment
Attachment
Aggregated-solution
User-bonus
Message-thread
User-metadata
Requester
All classes and methods