TraceabilityLinks_Add Operation

Applies to QAComplete�14.4, last modified on August 06, 2024

Links two items to each other. It creates two TraceabilityLink objects with the same LinkId: a link from one item to another and vice versa.

Requirements

The authenticating user must belong to a security group that has access to the Manage and view traceability and Read, Add, and Update privileges for items that you want to link.

Parameters

The operation uses the following parameters:

AuthenticationData  :  AuthenticationData, required

An AuthenticationData object containing the login information and the project ID that contains items to link.

TraceabilityLink  :  , required

A TraceabilityLink object that contains the information about linked items. You must specify only one TraceabilityLink object from a pair. QAComplete will create the second one automatically.

Result

The ID of the created TraceabilityLink object.

Example

Sample Code

To view sample code that demonstrates how to use the TraceabilityLins_Add operation to link a defect to a release, see Link Two Items.

Sample Request XML

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 674 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/TraceabilityLinks_Add"
 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TraceabilityLinks_Add xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TraceabilityLink>
        <EntityCode>Bugs</EntityCode>
        <FKId>33</FKId>
        <LinkedEntityCode>Releases</LinkedEntityCode>
        <LinkedFKId>23</LinkedFKId>
        <LinkType>Found in build</LinkType>
      </TraceabilityLink>
    </TraceabilityLinks_Add>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 682 {Insert an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <TraceabilityLinks_Add xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TraceabilityLink>
        <EntityCode>Bugs</EntityCode>
        <FKId>33</FKId>
        <LinkedEntityCode>Releases</LinkedEntityCode>
        <LinkedFKId>23</LinkedFKId>
        <LinkType>Found in build</LinkType>
      </TraceabilityLink>
    </TraceabilityLinks_Add>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 406 {The server returns an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TraceabilityLinks_AddResponse xmlns="http://www.pragmaticsw.com/">
      <TraceabilityLinks_AddResult>32</TraceabilityLinks_AddResult>
    </TraceabilityLinks_AddResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 416 {The server returns an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <TraceabilityLinks_AddResponse xmlns="http://www.pragmaticsw.com/">
      <TraceabilityLinks_AddResult>32</TraceabilityLinks_AddResult>
    </TraceabilityLinks_AddResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

TraceabilityLinks_Delete
TraceabilityLinks_Load
TraceabilityLinks_LoadByCriteria
Traceability Operations
SOAP API Reference

Highlight search results