> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/data/importing-and-exporting-annotations/exporting-annotations/ango-export-format/asset/task.md).

# Task

{% hint style="info" %}
This page is about the `task` object in Ango Hub's export file. For more information on tasks as they are used in Ango Hub, see the page named [Tasks](/core-concepts/tasks.md).
{% endhint %}

The task is the main sub-unit of the [`asset`](/data/importing-and-exporting-annotations/exporting-annotations/ango-export-format/asset.md) object in the Ango Annotation Format. When obtaining an export from Ango Hub, you are essentially getting a list of assets, with each containing a task.

Tasks are what contain the actual labeling data (e.g. points, classifications, relations, etc.) as well as metadata regarding the labeling task (who labeled the asset, when, etc.)

{% hint style="info" %}
When downloading the export, you can pick the stage from which the export will be downloaded. By default, it's the *Complete* stage.

The `task` object contains the annotations as they were provided to and saved in the stage from which you are exporting the asset.

For example, if you have a task go through multiple labeling stages and then to *Complete*, the `task` object will contain the annotations which were sent to *Complete* after the last labeling stage.
{% endhint %}

This page details tasks and their metadata in the Ango Export Format.

## General Structure

{% code fullWidth="true" %}

```json
"task" : {
    taskId              // string, ID of the task
    stage               // string, name of the task (e.g. "Review Stage 2")
    stageId             // string, ID of the stage (e.g. "f9313189-d532-4fa3-ad9e-876af7321f6b")
    startedAt           // string, estimated time work began in the current stage
    updatedAt           // string, last task update time (e.g. "2023-09-01T13:02:49.271Z")
    updatedBy           // string, email of user who last updated task (e.g. "lorenzo@example.com")
    tools               // list, annotation information pertaining to labels created with tools. See below for more.
    classifications     // list, annotation information pertaining to classifications. See below for more.
    relations           // list, annotation information pertaining to relations. See below for more.
    brushDataUrl        // string, signed, expiring URL to PNG mask containing brush traces.
    medicalBrushDataUrl // string, signed, expiring URL to compressed .seg.nrrd segmentation file containing medical brush traces
    stageHistory        // list, contains more 'task' objects for each stage the asset has been through 
    totalDuration       // integer, total duration of the task in milliseconds
    consensusAverage    // integer, from 0 to 100, the consensus score for the task
    consensusDetailed   // list, list of consensus scores for each compatible labeling tool (i.e. class)
}
```

{% endcode %}

`startedAt` is an ISO 8601 timestamp estimating when work began in the exported stage. Ango Hub calculates it when the task is saved or submitted by subtracting the recorded active and idle durations from that update time. After the task leaves the stage, a corresponding `startedAt` value is available in its [`stageHistory`](/data/importing-and-exporting-annotations/exporting-annotations/ango-export-format/stage-history.md) entry.

## Task Object Properties

