Get an audit report

post

/fscmRestApi/fndAuditRESTService/audittrail/getaudithistory

Get an audit report

Request

Query Parameters
  • 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.
  • The fully qualified view object name of the product to be included in the audit report.
  • A comma-separated list of events you want to include in the audit report such as insert, delete, update, or all events.
  • 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.
  • Indicates whether the audit report includes business object attributes that were changed in the specified time period. The default value is true.
  • Indicates whether to include the child objects of the business object in the audit report. The default value is false.
  • Indicates whether to include the context information for the business objects. The default value is false.
  • Indicates whether to include the impersonator name in the audit report. The default value is false.
  • The page number in the audit report you want to view.
  • The number of records displayed in a page, in the audit report.
  • A predefined product value provided in the request. The valid values are available in the FND_AUDIT_WEBAPP_AM table.
  • The timezone to be used for the specified period of the audit report. The valid values are availbale in the FND_TIMEZONES_VL view.
  • 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.
  • The display name of the user.

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

The following table describes the response for this task.
Body ()
Root Schema : auditHistory
Type: object
Show Source
Nested Schema : Audit data
Type: array
Title: Audit data
The audit data retrieved for the specified criteria.
Show Source
Nested Schema : auditData
Type: object
Show Source
  • Attribute Details
    Title: Attribute Details
    The attribute details displayed in the audit report. To inlcude these details, set includeAttributes attribute to true.
  • Title: Business Object(display name)
    The display name of the business object.
  • Title: Context Name1
    The display name of the first context attribute that defines the context of the change in the view object. The context name/value pairs are included in the audit report only when includeExtendedObjectIdentiferColumns attribute is set to true.
  • Title: Context Name2
    The display name of the second context attribute that defines the context of the change in the view object.
  • Title: Context Name3
    The display name of the third context attribute that defines the context of the change in the view object.
  • Title: Context Value1
    The value of the first context attribute defined in the view object.
  • Title: Context Value2
    The value of the second context attribute defined in the view object.
  • Title: Context Value3
    The value of the third context attribute defined in the view object.
  • Title: Date
    The date when the audit record was inserted, updated, or deleted.
  • Title: Event description
    The description of the event.
  • Title: Event description(internal name)
    The internal description of the event.
  • Title: Event Type
    The type of event such as insert, delete, update, or all events.
  • Title: Impersonator name
    The name of the impersonator.
  • Title: Business Object(internal name)
    The fully qualified view object name.
  • Title: User internal name
    The internal name of the user.
  • Title: User display name
    The display name of the user retrieving the audit report.
Nested Schema : Attribute Details
Type: array
Title: Attribute Details
The attribute details displayed in the audit report. To inlcude these details, set includeAttributes attribute to true.
Show Source
Nested Schema : attributeDetails
Type: object
Show Source
Back to Top

Examples

The following example shows how to create audit history report by submitting a POST request on the REST resource using cURL.

curl -i --user <user_name:password> -H "Content-Type: application/json" -X POST --data @<@example_request_payload.json> https://<hostname>:<port>/fscmRestApi/fndAuditRESTService/audittrail/getaudithistory

Example Request Payload

The following example shows the contents of the request body in JSON format:

{
    "fromDate": "2017-01-01",
    "toDate": "2017-01-27",
    "product": "hcmCore",
    "businessObjectType": "oracle.apps.hcm.people.core.uiModel.view.ManagePersonVO",
    "includeChildObjects":"true"
}

Example of Response Header

The following shows an example of the response header.

Status: HTTP/1.1 200 OK
Content-Type : application/json

Example of Response Body

The following example shows the contents of the response body in JSON format:

