Relations

A relation represents direct links between entities.

Overview

A relation is defined using a reference field for each of the linked entities, in the format <relation_alias>.

You can filter entities based on their relations to other entities.

You can perform basic CRUD operations on the reference fields to update relations between the entities.

Back to top

Example

The following demonstrates a GET request for the relations between a defect and the release in which it is detected, and the corresponding response.

GET request:

GET .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/defects/1001?fields=detected_in_release

GET response:

{
     "type": "defect",
     "id": "1026"
     "detected_in_release":
           {
              "id": "1001",
              type: "release"
           }
}

Note the following:

  • type and id are native fields that are returned by default in all responses.

  • detected in release returns the release for the defect we are querying.

Back to top

See also: