Toloka documentation


toloka.client.actions.Restriction | Source code

    scope: Union[UserRestriction.Scope, str, None] = None,
    duration_days: Optional[int] = None,
    private_comment: Optional[str] = None

Block access to projects or pools

It's better to use new version: RestrictionV2.

Parameters Description

Parameters Type Description
scope Union[UserRestriction.Scope, str, None]

  • POOL - Current pool where this rule was triggered. Does not affect the user's rating.
  • PROJECT - Current project where this rule was triggered. Affects the user's rating.
  • ALL_PROJECTS - All customer's projects.

duration_days Optional[int]

Blocking period in days. By default, the lock is indefinite.

private_comment Optional[str]

Comment (reason for blocking). Available only to the customer.