Initiate an audit log export
post
/api/rest/2.0/data/auditLog/reportExport
Creates a request for an audit log export that matches the criteria specified by the request body.
Request
Supported Media Types
- application/json
Audit log export request
Root Schema : AuditLogReportRequest
Type:
object
Title:
Show Source
AuditLogReportRequest
-
actionName:
string
The event action to filter for the audit log. Possible values include:
all
,create
,modify
,delete
,archive
andunarchive
. For campaigns, possible values also include:activated
,deactivated
,pause
, andscheduleForActivation
. If not specified, defaults toall
. -
assetTypes:
string
The asset type for the Audit log. Required if
auditReportType
is set toassets
. Possible values include:forms
,programs
,campaigns
,emails
, andlandingPages
. Specify multiple asset types by comma separating values. -
auditReportType:
string
Specifies the Audit Report Type to generate. Possible values include:
assets
(asset history),securityGroup
(security group history),userProfile
(user profile history),userLogin
(user login history),dataExport
(export history), anddataUpload
(upload history). -
endDate:
string
The end date and time (10 digit integer Unix time). This property is required.
-
fileFormat:
string
File format to be exported. Possible values include:
delimitedFile
orExcel2007
. -
notificationEmail:
string
Email address for export notification. This property is required.
-
startDate:
string
The start date and time (10 digit integer Unix time). This property is required.
-
status:
string
For
dataUpload
anddataExport
audit reports, you can filter on the status. Possible values include:completed
,in progress
,queued
,waiting
,failed
, andinactive
. -
type:
string
This property is not used.
-
userName:
string
The user name to filter on.
Response
Supported Media Types
- application/json
201 Response
Request for the audit log has been registered. An email containing a link to the exported data will be sent to the email address for export notification
400 Response
Bad request. See Status Codes for information about other possible HTTP status codes.
401 Response
Unauthorized. See Status Codes for information about other possible HTTP status codes.
403 Response
Forbidden. See Status Codes for information about other possible HTTP status codes.
404 Response
The requested resource was not found. See Status Codes for information about other possible HTTP status codes.
500 Response
The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Examples
The following examples demonstrate how to create a request for an audit log using an HTTP request and cURL. For more information on requests, see API requests.
HTTP Request Example
Initiate an audit log export for campaign assets for all actions:
POST /api/REST/2.0/data/auditlog/reportExport
Content-Type: application/json
Request body:
{
"auditReportType": "assets",
"startDate": "1546837200",
"endDate": "1547528400",
"notificationEmail": "API.User@oracle.com",
"fileFormat": "delimitedFile",
"assetTypes": "campaigns",
"actionName": "all"
}
Response:
201 Created
cURL Example
Here is the same example in cURL given an instance with the name APITest
, username API.User
, and POD of 3
.
curl --user "APITest\API.User" --header "Content-Type: application/json" --request POST --data '{"auditReportType":"assets","startDate":"1483729793","endDate":"1546780193","notificationEmail":"API.User@oracle.com","fileFormat":"delimitedFile","assetTypes":"campaigns","actionName":"all"}' https://secure.p03.eloqua.com/api/rest/2.0/data/auditlog/reportExport
HTTP Request Example
Initiate an audit log export for forms and landing pages for all actions:
POST /api/REST/2.0/data/auditlog/reportExport
Content-Type: application/json
Request body:
{
"auditReportType": "assets",
"startDate": "1546837200",
"endDate": "1547528400",
"notificationEmail": "API.User@oracle.com",
"fileFormat": "Excel2007",
"assetTypes": "forms, landingPages",
"actionName": "all"
}
Response:
201 Created
cURL Example
Here is the same example in cURL given an instance with the name APITest
, username API.User
, and POD of 3
.
curl --user "APITest\API.User" --header "Content-Type: application/json" --request POST --data '{"auditReportType":"assets","startDate":"1546837200","endDate":"1547528400","notificationEmail":"API.User@oracle.com","fileFormat":"Excel2007","assetTypes":"forms, landingPages","actionName":"all"}' https://secure.p03.eloqua.com/api/rest/2.0/data/auditlog/reportExport