Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    jagadeesh gattupalli
    Oracle Service cloud Audit logs Resource for REST API
    Topic posted November 19, 2019 by jagadeesh gattupalliBlue Ribbon: 750+ Points, tagged REST 
    27 Views, 7 Comments
    Title:
    Oracle Service cloud Audit logs Resource for REST API
    Summary:
    Need Audit logs Resource for Service Cloud REST API
    Content:

    Hi ,

    Does any one worked on  how to get Audit Logs for each resource like Contacts , Incidents , Accounts and Organizations etc.? through REST API.

    Please let me know. It is urgent.

    Regards

    Jagadeesh G

     

    Version:
    19B

    Comment

     

    • jagadeesh gattupalli

      I need audit log with action descriptions with timestamps. 

    • Sebastiaan Draaisma

      I think you would need to create your own audit log for this (CO & CPM) and then you have access to your CO through API

      • jagadeesh gattupalli

        Hi Sebastian,

         

        I can see audit log for the Incidents Incident editor.  Is there a way I can query the base table of that report through REST API. If not why service cloud not enabling this feature for users?

         

        Regards

        Jagadeesh G

    • Tushar Gupta

      You can create a report of the transactions table with all the filters that you require. Then you can export through that report. 

      If you want to export in bulk, then a .net Add-In can be made and you can export through that. 

      • jagadeesh gattupalli

        Hi Tushar,

        Is there a way I can query the Transaction table from REST API.

        Regards

        Jagadeesh G

         

         

        • Tushar Gupta

          Hi jagdeesh,

          Yes, you can get the data but only limited columns:

          https://test.custhelp.com/services/rest/connect/v1.4/queryResults/?query=SELECT ID, transactions.* FROM contacts WHERE ID < 10000 LIMIT 25

          Columns which you will be getting:
           "id",
           "account",
           "operation",
           "operationTime"

           

    • Levi D

      Hi Jagadeesh,

      The audit logs for the standard items (incident, contact, organization) are standard reports.  You can identify the report by looking at the audit log in a workspace.  Once you have the report (I recommend getting the report ID), it can be ran in REST with this endpoint:  /services/rest/connect/v1.4/analyticsReportResults.  For example the Incident Audit Log report has an ID of 9041 and two filters (Incident ID and Exclude Transactions of Type).  With your REST request use the ID and set the filter Incident ID to get the audit log for a specific incident.  Check out this link for examples of how to run a report by ID and set filters:  https://docs.oracle.com/en/cloud/saas/b2c-service/19d/cxsvc/c_osvc_executing_analytics_reports.html