Overview

  1. Overview
  2. Sample filter in JSON
  3. Parameters

Overview

You can choose which users will have access to pool tasks. For example, you can select users by region, skill, or type of browser (desktop or mobile).

To set up user filtering for a pool, add the filter JSON object to the pool. A sample filter in JSON with parameter description is shown below.

Sample filter in JSON

This example selects users from Russia and Ukraine for completing tasks (it uses the region detected from the user's IP address and the country specified in the profile). Users must have a minimum skill level of 60 for the control page results.

{
   "and":[
      {
         "or":[
            {
               "category":"computed",
               "key":"region_by_ip",
               "operator":"IN",
               "value":225
            },
            {
               "category":"computed",
               "key":"region_by_ip",
               "operator":"IN",
               "value":187
            }
         ]
      },
      {
               "category":"profile",
               "key":"country",
               "operator":"EQ",
               "value":"RU"
           },
      {
               "category":"skill",
               "key":"2",
               "operator":"GTE",
               "value":"60"
        }
   ]
}
Copied to clipboard

Parameters

Note. The and and or parameters must be lowercase.

Parameter

Overview

category

string | required

Group of data for filtering:

  • skill — The skill.

  • profile — Profile data.

  • computed — Computed data, such as the user's region according to the IP address.

key

string | required

Attribute to use for filtering users. For example, the country (country), or a skill (specify the skill ID).

operator

string | required

Comparison operator in the condition. For example, the condition “User must be 18 or older” uses the date of birth and the GTE (“Greater than or equal to”) operator. Possible values for the operator key depend on the type of data in the value field. To choose the correct value, see the descriptions of filters in the sections Filter by profile data, Filter by calculated data, Filter by skills.

Note. The operator value must be lowercase.

value

boolean, string, list of strings, integer | required

The value of the attribute from the key field. For example, the ID of the region specified in the profile, or the minimum skill value. To choose the correct value, see the descriptions of filters in the sections Filter by profile data, Filter by calculated data, Filter by skills.

Parameter

Overview

category

string | required

Group of data for filtering:

  • skill — The skill.

  • profile — Profile data.

  • computed — Computed data, such as the user's region according to the IP address.

key

string | required

Attribute to use for filtering users. For example, the country (country), or a skill (specify the skill ID).

operator

string | required

Comparison operator in the condition. For example, the condition “User must be 18 or older” uses the date of birth and the GTE (“Greater than or equal to”) operator. Possible values for the operator key depend on the type of data in the value field. To choose the correct value, see the descriptions of filters in the sections Filter by profile data, Filter by calculated data, Filter by skills.

Note. The operator value must be lowercase.

value

boolean, string, list of strings, integer | required

The value of the attribute from the key field. For example, the ID of the region specified in the profile, or the minimum skill value. To choose the correct value, see the descriptions of filters in the sections Filter by profile data, Filter by calculated data, Filter by skills.