Developer
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Last updated Nov 19, 2025

Create relationships

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.

Why create relationships

By defining relationships, you empower downstream features and integrations to deliver richer insights, automation, and user experiences, such as:

How to create relationships

Relationships can be created in a few ways via the setObjects operation:

  1. Through the parentKey and containerKey attributes, indicating a relationship between the ingested object and its parent or container.

  2. Through attributes that relate to a user, such as createdBy or owners.

  3. Through the associations attribute, which provides a way to generically link objects.

Parent and container

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 typeAssociation typeRelationship object typeRelationship created
BranchcontainerKeyatlassian:repositoryBranch in a repository
CommitcontainerKeyatlassian:repositoryCommit in a repository
DeploymentcontainerKeyatlassian:repositoryDeployment associated to a repository
MessagecontainerKeyatlassian:conversationConversation has a message
Pull requestcontainerKeyatlassian:repositoryPull request in a repository
CommentparentKeyatlassian:pull-requestPull request has a comment
DocumentparentKeyatlassian:documentParent document has a child document
MessageparentKeyatlassian:messageParent message has a child message

Associations

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
2
associations: {
  set: {
    associationType: "issueIdOrKeys",
    values: ["ABC-123"]
  }
}

The maximum number of associations for an object is 500.

Association types

Teamwork Graph supports the following association types:

Jira work items

An association type referencing work items in Jira.

PropertyTypeDescription
associationType"issueIdOrKeys"Defines the associationType as "issueIdOrKeys".
valueslist<String>List of Jira issueId or issueKeys. For example, 10001 or ABC-123

Teamwork Graph objects

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.

PropertyTypeDescription
associationType"atlassian:<objectType>"Defines the associationType as a specific object type, for example, atlassian:document.
valueslist<entityKey>List of Teamwork Graph object keys. For example:
1
2
{
  "entityId": "document-1"
}

Supported relationship types

Not all object types can be associated with another Teamwork Graph object type. At the moment, we only support the following use cases:

Object typeAssociation typeRelationship created
BranchissueIdOrKeysJira work item associated with a branch
Calendar eventatlassian:documentDocuments linked to a calendar event
Calendar eventissueIdOrKeysJira work item associated with a calendar event
CommitissueIdOrKeysJira work item associated with a commit
ConversationissueIdOrKeysJira work item mentioned in a conversation
Deploymentatlassian:deploymentDeployment associated with a deployment
Deploymentatlassian:commitDeployment contains a commit
DeploymentissueIdOrKeysJira work item associated with a deployment
DesignissueIdOrKeysJira work item associated with a design
DocumentissueIdOrKeysJira work item associated with a document
MessageissueIdOrKeysJira work item mentioned in a message
Pull requestatlassian:commitCommit belongs to a pull request
Pull requestissueIdOrKeysJira work item associated with a pull request

Rate this page: