Notes Related Operations

 

The notes related operations on specific request such as adding new notes, updating, deleting and viewing the existing notes are discussed under this section.

To perform the notes related operations on an existing request, the following URL patterns should be used.

 

For adding notes to a request:

http://<servername>:<port number>/sdpapi/request/<request id>/notes

 

For operations on a specific note for a request:

http://<servername>:<port number>/sdpapi/request/<request id>/notes/<notes id>

 


Contents


 

Adding Note

Say, you are running ServiceDesk Plus with the server name as "localhost" in the port "8080". You are adding a note for an existing request for which the input and output XML format is given below,  

For adding a note to an existing request, the URL is given as: 

http://<servername>:<port number>/sdpapi/request/<request id>/notes

 

So for the above scenario, the URL is: http://localhost:8080/sdpapi/request/24/notes/

 

Key Points:

  1. The operation name "ADD_NOTE"  should be sent as a "POST attribute" with key "OPERATION_NAME"

  2. The technician key should be sent as a "POST attribute" with key "TECHNICIAN_KEY"

  3. Input is an XML string sent as "POST attribute" with key "INPUT_DATA".

Note: Please note that the Input and Output XML formats have been changed. But for compatibility reasons, the Input operation will support both the formats.

 

Input - Format 1:

 

<Operation>

<Details>

<Notes>

<Note>

<parameter>

<name>isPublic</name>

<value>false</value>

</parameter>

<parameter>

<name>notesText</name>

<value>Text added to the note</value>

</parameter>

</Note>

</Notes>

</Details>

</Operation>

 

Input - Format 2:

 

<Operation>

<Details>

<Notes>

<Note>

<isPublic>false</isPublic>

<notesText>Text added to the note</notesText>

</Note>

</Notes>

</Details>

</Operation>

 

 

Output:

 

<?xml version="1.0" encoding="UTF-8"?>

<operation name="ADD_NOTE">

<result>

<status>Success</status>

<message>Note added successfully for request 24</message>

</result>

</operation>

 

Editing Note

To edit a note of an existing request, the URL is given as: 

http://<servername>:<port number>/sdpapi/request/<request id>/notes/<note id>

 

Assume the Note ID to edit the note is 301, then the URL is:  http://localhost:8080/sdpapi/request/24/notes/301

 

Key Points:

  1. The operation name "EDIT_NOTE" should be sent as a "POST attribute" with key "OPERATION_NAME"

  2. The technician key should be sent as a "POST attribute" with key "TECHNICIAN_KEY"

  3. Input is an XML string sent as "POST attribute" with key "INPUT_DATA".

Note: Please note that the Input and Output XML formats have been changed. But for compatibility reasons, the Input operation will support both the formats.

 

Input - Format 1:

 

<Operation>

<Details>

<Notes>

<Note>

<parameter>

<name>notesText</name>

<value>edited the subject</value>

</parameter>

</Note>

</Notes>

</Details>

</Operation>

 

Input - Format 2:

 

<Operation>

<Details>

<Notes>

<Note>

<notesText>edited sub</notesText>

</Note>

</Notes>

</Details>

</Operation>

 

Output:

 

<?xml version="1.0" encoding="UTF-8"?>

<operation name="EDIT_NOTE">

<result>

<status>Success</status>

<message>Note 301 successfully edited for request 24</message>

</result>

</operation>

 

 

Viewing Note

To view one of the notes of an existing request, the URL is given as: 

http://<servername>:<port number>/sdpapi/request/<request id>/notes/<note id>

 

Assume the Note ID to view the note is 301, then the URL is:  http://localhost:8080/sdpapi/request/24/notes/301

 

Key Points:

  1. The operation name "GET_NOTE"  should be sent as a "POST attribute" with key "OPERATION_NAME"

  2. The technician key should be sent as a "POST attribute" with key "TECHNICIAN_KEY"

  3. Input is not required in this case.r

Note: Please note that the Input and Output XML formats have been changed. But for compatibility reasons, the Input operation will support both the formats.

 

Output:

 

<?xml version="1.0" encoding="UTF-8"?>

<operation name="GET_NOTE">

<result>

<status>Success</status>

<message>Note details fetched successfully</message>

</result>

<Details>

<Notes>

<Note>

<parameter>

<name>userid</name>

<value>301</value>

</parameter>

<parameter>

<name>ispublic</name>

<value>false</value>

</parameter>

<parameter>

<name>notesText</name>

<value>Text added to the note</value>

</parameter>

<parameter>

<name>username</name>

<value>Shawn Adams</value>

</parameter>

<parameter>

<name>notesid</name>

<value>301</value>

</parameter>

<parameter>

<name>notesdate</name>

<value>1275373443722</value>

</parameter>

<parameter>

<name>workorderid</name>

<value>24</value>

</parameter>

</Note>

</Notes>

</Details>

</Operation>

 

Viewing all the Notes

To view all the notes of a request, the URL is given as: 

http://<servername>:<port number>/sdpapi/request/<request id>/notes/

 

Assume the Request ID to view all the notes is 24, then the URL is:  http://localhost:8080/sdpapi/request/24/notes

 

Key Points:

  1. The operation name "GET_NOTES"  should be sent as a "POST attribute" with key "OPERATION_NAME"

  2. The technician key should be sent as a "POST attribute" with key "TECHNICIAN_KEY"

  3. Input is not required in this case.

Note: Please note that the Input and Output XML formats have been changed. But for compatibility reasons, the Input operation will support both the formats.

 

Output:

 

<?xml version="1.0" encoding="UTF-8"?>

<operation name="GET_NOTES">

<result>

<status>Success</status>

<message>Notes details fetched successfully</message>

</result>

<Details>

<Notes>

<Note URI="http://localhost:8080/sdpapi/request/24/notes/302/">

<parameter>

<name>ispublic</name>

<value>false</value>

</parameter>

<parameter>

<name>notesText</name>

<value>Note added to the request</value>

</parameter>

<parameter>

<name>username</name>

<value>Shawn Adams</value>

</parameter>

<parameter>

<name>notesdate</name>

<value>1275373948835</value>

</parameter>

</Note>

<Note URI="http://localhost:8080/sdpapi/request/24/notes/301/">

<parameter>

<name>ispublic</name>

<value>false</value>

</parameter>

<parameter>

<name>notesText</name>

<value>Text added to the note</value>

</parameter>

<parameter>

<name>username</name>

<value>Shawn Adams</value>

</parameter>

<parameter>

<name>notesdate</name>

<value>1275373443722</value>

</parameter>

</Note>

</Notes>

</Details>

</operation>

 

Deleting Note

To delete a note of an existing request, the URL is given as: 

 http://<servername>:<port number>/sdpapi/request/<request id>/notes/<note id>

 

Assume the Note ID to delete the note is 301, then the URL is: http://localhost:8080/sdpapi/request/24/notes/301

 

Key Points:

  1. The operation name "DELETE_NOTE"  should be sent as a "POST attribute" with key "OPERATION_NAME"

  2. The technician key should be sent as a "POST attribute" with key "TECHNICIAN_KEY"

  3. Input is not required in this case.

Note: Please note that the Input and Output XML formats have been changed. But for compatibility reasons, the Input operation will support both the formats.

 

Output:

 

<?xml version="1.0" encoding="UTF-8"?>

<operation name="DELETE_NOTE">

<result>

<status>Success</status>

<message>Note deleted successfully</message>

</result>

</operation>

 

 

ServiceDeskPlus - Help Desk and Asset Management Software

Copyright © 2012, ZOHO Corp. All Rights Reserved.
ManageEngine