Categorical Attributes

Each key-value defining a categorical attribute should have the following structure:

  • key: a short string that serves as the identifier for the attribute
  • value: an object that should have the following keys:
    • description: a human-readable string describing the attribute to a labeler.
    • choices: a list of strings corresponding to the categorical choices.
    • type (default category): a string describing the type of attribute. Must be category for categorical attributes.
    • conditions (optional): a JSON that describes the conditions under which this attribute should be collected.
    • allow_multiple (optional): a boolean value, if true, allows multiple values to be selected. The response will be an array of values.

Request Example

{
  ...
  "annotation_attributes": {
    "example_attribute": {
      "type": "category",
      "description": "What is the answer to this example question?",
      "choices": [
        "Answer1",
        "Answer2"
      ],
      "allow_multiple": true
    }
  }
 ...
}

Response Examples

{
  "example_attribute": "Answer1"
}
{
  "example_attribute": [
    "Answer1",
    "Answer2"
  ]
}