{
  "status": "SUCCESS",
  "actionName": "getAuditHistory",
  "auditData": [
    {
      "date": "2017-01-24 16:35:28",
      "userName": "Roger ZCMP_CWB_Federer",
      "userInternalName": "HCM_USER2"
      "eventType": "Object Data Insert",
      "businessObject": "Person Email",
      "qualifiedBusinessObject":"oracle.apps.hcm.people.core.uiModel.view.ManagePersonEmailAddressVO",
      "description": "Person ID:Testing1 Termination Test1/PersonId:Termination Test1",
      "attributeDetails": [
            {
                "attribute": "PersonId",
                "attributeInternalName": "PersonId",
                "newValue": "Termination Test1"
            },
            {
                "attribute": "E-Mail",
                "attributeInternalName": "EmailAddress",
                "newValue": "TerminationTest1@oracle.com"
            },
            {
                "attribute": "Type",
                "attributeInternalName": "EmailType",
                "newValue": "Work E-Mail"
            }
        ]
    },
    {
      "date": "2017-01-24 16:35:28",
      "userName": "Roger ZCMP_CWB_Federer",
      "userInternalName": "HCM_USER2"
      "eventType": "Object Data Update",
      "businessObject": "Person Detail", 
      "qualifiedBusinessObject":"oracle.apps.hcm.people.core.uiModel.view.ManagePersonDetailVO",
      "description": "Person ID:Testing1 Termination Test1/Person ID:Termination Test1",
      "attributeDetails": [
            {
                "attribute": "PersonId",
                "attributeInternalName": "PersonId",
                "newValue": "Termination Test1",
                "oldValue": "Termination Test"
            },
            {
                "attribute": "Start Date",
                "attributeInternalName": "StartDate",
                "newValue": "2009-10-20",
                "oldValue": "2017-01-01"
            },
            {
                "attribute": "Primary Mailing",
                "attributeInternalName": "MailingAddressId",
                "newValue": "100000012674101",
                "oldValue": "100000012674100"
            },
            {
                "attribute": "Person Number",
                "attributeInternalName": "PersonNumber",
                "newValue": "100000012674086",
                "oldValue": "100000012674085"
            }
        ]
     }
  ]
}

The following example shows how to create audit history report by submitting a POST request on the REST resource for the OPSS product.

Example Request Payload

The following example shows the contents of the request body in JSON format:

{
    "fromDate": "2017-01-01",
    "toDate": "2017-01-30",
    "product": "OPSS"
}

Example of Response Body

The following example shows the contents of the response body in JSON format:

{
  "status": "SUCCESS",
  "actionName": "getAuditHistory",
  "auditData": [
    {
      "date": "2017-01-24 05:39:22",
      "userName": "Roger ZCMP_CWB_Federer",
      "userInternalName": "HCM_USER2"
      "eventType": "RoleMembershipAdd"
      "description": "Add principal(s) to app role ORA_PAY_PAYROLL_ADMINISTRATOR_JOB successful in APPLICATION scope",
      "attributeDetails": [
            {
                "attribute": "Code Source",
                "attributeInternalName": "CodeSource",
                "newValue": "file:/scratch/aime/work/APPTOP/fusionapps/applications/hcm/deploy/EarHcmCore.ear/APP-INF/lib/AdfHcmApplicationsSecurityFaPolicyStoreService.jar"
            },
            {
                "attribute": "Principals",
                "attributeInternalName": "Principals",
                "newValue": "[]"
            },
            {
                "attribute": "Managed Application",
                "attributeInternalName": "ManagedApplication",
                "newValue": "obi",
                "newValueId": "W1"
            }
                {
                "attribute": "Application Role",
                "attributeInternalName": "ApplicationRole",
                "newValue": "ORA_PAY_PAYROLL_ADMINISTRATOR_JOB"
            },
            {
                "attribute": "Enterprise Roles",
                "attributeInternalName": "EnterpriseRoles",
                "newValue": "([(Name:Palerra_test01@oracle.com) (GUID:null) (Unique name:null) (Class name:weblogic.security.principal.WLSUserImpl) (AppID:null) (Type:CUSTOM)])"
            },
            {
                "attribute": "Permission Scope",
                "attributeInternalName": "PermissionScope",
                "newValue": "APPLICATION"
            }
        ]
    }
  ]
}
Back to Top