Worklog V3 API Old Format vs New Format

    The V3 API format for Worklog has been revised.
    To consume the latest format of the API, update the value for Accept key under Headers as shown below:

     

    Accept Header: application/vnd.manageengine.sdp.v3+json



    For an easier transition, we have the below document which captures the differences between V3 API Old and V3 API New format.

    Differences are in the following areas:

     

    Field Names

    OLD

    NEW

    Difference

    technician

    owner

    Name changed for correctness

    inc_nonOperationalHours

    include_nonoperational_hours

    Name changed for correctness

    total_time_spent

    time_spent: {

          hours: 00,

          minutes: 00

        }

    Name changed for correctness. Input is required as a JSON object.

    add_time_linked_requests

    add_time_for_linked_requests

    Name changed for correctness

    worklog_type

    type

    Name changed for correctness

    tech_charge

    owner_cost

    Name changed for correctness as not only technicians but also requesters can have worklog entries in case of project tasks.

    other_charge

    other_cost

    Name changed

    total_charge

    total_cost

     

    Field Restriction  

     

     

    OLD

    NEW

    Difference

    request (editable)

     

    request(read-only)

     

    In the NEW format, the parent JSON is not allowed to be included in the input data, but it is mandatory to be provided in the URL.

    problem (editable)

    problem(read-only)

    change(editable)

    change (read-only)

    task (editable)

    task (read-only)

     

    Newly Included Field

     

    Worklog fields

    API Field Name

    Description

    udf_fields

    In the NEW format, udf_fields are supported.

    add_time_for_linked_requests

    Attribute to decide whether to add worklogs for the requests that are linked to the parent request. This is used during add operation only.

     

     

     

    Worklog fields based on contracts

    API Field Name

    Description

    Applicable to

    accountcontract

    Account contract to which the worklog is going to be associated.

    Hour-based contracts

    enable_operational_time_spent

    Attribute to decide whether to add the operational time spent or not.

    enable_non_operational_time_spent

    Attribute to decide whether to add the non-operational time spent or not.

    enable_weekend_time_spent

    Attribute to decide whether to add the weekend time spent or not.

    enable_holiday_time_spent

    enable_holiday_time_spent

    operational_time_spent

    Total operational time spent on the worklog.

    non_operational_time_spent

    Total non-operational time spent on the worklog.

    weekend_time_spent

    Total operational time spent on the worklog.

    holiday_time_spent

    Total holiday time spent on the worklog.

    is_billable

    Attribute to decide whether the worklog is billable or not.

    additional_cost_items

    To include additional cost items in the worklog.

    Hour-based and incident-based contracts

     

     

    URL Difference

    OLD

    NEW

    Difference

    /api/v3/worklog

    -

    In the NEW format, the direct worklog URL is not supported.

    /api/v3/worklog_timetaken

    /api/v3/{parent}/{id}/worklogs/get_time_spent

    In the NEW format, the direct URL is not supported.

     

     

    Major Difference


    The OLD format will continue to work without any issues, as the OLD and NEW APIs are using different URLs for Worklog API.

    To access the worklog which has the parent entity, the respective parent module's name and its ID need to be provided (in case if it has the grand/g-grandparent, the IDs need to be provided for them too in the URL).

     

    New Bulk Operations 

    The following bulk operations are added for Worklog entities
     

    Operation

    URL

    Input

     

     

    bulk add

     

     

    /api/v3/<parent_name>/<parent_id>/<module_name>

    {

        "<module_name>": [

            {

                "title": "bulk add1"

            },

            {

                "title": "bulk add2"

            }

        ]

    }

    bulk edit

    /api/v3/<parent_name>/<parent_id>/<module_name>?ids={id},{id}

    {

        "<module_name>": [

            {

                "title": "bulk edit2"

            },

            {

                "title": "bulk edit2"

            }

        ]

    }

    bulk delete

    /api/v3/<parent_name>/<parent_id>/<module_name>?ids={id},{id}

    -

     

     

    Worklog UDF PickList format change  

    OLD

    NEW

    Difference

    "udf_fields": {

            "udf_pick_301": "option1"

    }

    {
        "udf_fields": {
            "udf_pick_301": {
                "id": 1,
                "name": "option1"
            }
        }
    }

    UDF picklist has been changed from string to ID based. In the NEW format, the picklist value needs to be provided as a JSON Object.

     

    Zoho Corp. All rights reserved.