Deletes the specified note (comment) from an item (defect, requirement, and so on) in QAComplete.
Parameters
The operation uses the following parameters:
AuthenticationData : AuthenticationData, required
An AuthenticationData
object containing the login information and the ID of the project where you want to delete a note.
EntityCode : string, required
The type of the item to which the note belongs. Possible values are:
- Bugs (defects)
- Contacts
- FileExchanges (shared documents)
- FunctionalSpecs (requirements)
- ProjectPlans
- ProjectPlanTasks
- ProjectTasks (agile tasks)
- Releases
- TestCases (legacy test cases used in release 9.6.0 and earlier)
- TestConfigurations
- Tests
- TestSets
NoteId : integer, required
The ID of the note to delete.
Result
None.
Example
Sample Code
C#
string login = "[email protected]";
string password = "p@ssword";
int projID = 10372;
// Specify the ID of the note
int noteID = 32;
// Specify the type of the item that contains the note
string entityCode = "Bugs";
ServiceSoapClient service = new ServiceSoapClient();
// Prepare authentication data
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;
// Delete the note
service.Notes_Delete(authData, entityCode, noteID);
Console.WriteLine("The note has been deleted");
Java
String login = "[email protected]";
String password = "p@ssword";
int projID = 10372;
// Specify the ID of the note
int noteID = 32;
// Specify the type of the item that contains the note
String entityCode = "Bugs";
ServiceSoapClient service = new Service().getServiceSoap12();
// Prepare authentication data
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(projID);
// Delete the note
service.notesDelete(authData, entityCode, noteID);
System.out.println("The note has been deleted");
Sample Request XML
POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 516 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/Notes_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>
<Notes_Delete xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>8162</DeptId>
<ProjId>11873</ProjId>
<UserId>24661</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<EntityCode>Bugs</EntityCode>
<NoteId>1</NoteId>
</Notes_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: 524 {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>
<Notes_Delete xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>8162</DeptId>
<ProjId>11873</ProjId>
<UserId>24661</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<EntityCode>Bugs</EntityCode>
<NoteId>1</NoteId>
</Notes_Delete>
</soap12:Body>
</soap12:Envelope>
Sample Response XML
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 306 {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>
<Notes_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: 316 {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>
<Notes_DeleteResponse xmlns="http://www.pragmaticsw.com/" />
</soap12:Body>
</soap12:Envelope>
See Also
Notes_Add Operation
Notes_Get Operation
Notes_GetList Operation
Notes_Update Operation
Notes Object
Helper Operations
SOAP API Reference