User Audit Report (v2)

The User Audit Report (v2) REST API generates a user audit report in the environment and writes the report to the filename provided. The output CSV file contains the first character as a Byte Order Mark(BOM) character \ufeff. The API writes an encrypted application identifier following the BOM character. This application identifier is written between double quotes. Headers for the CSV file follow the application identifier. The report contains the details regarding the users logged into the environment in a given time range.

The generated CSV file is compressed and the output is a ZIP file. The file can be downloaded using the Download REST API.

This is an asynchronous command, so use the job status URI to determine whether the operation is complete.

This API is version v2.

Required Roles

Service Administrator

Table 12-73 User Audit Report

Task Request REST Resource
User Audit Report POST

/interop/rest/v2/reports/useraudit

REST Resource

POST /interop/rest/v2/reports/useraudit

Note:

Before using the REST resources, you must understand how to access the REST resources and other important concepts. See Implementation Best Practices for EPM Cloud REST APIs. Using this REST API requires prerequisites. See Prerequisites.

Request

Supported Media Types: application/json

The following table summarizes the request parameters.

Table 12-74 Parameters

Name Description Type Required Default
fileName File where report is to be populated Payload Yes None
since Report generation start date Payload Yes None
until Report generation end date Payload Yes None

Example URL and Payload

https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/reports/useraudit
{   
    "fileName": "userauditreport.csv",
    "since": "2022-10-01",
     "until":"2022-11-01"
}

Response

Supported Media Types: application/json

Table 12-75 Parameters

Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to get the status of the import operation
data Parameters as key value pairs passed in the request

Example of Response Body

The following shows an example of the response body in JSON format.

{
    "details": null,
    "status": -1,
    "links": [
        {
            "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/reports/useraudit",
            "action": "POST",
            "rel": "self",
            "data": null
        },
        {
            "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/status/jobs/22747152577657842",
            "action": "GET",
            "rel": "Job Status",
            "data": null
        }
    ]
}

Sample cURL command

curl -X POST -s -u '<USERNAME>:<PASSWORD>' -o response.txt -D respHeader.txt -H
'Content-Type:application/json' -d '{"fileName":"userauditreport.csv","until":"2022-11-01",
"since":"2022-10-01"}''https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/reports/useraudit'