Block access to tasks
Blocks a Toloker from accessing tasks.
Request
PUT https://toloka.yandex.com/api/v1/user-restrictions
Authorization: OAuth <OAuth token>
Content-Type: application/JSON
PUT https://sandbox.toloka.yandex.com/api/v1/user-restrictions
Authorization: OAuth <OAuth token>
Content-Type: application/JSON
Headers
Title | Overview |
---|---|
Authorization | A token for account authorization. Add OAuth as a prefix. |
Content-Type | Specifies the data format in the request body. |
Title | Overview |
---|---|
Authorization | A token for account authorization. Add OAuth as a prefix. |
Content-Type | Specifies the data format in the request body. |
Request body
{ "scope": "PROJECT", "user_id": "f25a5f41-94e8-49bf-977f-3611087a16b3", "project_id": "10", "private_comment": "Many mistakes", "will_expire": "2016-04-10T18:08:07" }
Copied to clipboard
Parameter | Overview |
---|---|
scope | string | mandatory The scope of the ban:
|
user_id | string | required Toloker ID. |
project_id | string | mandatory if Required if The ID of the project that is blocked. |
pool_id | string | mandatory if Required if The ID of the pool that is blocked. |
private_comment | string Comments with the reason for blocking access. Maximum length: 499 characters. |
will_expire | string The UTC date and time when access will be restored. It uses ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. |
Parameter | Overview |
---|---|
scope | string | mandatory The scope of the ban:
|
user_id | string | required Toloker ID. |
project_id | string | mandatory if Required if The ID of the project that is blocked. |
pool_id | string | mandatory if Required if The ID of the pool that is blocked. |
private_comment | string Comments with the reason for blocking access. Maximum length: 499 characters. |
will_expire | string The UTC date and time when access will be restored. It uses ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. |
Response
Contains the ban ID and parameters, and the date when access was blocked.
{
"scope": "PROJECT",
"user_id": "f25a5f41-94e8-49bf-977f-3611087a16b3",
"project_id": "10",
"private_comment": "Many mistakes",
"will_expire": "2016-04-10T18:08:07",
"id": "54",
"created": "2016-03-28T18:08:07"
}
Parameter | Overview |
---|---|
scope | string The scope of the ban:
|
user_id | string Toloker ID. |
project_id | string Required if The ID of the project that is blocked. |
pool_id | string Specified if The ID of the pool that is blocked. |
private_comment | string Comments with the reason for blocking access. Maximum length: 499 characters. |
will_expire | string The UTC date and time when access will be restored. It uses ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. |
created | string The UTC date and time of the ban, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. |
id | string ID of the ban. |
Parameter | Overview |
---|---|
scope | string The scope of the ban:
|
user_id | string Toloker ID. |
project_id | string Required if The ID of the project that is blocked. |
pool_id | string Specified if The ID of the pool that is blocked. |
private_comment | string Comments with the reason for blocking access. Maximum length: 499 characters. |
will_expire | string The UTC date and time when access will be restored. It uses ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. |
created | string The UTC date and time of the ban, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. |
id | string ID of the ban. |