TraceabilityLinks_Delete Operation

Applies to QAComplete 12.71 SaaS & On-Premises, last modified on April 26, 2021

Deletes the specified link between items.

Requirements

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

Parameters

The operation uses the following parameters:

AuthenticationData  :  AuthenticationData, required

An AuthenticationData object containing the login information and the ID of the project that contains linked items.

TraceabilityLinkId  :  TraceabilityLink, required

The ID of the TraceabilityLink that represents a link to delete.

Result

None.

Example

Sample Code

C#

string login = "john.doe@example.com";
string password = "p@ssword";
int projID = 10372;
// Specifying the first item
string entityCode = "Bugs";
int FKId = 35;

// Specifying the second item
string linkedEntityCode = "Releases";
int linkedFKId = 23;

ServiceSoapClient service = new ServiceSoapClient();

// Preparing AuthenticationData
LoginInfo loginInfo = service.GetLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.AppCode = loginInfo.AppCode;
authData.UserId = loginInfo.UserId;
authData.PassCode = password;
authData.DeptId = loginInfo.DeptId;
authData.ProjId = projID;

// Preparing the TraceabilityLink object
TraceabilityLink link = new TraceabilityLink();
link.EntityCode = entityCode;
link.FKId = FKId;
link.LinkedEntityCode = linkedEntityCode;
link.LinkedFKId = linkedFKId;

// Deleting a link between two items
service.TraceabilityLinks_Delete(authData, link);
Console.WriteLine("Link was deleted");

Java

String login = "john.doe@example.com";
String password = "p@ssword";
int projId = 10372;

// Specifying the first item
String entityCode = "Bugs";
int FKId = 35;

// Specifying the second item
String linkedEntityCode = "Releases";
int linkedFKId = 23;

ServiceSoap service = new Service().getServiceSoap12();

// Preparing AuthenticationData
LoginInfo loginInfo = service.getLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.setAppCode(loginInfo.getAppCode());
authData.setUserId(loginInfo.getUserId());
authData.setPassCode(password);
authData.setDeptId(loginInfo.getDeptId());
authData.setProjId(loginInfo.getProjId());

// Preparing the TraceabilityLink object
TraceabilityLink link = new TraceabilityLink();
link.setEntityCode(entityCode);
link.setFKId(FKId);
link.setLinkedEntityCode(linkedEntityCode);
link.setLinkedFKId(linkedFKId);

// Deleting a link between two items
service.traceabilityLinksAdd(authData, link);
System.out.println("Link was deleted");

Sample Request XML

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

<?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_Delete xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TraceabilityLinkId>
        <EntityCode>Bugs</EntityCode>
        <FKId>33</FKId>
        <LinkedEntityCode>Releases</LinkedEntityCode>
        <LinkedFKId>23</LinkedFKId>
        <LinkType>Found in build</LinkType>
      </TraceabilityLinkId>
    </TraceabilityLinks_Delete>
  </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: 692 {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_Delete xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <TraceabilityLinkId>
        <EntityCode>Bugs</EntityCode>
        <FKId>33</FKId>
        <LinkedEntityCode>Releases</LinkedEntityCode>
        <LinkedFKId>23</LinkedFKId>
        <LinkType>Found in build</LinkType>
      </TraceabilityLinkId>
    </TraceabilityLinks_Delete>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 318 {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_DeleteResponse xmlns="http://www.pragmaticsw.com/" />
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 328 {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_DeleteResponse xmlns="http://www.pragmaticsw.com/" />
  </soap12:Body>
</soap12:Envelope>

See Also

TraceabilityLinks_Add
TraceabilityLinks_Load
TraceabilityLinks_LoadByCriteria
Traceability Operations
SOAP API Reference

Highlight search results