Replaces note information with that from the specified Note
object.
You usually call the Notes_Get operation to get a note by its ID, change some of its properties, and then send the updated object to the Notes_Update operation.
Parameters
The operation uses the following parameters:
AuthenticationData : AuthenticationData, required
An AuthenticationData
object containing the login information and the ID of the project whose note you want to update.
Note : Notes, required
A Note
object with the updated note information.
Result
A Note object that represents the updated note.
Example
Sample Code
C#
string login = "[email protected]";
string password = "p@ssword";
int projID = 10372;
// Specify the ID of the desired 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;
// Get the note
Notes note = service.Notes_Get(authData, entityCode, noteID);
// Modify the note’s description
note.Description = "New description of a note";
// Update the note
Notes result = service.Notes_Update(authData, note);
Console.WriteLine("Updated description:" + result.Description);
Java
String login = "[email protected]";
String password = "p@ssword";
int projID = 10372;
// Specify the ID of the desired 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);
// Get the note
Notes note = service.notesGet(authData, entityCode, noteID);
// Modify the note’s description
note.setDescription("New description of a note");
// Update the note
Notes result = service.notesUpdate(authData, note);
System.out.println("Updated description:" + result.getDescription());
Sample Request XML
POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 787 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/Notes_Update"
<?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_Update xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>8162</DeptId>
<ProjId>11873</ProjId>
<UserId>24661</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<Note>
<FKId>3</FKId>
<EntityCode>Bugs</EntityCode>
<Description>A new note.</Description>
<DateCreated>2014-10-06T11:53:46</DateCreated>
<DateUpdated>2014-10-06T11:56:13</DateUpdated>
<NotesId>1</NotesId>
<NotesTypeCode>Notes</NotesTypeCode>
<Seq>1</Seq>
<UpdateUserId>24674</UpdateUserId>
<UserName>Doe, John</UserName>
</Note>
</Notes_Update>
</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: 795 {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_Update xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>8162</DeptId>
<ProjId>11873</ProjId>
<UserId>24661</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<Note>
<FKId>3</FKId>
<EntityCode>Bugs</EntityCode>
<Description>A new note.</Description>
<DateCreated>2014-10-06T11:53:46</DateCreated>
<DateUpdated>2014-10-06T11:56:13</DateUpdated>
<NotesId>1</NotesId>
<NotesTypeCode>Notes</NotesTypeCode>
<Seq>1</Seq>
<UpdateUserId>24674</UpdateUserId>
<UserName>Doe, John</UserName>
</Note>
</Notes_Update>
</soap12:Body>
</soap12:Envelope>
Sample Response XML
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 673 {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_UpdateResponse xmlns="http://www.pragmaticsw.com/">
<Notes_UpdateResult>
<FKId>3</FKId>
<EntityCode>Bugs</EntityCode>
<Description>A new note.</Description>
<DateCreated>2014-10-06T11:53:46</DateCreated>
<DateUpdated>2014-10-06T11:56:13</DateUpdated>
<NotesId>1</NotesId>
<NotesTypeCode>Notes</NotesTypeCode>
<Seq>1</Seq>
<UpdateUserId>24674</UpdateUserId>
<UserName>Doe, John</UserName>
</Notes_UpdateResult>
</Notes_UpdateResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 683 {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_UpdateResponse xmlns="http://www.pragmaticsw.com/">
<Notes_UpdateResult>
<FKId>3</FKId>
<EntityCode>Bugs</EntityCode>
<Description>A new note.</Description>
<DateCreated>2014-10-06T11:53:46</DateCreated>
<DateUpdated>2014-10-06T11:56:13</DateUpdated>
<NotesId>1</NotesId>
<NotesTypeCode>Notes</NotesTypeCode>
<Seq>1</Seq>
<UpdateUserId>24674</UpdateUserId>
<UserName>Doe, John</UserName>
</Notes_UpdateResult>
</Notes_UpdateResponse>
</soap12:Body>
</soap12:Envelope>
See Also
Notes_Add Operation
Notes_Get Operation
Notes_GetList Operation
Notes_Delete Operation
Notes Object
Helper Operations
SOAP API Reference