Supplier Management

Get Involved. Join the Conversation.

Topic

    Shivani Roy
    How to Get Supplier Audit History Using REST API
    Topic posted December 26, 2018 by Shivani RoyBlue Ribbon: 750+ Points, tagged Audit, How-To, Web Services 
    68 Views, 2 Comments
    Title:
    How to Get Supplier Audit History Using REST API
    Summary:
    Oracle Applications Cloud provide public REST APIs you can use to support integration requirements for the common features like roles, users, user requests etc. One of them is the audit report resourc
    Content:

    How to get audit report using the REST API

    REST Service Name: Get Audit Report

    • Rest method: POST

              The user will have to use the REST POST method to post a request to retrieve audit reports response.

    • Path:
      The request path to be added in REST should be in the below format.

               https://<hostname>:<port>/fscmRestApi/fndAuditRESTService/audittrail/getaudithistory

    • Content Type: application/json

               The content type of request and response is in the json format

    • Request Parameters:
      Following table explains each of the query parameters which can be used in the request payload. These correspond to the actual search criteria available on the audit reports page.

    Query Parameter

    Data Type

    Description

    attributeDetailMode

    boolean

    Indicates whether the old and new attribute values are returned. If true, the old and new values are retrieved. If false, the response contains only attribute names, and not old and new values. The default value is false.

    On the audit reports UI this corresponds to ‘Show Attribute Details’ check box.

    businessObjectType

    String

    The fully qualified view object name. In this case it will be "oracle.apps.prc.poz.suppliers.protectedModel.

    core.view.AuditSupplierVO"

    eventType

    String

    A comma-separated list of events you want to search. Valid values are : Object Data Insert, Object Data Update, Object Data Delete, All

    fromDate

    String

    The date from which the audit history is to be retrieved. The format of the date can be yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. You can retrieve audit history for up to one month.

    toDate

    String

    The date up to which the audit report data is to be retrieved. The format of the date can be yyyy-MM-dd or yyyy-MM-dd HH:mm:ss.

    includeChildObjects

    boolean

    Indicates whether to include the child objects in the audit report. The default value is false. The child objects for Supplier will be address, contact, sites, business classifications, product and services, bank accounts.

    includeImpersonator

    boolean

    Indicates whether to include the impersonator name in the audit report. The default value is false.

    product

    String

    A predefined product value provided in the request. It will be ‘Procurement’ in this context.

    user

    String

    The display name of the user who has created or updated the supplier.

    includeAttributes

    boolean

    Indicates whether the audit report includes attribute details that were changed in the specified time period. The default value is true. On the audit reports UI this corresponds to ‘Show Attribute Details’ check box.

    includeExtendedObjectIdentiferColumns

     

    boolean

    Indicates whether to include the context information for the business objects. The default value is false. This corresponds to ‘Show additional object identifier columns’ checkbox in the Audit Reports UI

    timeZone

    String

    The timezone to be used for the specified period of the audit report.

    pageSize

    number

    The number of records displayed in a page, in the audit report.

    pageNumber

    number

    The page number in the audit report you want to view.

    Sample request payload to retrieve all the supplier records which was inserted, updated or deleted in the given date range.

                {

                   "fromDate":"2018-10-15 00:00:00",

                   "toDate":"2018-10-15 23:59:59",

                   "product":"procurement",

                  "businessObjectType":"oracle.apps.prc.poz.suppliers.protectedModel.core.view.AuditSupplierVO",  

                  "includeChildObjects":"true",

                   "includeAttributes":"true",

                   "eventType":"All",

                   "attributeDetailMode":"true",

                   "timeZone":"UTC"

                   }

    • Response Parameters:
      Following table explains each of the response properties returned as part of the REST response. These correspond to the actual attributes in the audit search results table.

    Response property

    Data Type

    Title

    Description

    actionName

    string

    Action Name

    The request method name for which the response is retrieved. Since we are retrieving audit history it will be ‘getAuditHistory’

    auditData

    array

    Audit Data

    The audit data retrieved for the specified criteria. This section contains results similar to the ones fetched in audit reports.

    status

    string

    Status

    The status of the audit report. The valid values are 200-success, 400-Bad request, 401-Authentication error, 403-Authorization error, and 500-Internal server error.

    pageSize

    string

    Page Size

    The number of records displayed per page in the audit report.

    pageNumber

    string

    Page Number

    The number of records displayed per page in the audit report.

    Sample response payload with audit report results for Supplier: Automotive Supplier.

    Updates were made to attributes: Federal reportable and TaxVerificationDate.
    {
        "auditData": [
            {
                "date": "2018-10-15 12:29:00",
                "descriptionInternal": "Supplier:949",
                "userInternalName": "CVBUYER01",
                "attributeDetails": [
                    {
                        "oldValueId": "N",
                        "newValueId": "Y",
                        "attribute": "Federal reportable",
                        "attributeInternalName": "FederalReportableFlag",
                        "newValue": "Yes",
                        "oldValue": "No"
                    },
                    {
                        "attribute": "Verification Date",
                        "attributeInternalName": "TaxVerificationDate",
                        "newValue": "2018-08-02"
                    },
                ],
                "businessObject": "Supplier",
                "qualifiedBusinessObject":
                "oracle.apps.prc.poz.suppliers.protectedModel.core.view.AuditSupplierVO",
                "userName": "Clare Furey",
                "eventType": "Object Data Update",
                "description": "Supplier:Automotive Supplier"
            }
        ],
        "pageSize": "1",
        "status": "SUCCESS",
        "actionName": "getAuditHistory"
    }

     

    You can refer the following document for further details: Common Features in Oracle Applications Cloud R13

    Comment