Child pages
  • Resources / Relationships
Skip to end of metadata
Go to start of metadata

Resource: Relationships ( /api/organisation/{id}/relationshiptype/{key}/relationships )

Relationships (Collection) resource - allows the creation of new relationships via a POST request

This resource supports the following methods: POST



Create new relationship.

This method supports the OData parameters $filter, $top, $take, $orderby and $inlinecount. See OData Topic for more details.

Required Permissions

  • TestManagement/ManageExecutions/Edit
  • TestManagement/ManageScripts/Edit
  • TestManagement/ManageIncidents/Edit
  • TestManagement/ManageRequirements/Edit

Status Codes

These are the expected status codes returned by the service. In addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

200 - OKReturned if the request was completed successfully.
404 - NotFoundReturned if organisation does not exist.

Example - Create a new relationship

Creates a new relationship between two entities.

Request Headers


Request Parameters

{id}4bb709c2-e0e7-4af3-9f60-a045016a9610ID of the Organisation to create the relationship for.
{key}ScriptToRequirementCoverageThe key of the relationship type to create

Request Body

  "RelationshipDirection": "SourceToDestination",
  "DestinationEntityId": "e0f4b167-a01f-4e74-a78a-a182011e0305",
  "DestinationEntityType": "Requirement",
  "SourceEntityId": "d38882b4-8d73-4cd7-8ba1-a182011e3db1",
  "SourceEntityType": "TestScript"

Response Headers

Content-Typeapplication/json; charset=utf-8

Response Body

  "EntityId": "e0f4b167-a01f-4e74-a78a-a182011e0305",
  "Number": "1",
  "Name": "Some Requirement",
  "EntityType": "Requirement",
  "AssignedTo": "joeb",
  "Status": "Draft",
  "Priority": "High",
  "Type": "Functional",
  "PackageId": "c232382b-0c66-475b-b59b-8753d4c5377b",
  "PackageName": "Reports",
  "PackageEntityType": "RequirementPackage",
  "PackagePath": "/Requirements/Reports",
  "ParentPath": "",
  "RelationshipId": "940e88fb-5ba5-42af-ade1-a18500bedfd3",
  "RelationshipTypeKey": "ScriptToRequirementCoverage",
  "RelationshipType": "Coverage",
  "Relation": "Covered By",
  "RelationshipDirection": "Source -> Destination",
  "CanDelete": true,
  "CanEdit": false,
  "Children": [],
  "Links": [
      "Href": "http://localhost/api",
      "Rel": "Entity"

Status Code

201 - Created

  • No labels