<table data-full-width="true"><thead><tr><th width="201">Property</th><th width="73">Type</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>taskId</code></td><td>str</td><td>Unique alphanumeric ID assigned to the labeling task.</td><td><pre class="language-json"><code class="lang-json">"taskId": "64e5e5b985eb730015b4ebd9"
</code></pre></td></tr><tr><td><code>stage</code></td><td>str</td><td>Name of the stage from which the task has been exported.</td><td><pre class="language-json"><code class="lang-json">"stage": "Complete"
</code></pre></td></tr><tr><td><code>stageId</code></td><td>str</td><td>Unique ID of the stage from which the task has been exported.<br><br>By default, the first Start, Label, and Complete stages automatically created by Hub on project creation have an ID of "Start", "Label", and "Complete" respectively.</td><td><pre class="language-json"><code class="lang-json">"stageId": "f9313189-d532-4fa3-ad9e-876af7321f6b"
</code></pre></td></tr><tr><td><code>updatedAt</code></td><td>str</td><td>GMT time and date at which the task was last updated in the stage from which the export was obtained.</td><td><pre class="language-json"><code class="lang-json">"updatedAt": "2023-08-23T11:36:38.027Z"
</code></pre></td></tr><tr><td><code>updatedBy</code></td><td>str</td><td>Email of the user who last updated the task in the stage from which the export was obtained.</td><td><pre class="language-json"><code class="lang-json">"updatedBy": "lorenzo@imerit.net"
</code></pre></td></tr><tr><td><code>totalDuration</code></td><td>int</td><td>The time it took, in milliseconds, to label the asset in the stage from which the export was obtained. The timer starts when a user opens the asset and stops when they click on "Submit."<br><br>In the near future, as the <a href="/pages/Dv1zfYgNrYVD6KOtVOQO">idle time detection</a> features come online, the export will contain a more detailed breakdown of time, including active and idle time.</td><td><pre class="language-json"><code class="lang-json">"totalDuration": 49596
</code></pre></td></tr><tr><td><code>tools</code></td><td>List</td><td>Annotation data related to labels created with non-classification and non-relation tools (e.g. bounding box, entity, polygon, etc.)<br><br>This object contains the actual annotation information (e.g. coordinates).<br><br>Documentation for this object can be found at the <a href="/pages/ASXx9113bgd3jAZA2FhN">Tools</a> page.</td><td><pre class="language-json"><code class="lang-json">"tools": [
      {
        "bounding-box": {
          "x": 301.6699801192843,
          "y": 429.05027932960894,
          "height": 173.76536312849163,
          "width": 118.09145129224652
        },
        "objectId": "765742a3b676d3f26898792",
        "classifications": [],
        "metadata": {
          "createdAt": "2023-08-23T11:20:32.792Z",
          "createdBy": "lorenzo@imerit.net",
          "createdIn": "Label"
        },
        "schemaId": "b1c6805d054f0e44ae11500",
        "page": 504,
        "title": "bb"
      }
]
</code></pre></td></tr><tr><td><code>classifications</code></td><td>List</td><td>Annotation data related to labels created with classification tools.<br><br>This object contains the classification questions and answers, as well as classification metadata.<br><br>Documentation for this object can be found at the <a href="/pages/jJ5k9hn01BuZ1WTY4B8q">Classifications</a> page.</td><td><pre class="language-json"><code class="lang-json">"classifications": [
      {
        "objectId": "3d5cd10ba190b29d2850724",
        "schemaId": "6421df1fa34ac13204ea157",
        "tool": "radio",
        "title": "rdo",
        "answer": "1",
        "metadata": {
          "createdAt": "2023-08-23T11:20:51.725Z",
          "createdBy": "lorenzo@imerit.net",
          "createdIn": "Label"
        },
        "classifications": []
      }
]
</code></pre></td></tr><tr><td><code>relations</code></td><td>List</td><td>Annotation data related to labels created with relation tools.<br><br>Documentation for this object can be found at the <a href="/pages/IIJqKAC9Wl6587NuRsky">Relations</a> page.</td><td><pre class="language-json"><code class="lang-json">"relations": [
          {
            "from": "ea5d40fe8a8093fa2680331",
            "to": "4385a5c80ad1ee0e5cd2693",
            "objectId": "c7a5cffbcd8cfaf05a2f248",
            "schemaId": "8f8e617174718e80bbea268",
            "direction": "straight",
            "page": 0,
            "title": "sng"
          }
]
</code></pre></td></tr><tr><td><code>brushDataUrl</code></td><td>str</td><td>URL pointing to a PNG image file containing the brush traces created on the asset with Brush tools.<br><br>Only one such URL is generated for each asset.<br><br>The URL is valid for 120000 seconds from its creation (e.g. time of export).<br><br>The resulting PNG will be a file with the same width and height as the original asset, it will have a transparent background, and brush traces will be drawn on it with a color with the same hex value as the color of the brush tool used.</td><td><pre class="language-json"><code class="lang-json">"brushDataUrl": "https://angohub-private-assets.s3.eu-central-1.amazonaws.com/64f1de0ca7fabb00150e9b53-1693573237278.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&#x26;X-Amz-Credential=AKIATAGM6WLISC5CRH7S%2F20230901%2Feu-central-1%2Fs3%2Faws4_request&#x26;X-Amz-Date=20230901T131148Z&#x26;X-Amz-Expires=120000&#x26;X-Amz-Signature=eecea8981441f531ab947d6bcaf5e5c0ad2c6525f4def969ff67ad2e4b6227d5&#x26;X-Amz-SignedHeaders=host&#x26;x-id=GetObject"
</code></pre></td></tr><tr><td><code>medicalBrushDataUrl</code></td><td>str</td><td>URL pointing to a compressed <code>.seg.nrrd</code> file containing the segmentations created on the asset with Medical Brush tools.<br><br>Only one such URL is generated for each asset.<br><br>The URL is valid for 120000 seconds from its creation (e.g. time of export).</td><td><pre class="language-json"><code class="lang-json">"medicalBrushDataUrl": "https://angohub-private-assets.s3.eu-central-1.amazonaws.com/medical-uncompressed-nifti-2023-09-01-13_03_01_GMT.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&#x26;X-Amz-Credential=AKIATAGM6WLISC5CRH7S%2F20230901%2Feu-central-1%2Fs3%2Faws4_request&#x26;X-Amz-Date=20230901T131148Z&#x26;X-Amz-Expires=120000&#x26;X-Amz-Signature=84d94e319ac5b6ecc7a6e1e39829b697c064dabe54815a6459b9bcaf9f53eb84&#x26;X-Amz-SignedHeaders=host&#x26;x-id=GetObject"
</code></pre></td></tr><tr><td><code>stageHistory</code></td><td>List</td><td>If enabled in export settings, <code>stageHistory</code> contains one <code>task</code> objects of the asset for each of the previous stages the asset has passed through.<br><br>For example, if the asset went through Start -> Label -> Review -> Complete, and you obtained the export for Complete, the stageHistory object will list three <code>task</code> objects, one each for Start, Label, and Review.<br><br>In each, you will get the state of the task as it was when it left its stage.</td><td><pre class="language-json"><code class="lang-json">"stageHistory": [
      {
        "stage": "Start",
        "stageId": "Start",
        "duration": 0,
        "completedAt": "2023-08-23T10:55:53.495Z",
        "tools": [],
        "classifications": [],
        "relations": []
      }, { ... }
]
</code></pre></td></tr><tr><td><code>consensusAverage</code></td><td>int</td><td>The consensus score for this task, from 0 to 100.</td><td><pre class="language-json"><code class="lang-json">"consensusAverage": 39
</code></pre></td></tr><tr><td><code>consensusDetailed</code></td><td>List</td><td>A list of consensus scores for each consensus-compatible labeling tool (i.e. class) in the task.</td><td><pre class="language-json"><code class="lang-json">"consensusDetailed": [
      {
        "score": "100",
        "schemaId": "5b803d45s221s",
        "title": "Vehicle"
      }, { ... }
]
</code></pre></td></tr></tbody></table>

