Relationships |
This page explains how to use the Accompa REST API to retrieve information about "Related Items" of a record in your Accompa account. (What is a Relationship?) |
|
Read Related Items of a Specific Requirement
|
Reading related items of a specific requirement is achieved via a HTTP GET request shown below. |
|
GET /re/{id}/related |
Returns list of related items for the requirement whose integer ID is {id} |
|
Availability: Available in Accompa API version "2" and later (Learn more about API versions). |
|
RESPONSE |
Status: 200
<relationships id_prefix="RE" id="55">
<requirements>
<requirement>
<relationship_type>Is Parent Of</relationship_type>
<id>152</id>
<id_prefix>RE-</id_prefix>
<title>Test requirement #1 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</requirement>
<requirement>
<relationship_type>Is Child Of</relationship_type>
<id>155</id>
<id_prefix>RE-</id_prefix>
<title>Test requirement #2 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</requirement>
</requirements>
<features>
<feature>
<relationship_type>Is Related To</relationship_type>
<id>17</id>
<id_prefix>FT-</id_prefix>
<title>Test feature for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>15</created_time>
<last_updated_by>91</last_updated_time>
</feature>
<feature>
<relationship_type>Is Related To</relationship_type>
<id>59</id>
<id_prefix>FT-</id_prefix>
<title>Test feature #2 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</feature>
</features>
...
</relationships> |
If the requirement with ID matching {id} has one or more relationships, an XML response will be generated along with the status code "200". The XML response will contain the list of related items, as shown above.
If the requirement with ID matching {id} has no relationships, the XML response will still be generated along with the status code "200" - but the <relationships> element will not contain any children. |
|
Read Related Items of a Specific Feature
|
Reading related items of a specific feature is achieved via a HTTP GET request shown below. |
|
GET /ft/{id}/related |
Returns list of related items for the feature whose integer ID is {id} |
|
Availability: Available in Accompa API version "2" and later (Learn more about API versions). |
|
RESPONSE |
Status: 200
<relationships id_prefix="FT" id="12">
<requirements>
<requirement>
<relationship_type>Is Related To</relationship_type>
<id>152</id>
<id_prefix>RE-</id_prefix>
<title>Test requirement #1 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</requirement>
<requirement>
<relationship_type>Is Related To </relationship_type>
<id>155</id>
<id_prefix>RE-</id_prefix>
<title>Test requirement #2 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</requirement>
</requirements>
<features>
<feature>
<relationship_type>Is Related To</relationship_type>
<id>17</id>
<id_prefix>FT-</id_prefix>
<title>Test feature for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>15</created_time>
<last_updated_by>91</last_updated_time>
</feature>
<feature>
<relationship_type>Is Related To</relationship_type>
<id>59</id>
<id_prefix>FT-</id_prefix>
<title>Test feature #2 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</feature>
</features>
...
</relationships> |
If the feature with ID matching {id} has one or more relationships, an XML response will be generated along with the status code "200". The XML response will contain the list of related items, as shown above.
If the feature with ID matching {id} has no relationships, the XML response will still be generated along with the status code "200" - but the <relationships> element will not contain any children. |
|
Read Related Items of a Specific Use Case
|
Reading related items of a specific use case is achieved via a HTTP GET request shown below. |
|
GET /uc/{id}/related |
Returns list of related items for the use case whose integer ID is {id} |
|
Availability: Available in Accompa API version "2" and later (Learn more about API versions). |
|
RESPONSE |
Status: 200
<relationships id_prefix="UC" id="35">
<requirements>
<requirement>
<relationship_type>Is Related To</relationship_type>
<id>152</id>
<id_prefix>RE-</id_prefix>
<title>Test requirement #1 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</requirement>
<requirement>
<relationship_type>Is Related To </relationship_type>
<id>155</id>
<id_prefix>RE-</id_prefix>
<title>Test requirement #2 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</requirement>
</requirements>
<features>
<feature>
<relationship_type>Is Related To</relationship_type>
<id>17</id>
<id_prefix>FT-</id_prefix>
<title>Test feature for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>15</created_time>
<last_updated_by>91</last_updated_time>
</feature>
<feature>
<relationship_type>Is Related To</relationship_type>
<id>59</id>
<id_prefix>FT-</id_prefix>
<title>Test feature #2 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</feature>
</features>
...
</relationships> |
If the use case with ID matching {id} has one or more relationships, an XML response will be generated along with the status code "200". The XML response will contain the list of related items, as shown above.
If the use case with ID matching {id} has no relationships, the XML response will still be generated along with the status code "200" - but the <relationships> element will not contain any children. |
|
Read Related Items of a Specific Record under a Custom Object
|
Reading related items of a specific record under a custom object is achieved via a HTTP GET request shown below. |
|
GET /{api_prefix}/{id}/related |
Returns list of related items for the record whose integer ID is {id}. {api_prefix} is the value of the <api_prefix> element in the API response to GET /object API request. |
|
Availability: Available in Accompa API version "2" and later (Learn more about API versions). |
|
RESPONSE |
Status: 200
<relationships id_prefix="TA" id="95">
<requirements>
<requirement>
<relationship_type>Is Related To</relationship_type>
<id>152</id>
<id_prefix>RE-</id_prefix>
<title>Test requirement #1 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</requirement>
<requirement>
<relationship_type>Is Related To </relationship_type>
<id>155</id>
<id_prefix>RE-</id_prefix>
<title>Test requirement #2 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</requirement>
</requirements>
<features>
<feature>
<relationship_type>Is Related To</relationship_type>
<id>17</id>
<id_prefix>FT-</id_prefix>
<title>Test feature for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>15</created_time>
<last_updated_by>91</last_updated_time>
</feature>
<feature>
<relationship_type>Is Related To</relationship_type>
<id>59</id>
<id_prefix>FT-</id_prefix>
<title>Test feature #2 for API</title>
<version_number>7</version_number>
<created_time unit="GMT Timestamp">1262493473</created_time>
<last_updated_time unit="GMT Timestamp">1270683387</last_updated_time>
<created_by>5</created_time>
<last_updated_by>9</last_updated_time>
</feature>
</features>
...
</relationships> |
If the record with ID matching {id} has one or more relationships, an XML response will be generated along with the status code "200". The XML response will contain the list of related items, as shown above.
If the record with ID matching {id} has no relationships, the XML response will still be generated along with the status code "200" - but the <relationships> element will not contain any children. |
|