Notes_Add Operation

Applies to QAComplete 14.3, last modified on February 19, 2024

Adds a new note (comment) to a defect, requirement, or other item. The target item is specified by the Notes.EntityCode and Notes.FKId parameters.

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 add a note.

Notes  :  Notes, required

A Notes object with the note’s data. This object must have the EntityCode, FKId, and Description properties specified.

Result

An integer ID of the added note.

Remarks

The Notes object has matching UpdateUserId and UserName properties. To set them, specify the value only for the UpdateUserId property. The UserName property will be set automatically.

Example

Sample Code

To view sample code that demonstrates how to use the Notes_Add operation to add a note to a defect, see Add Notes to Defects.

Sample Request XML

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 555 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/Notes_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>
    <Notes_Add xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>8162</DeptId>
        <ProjId>11873</ProjId>
        <UserId>24661</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <Notes>
        <FKId>3</FKId>
        <EntityCode>Bugs</EntityCode>
        <Description>A note.</Description>
      </Notes>
    </Notes_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: 563 {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_Add xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>8162</DeptId>
        <ProjId>11873</ProjId>
        <UserId>24661</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <Notes>
        <FKId>3</FKId>
        <EntityCode>Bugs</EntityCode>
        <Description>A note.</Description>
      </Notes>
    </Notes_Add>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

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

SOAP 1.2

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

See Also

Notes_Get Operation
Notes_GetList Operation
Notes_Update Operation
Notes_Delete Operation
Notes Object
Helper Operations
SOAP API Reference

Highlight search results