Export Audit

This REST API exports the audit records for a range of days or a number of days, such as a month.

The audit records are exported to one or more Comma Separated Values (CSV) files. 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. For more information, see Auditing Tasks and Data.

You can use an optional excludeApplicationId parameter to not write the application identifier in the export file. Exported audit reports without the application identifier cannot be imported back into the application.

You can use maxNumberOfRecordsPerFile to split the export across multiple CSV files when the export exceeds the specified number of records, and all CSV files are then compressed into a single ZIP.

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

Required Roles

Service Administrator and users with the roles Audit - Manage or Audit - View

Using this REST API requires prerequisites, such as understanding how to use jobs. See Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.

Request

Supported Media Types: application/json

Parameters

The following table summarizes the client request parameters specific to this job. For additional parameters that are common to all jobs, see Execute a Job.

Table 8-28 Parameters

Name Description Required Default
jobType Export Audit Yes None
jobName The job name to be used for this job execution. Example: ExportAudit No Export Audit
userNames Comma separated user names. Audit records created by only the specified users are exported. If not specified, audit records created by all users are exported. No None
fileName

The name of the file to which records should be exported. The file containing the exported data is stored in the Oracle Planning and Budgeting Cloud repository.

If fileName is not specified, a file is auto-generated with a name containing the user name, current date, and time stamp. For example, test_admin_AuditRecords_2019-02-26-04-34-45-420.zip

No The file name is auto-generate
maxNumberOfRecordsPerFile

An optional parameter that suggests how many records should be written per file.

Min value: -100,000

Max value: - 1,000,000

If the export exceeds this limit, output is split into multiple CSV files within the ZIP.

No -1 (all records)
nDays Number of days for which audit records should be exported.

Possible values are:

  • 1: Export audit records for the last 24 hours
  • 2: Export audit records for the last two days
  • 7: Export audit records for the last seven days
  • 30: Export audit records for the last 30 days
  • 60: Export audit records for the last 60 days
  • 180: Export all existing audit records for the last 180 days
  • All: Export all audit records

    Note: Audit information is maintained for up to 365 days from the current system date.

No 7
excludeApplicationId

Optionally, you can specify if the application identifier should be written in the export file.

Possible values: true or false

This parameter can benefit those customers who do not want the application identifier to be included in the export file to help import into their own systems. This export file cannot be used to import into a Oracle Fusion Cloud EPM environment.

No false
startDate

A start date in the format YYYY-MM-DD.

The start date must be earlier than the end date and cannot be later than the current date. If the ndays parameter is used, it takes precedence over the start and end dates.

No None
endDate

An end date in the format YYYY-MM-DD.

The end date must be later than the start date and cannot be later than the current date. If the ndays parameter is used, it takes precedence over the start and end dates.

No None

Notes:

  • This job does not export records based on group names.
  • If a user name contains a comma, escape the comma in the request. For example, if a user name is test,User then add test\\,User to the request.

For a sample URL, see Sample URL and Payload in Execute a Job.

Sample Payload

Example 1: Exports the last 180 days of audit records to the ExportAuditLast180Days.zip file.

{
    "jobType": "Export Audit",
    "jobName": "Export180DaysAudit",
    "parameters": {
        "fileName": "ExportAuditLast180Days.zip",
	      "ndays": "180"
    }
}

Example 2: Exports the last seven days of audit records created by planner1 and planner2. Records are exported to a zip file with an auto-generated file name.

{
    "jobType": "Export Audit",
    "jobName": "AllAuditRecordsOfPlanners",
    "parameters": {
	     "userNames": "planner1, planner2"
    }
}

Example 3: Exports the last 180 days of audit records to the ExportAuditLast180Days.zip file. The application identifier will be not written in the generated file. This export file cannot be used to import into a Cloud EPM environment.

{
    "jobType": "Export Audit",
    "jobName": "Export180DaysAudit",
    "parameters": {
        "fileName": "ExportAuditLast180Days.zip",
	  "ndays": "180",
        "excludeApplicationId": "true"
    }
}

Example 4: Exports the last three months of audit records.

{
    "jobType": "Export Audit",
    "jobName": "ExportLast3MonthsAudit",
    "parameters": {
        "fileName": "Last3MonthsAudit.zip",
        "startDate" : "2024-05-01",
        "endDate" : "2024-08-31"
    }
}

Example 5: Export Audit data using maxNumberOfRecordsPerFile parameter.

{
  "jobType": "Export Audit",
  "jobName": "ExportAuditData",
  "parameters": {
    "fileName": "exportAuditData8.zip",
    "ndays": "All",
    "maxNumberOfRecordsPerFile": 1000000
  }
}