IT Process Automation

Expand all | Collapse all

CA Service Desk (SOAP API) - Create/Read worklog method?

  • 1.  CA Service Desk (SOAP API) - Create/Read worklog method?

    Posted 09-21-2019 01:07 PM
    ​Hi,

    I am trying to integrate an automation tool with the Service Desk using the SOAP api.

    I'm able to successfully login/logout, create incident and update the activity log using the documentation provided.

    Is there a method or a way to update worklog or read worklog comments on the ticket?

    Any suggestions or sample code would be helpful.

    Thank you!


  • 2.  RE: CA Service Desk (SOAP API) - Create/Read worklog method?

    Posted 28 days ago
    Edited by James Culpovich 28 days ago
    Greetings!

    To get the comments, you'll need 3 calls total. First, use getRelatedList passing in the SID, ticket handle, and "act_log_all". This returns a list handle. Second, use getListValues and pass in the list handle you received from the first step. This will return the activity log of the ticket. Lastly, use freeListHandles to release the generated list from memory.

    EDIT: To add a comment, you'll want the LogComment call


  • 3.  RE: CA Service Desk (SOAP API) - Create/Read worklog method?

    Posted 28 days ago
    James,
    Thanks for responding.

    Let me try this out and see if this is what I need to do to read or update worklog.

    I have put a screenshot of what I'm trying to read (from the UI). Hope that helps you correlate to what's the right method I need to use.​


  • 4.  RE: CA Service Desk (SOAP API) - Create/Read worklog method?

    Posted 28 days ago
    ​Hello James,

    As you had indicated, I pulled the ticket handle and passed it into getRelatedList() to get a list handle.

    As a second step, I invoked the getListValues(), with the sid, objectHandle, listName and numToFetch from the previous request.
    But this call is failing with an error - invalid parameter.

    I've commented out some additional parameters in this request and am not sure if that's the reason for the error.

    Attaching the two requests screenshots, can you please see what I might be missing here?

    Thank you!


  • 5.  RE: CA Service Desk (SOAP API) - Create/Read worklog method?

    Posted 27 days ago
    Based on the screenshot you are using getRelatedListValues, not getListValues. For getListValues you'll want to specify your SID, the list handle, start index (I usually use 0), end index (-1 will get you the whole list), and the attributes you want pulled. You will need to specify at least one. I have included a screenshot of what a successful call looks like including the 4 attributes I usually pull.

    More information on the API call can be found here.




  • 6.  RE: CA Service Desk (SOAP API) - Create/Read worklog method?

    Posted 28 days ago
    Hi Ashok,

    You can get records from any object using the doSelect method. You can update records using the updateObject method.

    When you say "worklog" do you mean the Activity Log (alog) or the Classic Workflow task log?

    Cheers,
    Lindsay

    ------------------------------
    Lindsay Estabrooks
    Principal Consultant
    IT-EDU Consultants
    ------------------------------



  • 7.  RE: CA Service Desk (SOAP API) - Create/Read worklog method?

    Posted 28 days ago
      |   view attached
    Lindsay,

    Thanks for responding.

    The Service Desk UI reads "Worklog". This is where all comments and details updated by the support analyst is recorded.

    I've pasted a sanitized screenshot to show what I'm trying to read/update.

    I already am able to createActivityLog(), which creates an update in the "Activities" tab, but that's not what I'm trying to accomplish.​





  • 8.  RE: CA Service Desk (SOAP API) - Create/Read worklog method?

    Posted 28 days ago
    Hi Ashok,

    Your screen shot reveals that there has been some customization of Service Desk at your site. Work Log is not an Out-of-the-Box object. You would need to examine the form file that displays that Work Log tab to find out what object is being referenced.

    Cheers,
    Lindsay

    ------------------------------
    Lindsay Estabrooks
    Principal Consultant
    IT-EDU Consultants
    ------------------------------



  • 9.  RE: CA Service Desk (SOAP API) - Create/Read worklog method?

    Posted 28 days ago
      |   view attached
    ​Hi Lindsay,

    I looked at the form and it shows all typical html elements, except for pdmqa="Work Log".
    I'm not sure how to go from here to figure out what object would hold the work log information.

    Any tips?

    Thank you!