You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Resource: Organisation Relationship Types ( /api/organisation/{id}/relationshiptypes )

Allows retrieving of all relationship types associated with a single organisation.

This resource supports the following methods: GET

Methods

GET


Retrieves all relationship types

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

Required Permissions

  • TestManagement/ManageExecutions/View
  • TestManagement/ManageScripts/View
  • TestManagement/ManageIncidents/View
  • TestManagement/ManageRequirements/View

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).

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

Example - Retrieve all relationship types

Retrieves all the relationship types

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}e12cce32-7029-4083-99dd-51aed6fd8adbID of Organisation to fetch relationship types for.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Items": [
    {
      "CanCreateRelationshipsOfThisType": true,
      "CanDeleteRelationshipsOfThisType": true,
      "CanEditRelationshipsOfThisType": true,
      "DestinationToSourceLabel": "Associated",
      "SourceToDestinationLabel": "Associated",
      "OrganisationId": "e12cce32-7029-4083-99dd-51aed6fd8adb",
      "Key": "RequirementToRequirementAssociation",
      "Name": "Association (Requirement <-> Requirement)",
      "SourceEntityType": "Requirement",
      "DestinationEntityType": "Requirement",
      "AllowableDirections": [
        {
          "Id": "0",
          "Name": "None"
        },
        {
          "Id": "1",
          "Name": "Source -> Destination"
        },
        {
          "Id": "2",
          "Name": "Destination -> Source"
        },
        {
          "Id": "3",
          "Name": "Source <-> Destination"
        }
      ],
      "Self": "http://localhost/api/organisation/e12cce32-7029-4083-99dd-51aed6fd8adb/relationshiptype/RequirementToRequirementAssociation",
      "Links": [
        {
          "Href": "http://localhost/api/organisation/e12cce32-7029-4083-99dd-51aed6fd8adb",
          "Rel": "Organisation"
        },
        {
          "Href": "http://localhost/api/organisation/e12cce32-7029-4083-99dd-51aed6fd8adb/relationshiptype/RequirementToRequirementAssociation/relationships",
          "Rel": "CreateRelationship"
        }
      ]
    },
    {
      "CanCreateRelationshipsOfThisType": true,
      "CanDeleteRelationshipsOfThisType": true,
      "CanEditRelationshipsOfThisType": false,
      "DestinationToSourceLabel": "Covered By",
      "SourceToDestinationLabel": "Covers",
      "OrganisationId": "e12cce32-7029-4083-99dd-51aed6fd8adb",
      "Key": "ScriptToRequirementCoverage",
      "Name": "Coverage (TestScript <-> Requirement)",
      "SourceEntityType": "TestScript",
      "DestinationEntityType": "Requirement",
      "AllowableDirections": [
        {
          "Id": "1",
          "Name": "Source -> Destination"
        }
      ],
      "Self": "http://localhost/api/organisation/e12cce32-7029-4083-99dd-51aed6fd8adb/relationshiptype/ScriptToRequirementCoverage",
      "Links": [
        {
          "Href": "http://localhost/api/organisation/e12cce32-7029-4083-99dd-51aed6fd8adb",
          "Rel": "Organisation"
        },
        {
          "Href": "http://localhost/api/organisation/e12cce32-7029-4083-99dd-51aed6fd8adb/relationshiptype/ScriptToRequirementCoverage/relationships",
          "Rel": "CreateRelationship"
        }
      ]
    }
  ]
}

Status Code

200 - OK

  • No labels