Download a Log File
/ic/api/integration/v1/monitoring/logs/{id}
Request
- application/json; charset=utf-8
-
id: string
Log file identifier. Valid values are icsflowlog, icsauditlog. The value icsdiagnosticlog has been deprecated since November 2020.
-
q(optional): string
Examples:
{startdate :'2016-09-23 07:07:07' , enddate :'2016-09-23 08:17:07'}
{timewindow:'3d'}
Response
- application/zip
200 Response
404 Response
500 Response
Examples
The following example shows how to download a monitoring log file for integrations to a specified file by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL. For more information about endpoint URL structure, see Send Requests.
Example: Download the diagnostic log file
This command downloads the diagnostic log file to the specified file mylog.zip
in the same directory from which the command was run.
curl -X GET -H 'Authorization: Bearer access_token' -o 'mylog.zip' https://integration.us.oraclecloud.com/ic/api/integration/v1/monitoring/logs/icsdiagnosticlog
Required options for this cURL request:
-o '/path/mylog.zip'
: Location and name of the file in which to save the log file.
Example: Download the icsflowlog log file for the past day
This command downloads the icsflowlog log file to the specified file myicslog.zip
in the same directory from which the command was run. Data for the past day is included.
curl -G -X GET -H 'Authorization: Bearer access_token' -o myicslog.zip --data-urlencode "q={timewindow: '1d'}" https://integration.us.oraclecloud.com/ic/api/integration/v1/monitoring/logs/icsflowlog
Example: Download the audit log file for the past 7 days
This command downloads the icsauditlog log file to the specified file myauditlog.zip
in the same directory from which the command was run. Data for the past 7 days is included.
curl -G -X GET -H 'Authorization: Bearer access_token' -o myauditlog.zip --data-urlencode "q={startdate : '2016-09-23 00:00:00', enddate : '2016-09-30 00:00:00'}" https://integration.us.oraclecloud.com/ic/api/integration/v1/monitoring/logs/icsauditlog