Resource: Relationship ( /api/organisation/{organisationId}/relationshiptype/{key}/relationship/{id} )
Relationship resource - allows the retrieval, update and deletion of a single relationship
This resource supports the following methods: DELETE, GET, PUT
Methods
DELETE
Delete relationship.
Required Permissions
- TestManagement/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).
| Status | Description |
|---|---|
| 200 - OK | Returned if request was completed successfully. |
| 403 - Forbidden | Returned if you have insufficient permissions to delete this relationship. |
| 404 - NotFound | Returned if organisation or relationship does not exist. |
Removes a single relationship.
Request Headers
| Key | Value | Description |
|---|---|---|
| Accept | application/json |
Request Parameters
| Key | Value | Description |
|---|---|---|
| {organisationId} | 4bb709c2-e0e7-4af3-9f60-a045016a9610 | ID of the organisation the relationship belongs to. |
| {key} | RequirementToRequirementAssociation | The key of the relationship type being updated. |
| {id} | e6cc76e6-df0f-42ac-bf20-72576256d262 | ID of the relationship to update. |
Response Headers
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json; charset=utf-8 |
Status Code
200 - OK
GET
Retrieve a relationship (does not include it's children)
Required Permissions
- TestManagement/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).
| Status | Description |
|---|---|
| 200 - OK | Returned if request was completed successfully. |
| 403 - Forbidden | Returned if you have insufficient permissions to retrieve this relationship. |
| 404 - NotFound | Returned if organisation or relationship does not exist. |
Retrieves the details of a single realtionship.
Request Headers
| Key | Value | Description |
|---|---|---|
| Accept | application/json |
Request Parameters
| Key | Value | Description |
|---|---|---|
| {organisationId} | 4bb709c2-e0e7-4af3-9f60-a045016a9610 | ID of the organisation the relationship belongs to. |
| {key} | RequirementToRequirementAssociation | The key of the relationship type being retrieved. |
| {id} | e6cc76e6-df0f-42ac-bf20-72576256d262 | ID of the relationship to retrieved. |
Response Headers
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json; charset=utf-8 |
Response Body
{
"EntityId": "8F00D2CE-6243-4956-AF89-60B7B9755A9B",
"Number": "1",
"Name": "Some Requirement",
"EntityType": "Requirement",
"AssignedTo": "joeb",
"Status": "Draft",
"Priority": "High",
"Type": "Functional",
"PackageId": "c232382b-0c66-475b-b59b-8753d4c5377b",
"PackageName": "Version 1",
"PackageEntityType": "RequirementPackage",
"PackagePath": "/Requirements/Version 1",
"RelationshipId": "e6cc76e6-df0f-42ac-bf20-72576256d262",
"RelationshipTypeKey": "RequirementToRequirementAssociation",
"RelationshipType": "Associated",
"Relation": "Association",
"RelationshipDirection": "Source -> Destination",
"CanDelete": true,
"CanEdit": false,
"Children": [],
"Links": [
{
"Href": "http://localhost/api",
"Rel": "Entity"
}
]
}
Status Code
201 - Created
PUT
Update the direction of a relationship
Required Permissions
- TestManagement/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).
| Status | Description |
|---|---|
| 200 - OK | Returned if the request was completed successfully. |
| 403 - Forbidden | Returned if you have insufficient permissions to update the relationship. |
| 404 - NotFound | Returned if organisation or relationship does not exist. |
Updates the direction of a relationship (This is the only supported type of a update you can apply to a relationship, to change it's source or destination end you must be delete the existing relationship and create a new one.
Request Headers
| Key | Value | Description |
|---|---|---|
| Accept | application/json |
Request Parameters
| Key | Value | Description |
|---|---|---|
| {organisationId} | 4bb709c2-e0e7-4af3-9f60-a045016a9610 | ID of the organisation the relationship belongs to. |
| {key} | RequirementToRequirementAssociation | The key of the relationship type being updated. |
| {id} | e6cc76e6-df0f-42ac-bf20-72576256d262 | ID of the relationship to update. |
Request Body
{
"RelationshipDirection": "SourceToDestination"
}
Response Headers
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json; charset=utf-8 |
Response Body
{
"EntityId": "8F00D2CE-6243-4956-AF89-60B7B9755A9B",
"Number": "1",
"Name": "Some Requirement",
"EntityType": "Requirement",
"AssignedTo": "joeb",
"Status": "Draft",
"Priority": "High",
"Type": "Functional",
"PackageId": "c232382b-0c66-475b-b59b-8753d4c5377b",
"PackageName": "Version 1",
"PackageEntityType": "RequirementPackage",
"PackagePath": "/Requirements/Version 1",
"RelationshipId": "e6cc76e6-df0f-42ac-bf20-72576256d262",
"RelationshipTypeKey": "RequirementToRequirementAssociation",
"RelationshipType": "Associated",
"Relation": "Association",
"RelationshipDirection": "Source -> Destination",
"CanDelete": true,
"CanEdit": false,
"Children": [],
"Links": [
{
"Href": "http://localhost/api",
"Rel": "Entity"
}
]
}
Status Code
201 - Created