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 or LabelDescription objects corresponding to the categorical choices.type
(defaultcategory
): a string describing the type of attribute. Must becategory
for categorical attributes.conditions
(optional): a JSON that describes the conditions under which this attribute should be collected.allow_multiple
(optional): a boolean value, iftrue
, allows multiple values to be selected. The response will be an array of values.
Request Example
{
"geometries": {
...
},
"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"
]
}