Cadet 1st Class
Cadet 1st Class

How to add Relations to an existing defect using REST API?

I would like to add relations using REST API to a defect which is already created.

1 Reply
Micro Focus Expert
Micro Focus Expert


The exact REST calls to create relations depend on both elements you want to connect: Defects could e.g. be linked to requirements, test run, ... Your defects will be linked to which entity type?

As far as I know you can create relations from both entities - either link the defect to a test run or a test run to the defect.

You might have a look at the GDPR Content Pack (download at The Excel sheet "Octane Fields" lists all fields for Octane entities including a description. If you filter that sheet for "defect" you'll currently find 94 fields; e.g.:

  • parent: A reference to the item under which an entity was opened.
  • dependence: The work items that depends on the entity.
  • linked_items1: Backlog Items
  • linked_items2: Defect(Trace from)
  • requirements: The requirements covering this entity.
  • covering_tests: A numeric field that shows the number of tests linked to this defect

The code to create Octane relations is in module modOCT, subOCTCreateRelation.



The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.