When you build a connector and add data to Teamwork Graph, creating relationships between your objects and other data in the graph is essential for unlocking the full value of that data. Relationships enable Teamwork Graph to "connect the dots" across different tools and data sources, making your data discoverable, actionable, and valuable in Atlassian experiences.
This guide explains why relationships matter and how to create them using the Teamwork Graph connector SDK.
By defining relationships, you empower downstream features and integrations to deliver richer insights, automation, and user experiences, such as:
Rovo: Rovo can query existing relationships to answer customer questions more intelligently. For example, this community post highlights how Rovo Chat leverages relationships to provide relevant answers.
Analytics: Relationships make it possible to build dashboards that connect and visualize data across systems. For example, we're collaborating with EAP partners to build charts that track how test case statuses change over time for specific work items or epics. This is possible by linking work items and epics to their related test cases and statuses in Teamwork Graph.
Custom applications, agents, and automation workflows: By establishing relationships between entities when you ingest data into Teamwork Graph, you lay the foundation for powerful custom solutions. The Teamwork Graph API allows you to build applications, agents, and automation workflows that can query and act on these relationships.
Relationships can be created in a few ways via the setObjects operation:
Through the parentKey and containerKey attributes, indicating a relationship between the ingested object and its parent or container.
Through attributes that relate to a user, such as createdBy or owners.
Through the associations attribute, which provides a way to generically link objects.
An object can have a parent or container defined through the parentKey or containerKey attribute. The type of this is equivalent - the Entity key.
For example, ingesting a Document object with a parent Document:
1 2{ id: document-1, parentKey: { type: 'atlassian:document', value: { entityId: document-2 } } }
While the API supports any object type being used as a parent or container, some combinations create defined relationships in the Teamwork Graph:
| Object type | Association type | Relationship object type | Relationship created |
|---|---|---|---|
| Branch | containerKey | atlassian:repository | Branch in a repository |
| Commit | containerKey | atlassian:repository | Commit in a repository |
| Deployment | containerKey | atlassian:repository | Deployment associated to a repository |
| Message | containerKey | atlassian:conversation | Conversation has a message |
| Pull request | containerKey | atlassian:repository | Pull request in a repository |
| Comment | parentKey | atlassian:pull-request | Pull request has a comment |
| Document | parentKey | atlassian:document | Parent document has a child document |
| Message | parentKey | atlassian:message | Parent message has a child message |
Relationships can be ingested through the associations property of an object to create a link between your object and another object.
For example, this list of associations creates a relationship between the ingested object and a Jira work item:
1 2associations: { set: { associationType: "issueIdOrKeys", values: ["ABC-123"] } }
The maximum number of associations for an object is 500.
Teamwork Graph supports the following association types:
An association type referencing work items in Jira.
| Property | Type | Description |
|---|---|---|
associationType | "issueIdOrKeys" | Defines the associationType as "issueIdOrKeys". |
values | list<String> | List of Jira issueId or issueKeys. For example, 10001 or ABC-123 |
An association type referencing another object you have sent. You do not need to ingest the object before you associate with it - a stub will be created in place, until the full object is ingested.
| Property | Type | Description |
|---|---|---|
associationType | "atlassian:<objectType>" | Defines the associationType as a specific object type, for example, atlassian:document. |
values | list<entityKey> | List of Teamwork Graph object keys. For example:
|
Not all object types can be associated with another Teamwork Graph object type. At the moment, we only support the following use cases:
| Object type | Association type | Relationship created |
|---|---|---|
| Branch | issueIdOrKeys | Jira work item associated with a branch |
| Calendar event | atlassian:document | Documents linked to a calendar event |
| Calendar event | issueIdOrKeys | Jira work item associated with a calendar event |
| Commit | issueIdOrKeys | Jira work item associated with a commit |
| Conversation | issueIdOrKeys | Jira work item mentioned in a conversation |
| Deployment | atlassian:deployment | Deployment associated with a deployment |
| Deployment | atlassian:commit | Deployment contains a commit |
| Deployment | issueIdOrKeys | Jira work item associated with a deployment |
| Design | issueIdOrKeys | Jira work item associated with a design |
| Document | issueIdOrKeys | Jira work item associated with a document |
| Message | issueIdOrKeys | Jira work item mentioned in a message |
| Pull request | atlassian:commit | Commit belongs to a pull request |
| Pull request | issueIdOrKeys | Jira work item associated with a pull request |
Rate this page: