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
Toloka API
OverviewAccessing the APIRate limiting
Quick start
Reference
Project
Pools
Training
Subscriptions to events
Toloker selection
Ways to upload tasks
Tasks
Task suites
Tracking operations
Getting responses
Checking completed tasks
Rewards
Messages for Tolokers
Various parameters
Libraries