How to add total_time_spent in worklog using API

How to add total_time_spent in worklog using API


Please use milli-seconds as value to the attribute

URL:  <URL>/api/v3/worklog?OPERATION_NAME=add&TECHNICIAN_KEY=XXXXXXXXXXXXX

JSON: 

input_date={
"worklog": {
"request": {
"id": "6"
},
"description": "Adding a worklog",
"technician": {
"name": "administrator"
},
"total_time_spent": 720000,
"start_time": {
"value": 1421042555857
},
"end_time": {
"value": 1421042555857
}
}
}
          • Related Articles

          • Query to show total time spent for a ticket

            PGSQL: SELECT wo.WORKORDERID AS "Request ID", aau.FIRST_NAME AS "Requester", cd.CATEGORYNAME AS "Category", scd.NAME AS "Subcategory", wo.TITLE AS "Subject", rtdef.NAME AS "Request Type", ti.FIRST_NAME AS "Technician", sdo.NAME AS "Site", ...
          • Script to add worklog using custom schedule

            What is a Custom Schedule? Custom Schedules are actions scheduled on a specific date and time with or without repeat frequency. The actions are specified in a customized script file. Any data from ServiceDesk Plus can be sent to the script through ...
          • Query to show both requests and task worklog time spent together

            MSSQL: select wo.workorderid "Request ID", aau.FIRST_NAME "Requester", cast((((sum(ct.timespent))/1000)/3600) as varchar(20)) +'Hrs '+cast(((((sum(ct.timespent))/1000)/60)) % 60 as varchar(20))+'Mins '+ cast((((sum(ct.timespent))%1000)%60) as ...
          • Query to show total time spent of a technician for the current month_PGSQL

            Query show total time spent by technician for the current month regardless of the ticket created date. PGSQL: SELECT wo.WORKORDERID AS "Request ID", aau.FIRST_NAME AS "Requester", cd.CATEGORYNAME AS "Category", scd.NAME AS "Subcategory", wo.TITLE AS ...
          • Query to show problem time spent along with last activity on a problem

            MSSQL: SELECT "prob"."PROBLEMID" AS "Problem ID",  "prob"."TITLE" AS "Title", "statdef"."STATUSNAME" AS "Status",  "orgaaa"."FIRST_NAME" AS "Reported by", Cast((((sum(ct.timespent))/1000)/3600) as varchar(20)) +'Hrs ...