Worklog Related Operations

     

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

    To perform worklog related operations the following URL patterns should be used.

     

    For adding worklog to an existing request:

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

     

    For operations on a specific worklog:

    http://<servername>:<port number>/sdpapi/request/<request id>/worklogs/<worklog id>

     


    Contents


     

    Adding Worklog

    To add a worklog for an existing request, the URL is given as: 

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

     

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

     

    Key Points:

    1. The operation name "ADD_WORKLOG"  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>

    <Worklogs>

    <Worklog>

    <parameter>

    <name>description</name>

    <value>Adding a New Worklog</value>

    </parameter>

    <parameter>

    <name>technician</name>

    <value>Howard Stern</value>

    </parameter>

    <parameter>

    <name>cost</name>

    <value>25</value>

    </parameter>

    <parameter>

    <name>workMinutes</name>

    <value>20</value>

    </parameter>

    <parameter>

    <name>workHours</name>

    <value>6</value>

    </parameter>

    </Worklog>

    </Worklogs>

    </Details>

    </Operation>

     

     

    Input - Format 2:

     

    <Operation>

    <Details>

    <Worklogs>

    <Worklog>

    <description>Adding a New Worklog</description>

    <technician>Howard Stern</technician>

    <cost>25</cost>

    <workMinutes>20</workMinutes>

    <workHours>6</workHours>

    </Worklog>

    </Worklogs>

    </Details>

    </Operation>

     

     

    Output:

     

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

    <operation name="ADD_WORKLOG">

    <result>

    <status>Success</status>

    <message>Work Log added successfully for request 24</message>

    </result>

    </operation>

     

    Editing Worklog

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

    http://<servername>:<port number>/sdpapi/request/<request id>/worklogs/<work log id>

     

    Assume the Worklog ID to edit is 302, then the URL is: http://localhost:8080/sdpapi/request/24/worklogs/302

     

    Key Points:

    1. The operation name "EDIT_WORKLOG"  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>

    <Worklogs>

    <Worklog>

    <parameter>

    <name>description</name>

    <value>Editing Worklog</value>

    </parameter>

    </Worklog>

    </Worklogs>

    </Details>

    </operation>

     

     

    Input - Format 2:

     

    <Operation>

    <Details>

    <Worklogs>

    <Worklog>

    <description>Editing Worklog</description>

    </Worklog>

    </Worklogs>

    </Details>

    </Operation>

     

     

    Output:

     

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

    <operation name="EDIT_WORKLOG">

    <result>

    <status>Success</status>

    <message>Work Log 302 successfully edited for request 24</message>

    </result>

    </operation>

     

     

    Viewing Worklog

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

    http://<servername>:<port number>/sdpapi/request/<request id>/worklogs/<work log id>

     

    Assume the Worklog ID to view worklog is 302, then the URL is: http://localhost:8080/sdpapi/request/24/worklogs/302

     

    Key Points:

    1. The operation name "GET_WORKLOG"  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_WORKLOG">

    <result>

    <status>Success</status>

    <message>Work log details fetched successfully</message>

    </result>

    <Details>

    <Worklogs>

    <Worklog>

    <parameter>

    <name>dateTime</name>

    <value>1275375445281</value>

    </parameter>

    <parameter>

    <name>executedTime</name>

    <value>1275375433484</value>

    </parameter>

    <parameter>

    <name>cost</name>

    <value>21.6666666666667</value>

    </parameter>

    <parameter>

    <name>WORKORDERID</name>

    <value>24</value>

    </parameter>

    <parameter>

    <name>workHours</name>

    <value>0</value>

    </parameter>

    <parameter>

    <name>workMinutes</name>

    <value>7800000</value>

    </parameter>

    <parameter>

    <name>technician</name>

    <value>Howard Stern</value>

    </parameter>

    <parameter>

    <name>description</name>

    <value>Worklog 2</value>

    </parameter>

    <parameter>

    <name>requestCostID</name>

    <value>301</value>

    </parameter>

    </Worklog>

    </Worklogs>

    </Details>

    </Operation>

     

    Viewing Worklogs

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

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

     

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

     

    Key Points:

    1. The operation name "GET_WORKLOGS"  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_WORKLOGS">

    <result>

    <status>Success</status>

    <message>Work log details fetched successfully</message>

    </result>

    <Details>

    <Worklogs>

    <Worklog URI="http://localhost:8080/sdpapi/request/24/worklogs/301/">

    <parameter>

    <name>dateTime</name>

    <value>1275375445281</value>

    </parameter>

    <parameter>

    <name>executedTime</name>

    <value>1275375433484</value>

    </parameter>

    <parameter>

    <name>cost</name>

    <value>21.6666666666667</value>

    </parameter>

    <parameter>

    <name>WORKORDERID</name>

    <value>24</value>

    </parameter>

    <parameter>

    <name>workHours</name>

    <value>0</value>

    </parameter>

    <parameter>

    <name>workMinutes</name>

    <value>7800000</value>

    </parameter>

    <parameter>

    <name>technician</name>

    <value>Howard Stern</value>

    </parameter>

    <parameter>

    <name>description</name>

    <value>Worklog 2</value>

    </parameter>

    <parameter>

    <name>requestCostID</name>

    <value>301</value>

    </parameter>

    </Worklog>

    <Worklog URI="http://localhost:8080/sdpapi/request/24/worklogs/302/">

    <parameter>

    <name>dateTime</name>

    <value>1275375861188</value>

    </parameter>

    <parameter>

    <name>executedTime</name>

    <value>1275375861188</value>

    </parameter>

    <parameter>

    <name>cost</name>

    <value>25.0</value>

    </parameter>

    <parameter>

    <name>WORKORDERID</name>

    <value>24</value>

    </parameter>

    <parameter>

    <name>workHours</name>

    <value>0</value>

    </parameter>

    <parameter>

    <name>workMinutes</name>

    <value>22800000</value>

    </parameter>

    <parameter>

    <name>technician</name>

    <value>Howard Stern</value>

    </parameter>

    <parameter>

    <name>description</name>

    <value>Adding a New Worklog</value>

    </parameter>

    <parameter>

    <name>requestCostID</name>

    <value>302</value>

    </parameter>

    </Worklog>

    <Worklogs>

    </Details>

    </operation>

     

     

    Delete Worklog

    To delete a worklog from a request, the URL is given as: 

    http://<servername>:<port number>/sdpapi/request/<request id>/worklogs/<work log id>

     

    Assume the Worklog ID to delete is 301, then the URL is:  http://localhost:8080/sdpapi/request/24/worklogs/301

     

    Key Points:

    1. The operation name "DELETE_WORKLOG"  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_WORKLOG">

    <result>

    <status>Success</status>

    <message>Work Log deleted successfully</message>

    </result>

    </operation>

     

     

     

     

    Zoho Corp. All rights reserved.