> 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/relations.md).

# Relations

The `relations` object is part of the [`task`](/data/importing-and-exporting-annotations/exporting-annotations/ango-export-format/asset/task.md) object in the Ango Annotation Format. It contains all data pertaining to labels created with *relations*, e.g. not tools, classifications, or brushes.

## General Structure

{% code fullWidth="true" %}

```json
"relations" : [
    {
        from // string, only in single relations, objectID of the object from where the relation starts
        to // string, only in single relations, objectID of the object where the relation stops
        objectId // string, ID of the relation
        schemaId, // string, ID of the relation class in the project
        group // list, only in group relation, the objectIDs of the objects present in the relation
        direction, // string, only in single relations, one of straight, reverse, bidirectional.
        classifications, // list, nested classifications answered on the relation
        title // string, title of the relation class
        page // int, optional, if asset is multi-frame (video, TIFF, DICOM) frame where the relation takes place
    },
    { ... }
]
```

{% endcode %}

## Single Relation

```json
{
    "from": "3d52bc1cd570e28fa9da319",
    "to": "4e8dbe33e3223d9da92e638",
    "objectId": "572c2545502ba09bd661714",
    "schemaId": "8f8e617174718e80bbea268",
    "direction": "straight",
    "classifications": [
        {
            "objectId": "78d263ed59db8dd1dcb4666",
            "schemaId": "4460fa700ef030c4e575604",
            "tool": "radio",
            "title": "Connection type",
            "answer": "Direct",
            "classifications": []
        }
    ],
    "page": 0,
    "title": "Single Relation"
}
```

<table data-full-width="true"><thead><tr><th width="201">Property</th><th width="90.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>from</code></td><td>String</td><td>In single relations only, object ID of the object which was clicked first when setting up the relation.</td></tr><tr><td><code>to</code></td><td>String</td><td>In single relations only, object ID of the object which was clicked second when setting up the relation.</td></tr><tr><td><code>objectId</code></td><td>String</td><td><p>Object ID of the relation. Unique in the asset.</p><pre class="language-json"><code class="lang-json">"objectId": "6b8a4338d299c63b5ee7825"
</code></pre></td></tr><tr><td><code>schemaId</code></td><td>String</td><td><p>ID of the class to which the relation belongs.</p><pre class="language-json"><code class="lang-json">"schemaId": "4460fa700ef030c4e575604"
</code></pre></td></tr><tr><td><code>classifications</code></td><td>List</td><td>Nested classification answers attached to the relation. Each item follows the <a href="/pages/jJ5k9hn01BuZ1WTY4B8q">classification format</a> and can contain further nested classifications.</td></tr><tr><td><code>title</code></td><td>String</td><td><p>Name of the class.</p><pre class="language-json"><code class="lang-json">"title": "Image Projection Type"
</code></pre></td></tr><tr><td><code>direction</code></td><td>String</td><td>In single relations only, direction of the relation. One of:<br><code>straight</code>: The relation has an arrow starting from the object indicated by <code>from</code> and pointing towards the object with the objectID indicated by <code>to</code>.<br><code>reverse</code>: The relation has an arrow starting from the object indicated by <code>to</code> and pointing towards the object with the objectID indicated by <code>from</code>.<br><code>bidirectional</code>: The relation has two arrows, each starting from one of the two objects and pointing towards the other.</td></tr></tbody></table>

{% hint style="info" %}
**See also**

[Single Relation](/labeling/labeling-tools/relation/single-relation.md)
{% endhint %}

## Group Relation

```json
{
    "objectId": "15ff30bd776c19fee934398",
    "schemaId": "37ccadce8a7505b93659450",
    "group": [
        "3d52bc1cd570e28fa9da319",
        "4e8dbe33e3223d9da92e638",
        "4342e79c0c77a8252a7b188"
    ],
    "classifications": [],
    "page": 0,
    "title": "Group Relation"
}
```

<table data-full-width="true"><thead><tr><th width="201">Property</th><th width="90.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>objectId</code></td><td>String</td><td><p>Object ID of the relation. Unique in the asset.</p><pre class="language-json"><code class="lang-json">"objectId": "6b8a4338d299c63b5ee7825"
</code></pre></td></tr><tr><td><code>schemaId</code></td><td>String</td><td><p>ID of the class to which the relation belongs.</p><pre class="language-json"><code class="lang-json">"schemaId": "4460fa700ef030c4e575604"
</code></pre></td></tr><tr><td><code>group</code></td><td>List</td><td>In group relations only, the objectIDs of the objects in the relation.</td></tr><tr><td><code>classifications</code></td><td>List</td><td>Nested classification answers attached to the relation. Each item follows the <a href="/pages/jJ5k9hn01BuZ1WTY4B8q">classification format</a> and can contain further nested classifications.</td></tr><tr><td><code>title</code></td><td>String</td><td><p>Name of the class.</p><pre class="language-json"><code class="lang-json">"title": "Image Projection Type"
</code></pre></td></tr></tbody></table>

{% hint style="info" %}
**See also**

[Group Relation](/labeling/labeling-tools/relation/group-relation.md)
{% endhint %}