<details>

<summary>Sample Task</summary>

```json
{
    "taskId": "64e5e5b985eb730015b4ebd9",
    "stage": "Complete",
    "stageId": "Complete",
    "updatedAt": "2023-08-23T11:36:38.027Z",
    "updatedBy": "lorenzo@imerit.net",
    "totalDuration": 49596,
    "tools": [
        {
            "bounding-box": {
                "x": 301.6699801192843,
                "y": 429.05027932960894,
                "height": 173.76536312849163,
                "width": 118.09145129224652
            },
            "objectId": "765742a3b676d3f26898792",
            "classifications": [],
            "metadata": {
                "createdAt": "2023-08-23T11:20:32.792Z",
                "createdBy": "lorenzo@imerit.net",
                "createdIn": "Label"
            },
            "schemaId": "b1c6805d054f0e44ae11500",
            "page": 504,
            "title": "bb"
        },
        {
            "polygon": [
                [
                    593.6779324055666,
                    1121.9664804469273
                ],
                [
                    443.3797216699801,
                    1349.36312849162
                ],
                [
                    576.5009940357853,
                    1375.1061452513966
                ]
            ],
            "objectId": "408deff4664cc342d236127",
            "classifications": [],
            "metadata": {
                "createdAt": "2023-08-23T11:20:37.127Z",
                "createdBy": "lorenzo@imerit.net",
                "createdIn": "Label"
            },
            "schemaId": "a966c7799383465850cd803",
            "page": 504,
            "title": "gon"
        },
        {
            "objectId": "765742a3b676d3f26898792",
            "schemaId": "b1c6805d054f0e44ae11500",
            "classifications": [],
            "bounding-box": {
                "x": 801.948310139165,
                "y": 1428.7374301675977,
                "height": 173.76536312849163,
                "width": 118.09145129224652
            },
            "metadata": {
                "createdAt": "2023-08-23T11:20:40.952Z",
                "createdBy": "lorenzo@imerit.net",
                "createdIn": "Label"
            },
            "page": 506,
            "title": "bb"
        },
        {
            "objectId": "408deff4664cc342d236127",
            "schemaId": "a966c7799383465850cd803",
            "classifications": [],
            "polygon": [
                [
                    217.93240556660038,
                    229.54189944134077
                ],
                [
                    67.63419483101391,
                    456.9385474860335
                ],
                [
                    200.75546719681907,
                    482.68156424581
                ]
            ],
            "metadata": {
                "createdAt": "2023-08-23T11:20:42.215Z",
                "createdBy": "lorenzo@imerit.net",
                "createdIn": "Label"
            },
            "page": 506,
            "title": "gon"
        }
    ],
    "classifications": [
        {
            "objectId": "3d5cd10ba190b29d2850724",
            "schemaId": "6421df1fa34ac13204ea157",
            "tool": "radio",
            "title": "rdo",
            "answer": "1",
            "metadata": {
                "createdAt": "2023-08-23T11:20:51.725Z",
                "createdBy": "lorenzo@imerit.net",
                "createdIn": "Label"
            },
            "classifications": []
        },
        {
            "objectId": "f4e53917c222c8e62dbb715",
            "schemaId": "1ea7a275ce5c9cf30a6f148",
            "tool": "checkbox",
            "title": "chk",
            "answer": [
                "1"
            ],
            "metadata": {
                "createdAt": "2023-08-23T11:20:52.716Z",
                "createdBy": "lorenzo@imerit.net",
                "createdIn": "Label"
            },
            "classifications": []
        },
        {
            "objectId": "0b057a52a2bb648b197f180",
            "schemaId": "a2b4a50bb90eb6523b88376",
            "tool": "single-dropdown",
            "title": "sdr",
            "answer": "1",
            "metadata": {
                "createdAt": "2023-08-23T11:20:54.180Z",
                "createdBy": "lorenzo@imerit.net",
                "createdIn": "Label"
            },
            "classifications": []
        },
        {
            "objectId": "19ae5491832a3bd42704684",
            "schemaId": "11f6ed8e4ac4852d3422341",
            "tool": "multi-dropdown",
            "title": "mdr",
            "answer": [
                "1"
            ],
            "metadata": {
                "createdAt": "2023-08-23T11:20:55.684Z",
                "createdBy": "lorenzo@imerit.net",
                "createdIn": "Label"
            },
            "classifications": []
        },
        {
            "objectId": "7ed41243066d9b09e652723",
            "schemaId": "c2b5eb27e55b186f84f3898",
            "tool": "tree-dropdown",
            "title": "tre",
            "answer": [
                "1",
                "1 / 2"
            ],
            "metadata": {
                "createdAt": "2023-08-23T11:20:59.723Z",
                "createdBy": "lorenzo@imerit.net",
                "createdIn": "Label",
                "updatedAt": "2023-08-23T11:21:01.940Z",
                "updatedBy": "lorenzo@imerit.net",
                "updatedIn": "Label"
            },
            "classifications": []
        },
        {
            "objectId": "bde3bab1fbdbcecdc891100",
            "schemaId": "6590a72d09f1760a4578032",
            "tool": "text",
            "title": "txt",
            "answer": "2",
            "metadata": {
                "createdAt": "2023-08-23T11:21:01.100Z",
                "createdBy": "lorenzo@imerit.net",
                "createdIn": "Label"
            },
            "classifications": []
        }
    ],
    "relations": [],
    "stageHistory": [
        {
            "stage": "Start",
            "stageId": "Start",
            "duration": 0,
            "completedAt": "2023-08-23T10:55:53.495Z",
            "tools": [],
            "classifications": [],
            "relations": []
        },
        {
            "stage": "Label",
            "stageId": "Label",
            "duration": 46753,
            "completedAt": "2023-08-23T11:21:04.393Z",
            "completedBy": "lorenzo@imerit.net",
            "tools": [
                {
                    "bounding-box": {
                        "x": 301.6699801192843,
                        "y": 429.05027932960894,
                        "height": 173.76536312849163,
                        "width": 118.09145129224652
                    },
                    "objectId": "765742a3b676d3f26898792",
                    "classifications": [],
                    "schemaId": "b1c6805d054f0e44ae11500",
                    "page": 504,
                    "title": "bb"
                },
                {
                    "polygon": [
                        [
                            593.6779324055666,
                            1121.9664804469273
                        ],
                        [
                            443.3797216699801,
                            1349.36312849162
                        ],
                        [
                            576.5009940357853,
                            1375.1061452513966
                        ]
                    ],
                    "objectId": "408deff4664cc342d236127",
                    "classifications": [],
                    "schemaId": "a966c7799383465850cd803",
                    "page": 504,
                    "title": "gon"
                },
                {
                    "objectId": "765742a3b676d3f26898792",
                    "schemaId": "b1c6805d054f0e44ae11500",
                    "classifications": [],
                    "bounding-box": {
                        "x": 801.948310139165,
                        "y": 1428.7374301675977,
                        "height": 173.76536312849163,
                        "width": 118.09145129224652
                    },
                    "page": 506,
                    "title": "bb"
                },
                {
                    "objectId": "408deff4664cc342d236127",
                    "schemaId": "a966c7799383465850cd803",
                    "classifications": [],
                    "polygon": [
                        [
                            217.93240556660038,
                            229.54189944134077
                        ],
                        [
                            67.63419483101391,
                            456.9385474860335
                        ],
                        [
                            200.75546719681907,
                            482.68156424581
                        ]
                    ],
                    "page": 506,
                    "title": "gon"
                }
            ],
            "classifications": [
                {
                    "objectId": "3d5cd10ba190b29d2850724",
                    "schemaId": "6421df1fa34ac13204ea157",
                    "tool": "radio",
                    "title": "rdo",
                    "answer": "1",
                    "classifications": []
                },
                {
                    "objectId": "f4e53917c222c8e62dbb715",
                    "schemaId": "1ea7a275ce5c9cf30a6f148",
                    "tool": "checkbox",
                    "title": "chk",
                    "answer": [
                        "1"
                    ],
                    "classifications": []
                },
                {
                    "objectId": "0b057a52a2bb648b197f180",
                    "schemaId": "a2b4a50bb90eb6523b88376",
                    "tool": "single-dropdown",
                    "title": "sdr",
                    "answer": "1",
                    "classifications": []
                },
                {
                    "objectId": "19ae5491832a3bd42704684",
                    "schemaId": "11f6ed8e4ac4852d3422341",
                    "tool": "multi-dropdown",
                    "title": "mdr",
                    "answer": [
                        "1"
                    ],
                    "classifications": []
                },
                {
                    "objectId": "7ed41243066d9b09e652723",
                    "schemaId": "c2b5eb27e55b186f84f3898",
                    "tool": "tree-dropdown",
                    "title": "tre",
                    "answer": [
                        "1",
                        "1 / 2"
                    ],
                    "classifications": []
                },
                {
                    "objectId": "bde3bab1fbdbcecdc891100",
                    "schemaId": "6590a72d09f1760a4578032",
                    "tool": "text",
                    "title": "txt",
                    "answer": "2",
                    "classifications": []
                }
            ],
            "relations": []
        },
        {
            "stage": "Review",
            "stageId": "5e8f78a7-ef6a-473d-b02f-f4024c9ee486",
            "duration": 2843,
            "reviewStatus": "Accepted",
            "completedAt": "2023-08-23T11:36:38.074Z",
            "completedBy": "lorenzo@imerit.net",
            "tools": [
                {
                    "bounding-box": {
                        "x": 301.6699801192843,
                        "y": 429.05027932960894,
                        "height": 173.76536312849163,
                        "width": 118.09145129224652
                    },
                    "objectId": "765742a3b676d3f26898792",
                    "classifications": [],
                    "schemaId": "b1c6805d054f0e44ae11500",
                    "page": 504,
                    "title": "bb"
                },
                {
                    "polygon": [
                        [
                            593.6779324055666,
                            1121.9664804469273
                        ],
                        [
                            443.3797216699801,
                            1349.36312849162
                        ],
                        [
                            576.5009940357853,
                            1375.1061452513966
                        ]
                    ],
                    "objectId": "408deff4664cc342d236127",
                    "classifications": [],
                    "schemaId": "a966c7799383465850cd803",
                    "page": 504,
                    "title": "gon"
                },
                {
                    "objectId": "765742a3b676d3f26898792",
                    "schemaId": "b1c6805d054f0e44ae11500",
                    "classifications": [],
                    "bounding-box": {
                        "x": 801.948310139165,
                        "y": 1428.7374301675977,
                        "height": 173.76536312849163,
                        "width": 118.09145129224652
                    },
                    "page": 506,
                    "title": "bb"
                },
                {
                    "objectId": "408deff4664cc342d236127",
                    "schemaId": "a966c7799383465850cd803",
                    "classifications": [],
                    "polygon": [
                        [
                            217.93240556660038,
                            229.54189944134077
                        ],
                        [
                            67.63419483101391,
                            456.9385474860335
                        ],
                        [
                            200.75546719681907,
                            482.68156424581
                        ]
                    ],
                    "page": 506,
                    "title": "gon"
                }
            ],
            "classifications": [
                {
                    "objectId": "3d5cd10ba190b29d2850724",
                    "schemaId": "6421df1fa34ac13204ea157",
                    "tool": "radio",
                    "title": "rdo",
                    "answer": "1",
                    "classifications": []
                },
                {
                    "objectId": "f4e53917c222c8e62dbb715",
                    "schemaId": "1ea7a275ce5c9cf30a6f148",
                    "tool": "checkbox",
                    "title": "chk",
                    "answer": [
                        "1"
                    ],
                    "classifications": []
                },
                {
                    "objectId": "0b057a52a2bb648b197f180",
                    "schemaId": "a2b4a50bb90eb6523b88376",
                    "tool": "single-dropdown",
                    "title": "sdr",
                    "answer": "1",
                    "classifications": []
                },
                {
                    "objectId": "19ae5491832a3bd42704684",
                    "schemaId": "11f6ed8e4ac4852d3422341",
                    "tool": "multi-dropdown",
                    "title": "mdr",
                    "answer": [
                        "1"
                    ],
                    "classifications": []
                },
                {
                    "objectId": "7ed41243066d9b09e652723",
                    "schemaId": "c2b5eb27e55b186f84f3898",
                    "tool": "tree-dropdown",
                    "title": "tre",
                    "answer": [
                        "1",
                        "1 / 2"
                    ],
                    "classifications": []
                },
                {
                    "objectId": "bde3bab1fbdbcecdc891100",
                    "schemaId": "6590a72d09f1760a4578032",
                    "tool": "text",
                    "title": "txt",
                    "answer": "2",
                    "classifications": []
                }
            ],
            "relations": []
        }
    ]
}
```

</details>
