Editing Logging and Audit Levels Using REST API

Learn how to manage logs using the REST API.


Overview

You can customize the audit level for system-level and job logs, and you can set the number of days the system log is retained.

Log/Audit Level

The audit level determines the information included in the log.

  • error: Logs only errors
  • warn: Logs warnings and errors.
  • info: Includes all basic logging, warnings, and errors. This is the system default.
  • trace: Includes all log levels. This setting is ideal for debugging.

Log Level Info

A log Level of “info” is required for full DryvIQ Report functionality.

 

Set Retention Days

The retention days setting determines how long the system log is retained. The default value is 21 days.

Audit Level and Retention Days Example

POST {{url}}v1/diagnostics/logs/configuration
{
   "level": "trace",
   "retention_days": 21
}

Job Level Logging Example

POST {{url}}v1/jobs
{
   "name":"Simple Job",
   "kind": "transfer",
   "transfer": {
     "transfer_type": "copy",
     "batch_mode": "always",
     "audit_level": "info",
     "permissions": {
           "policy": "add",
           "failures": "exceptions"
     },
     "timestamps": true,
     "empty_containers": "create",
     "versioning": {
           "preserve": "native",
           "select": "latest"
    },
       "source": {
           "connection": { "id": "{{cloud_connection_source}}" },
           "target": {
               "path": "/SourceFolder"
           }
       },
       "destination": {
           "connection": { "id": "{{cloud_connection_destination}}" },
           "target": {
               "path": "/DestinationFolder"
           }
       },
       "simulation_mode": false
   },
   "schedule": {
       "mode": "manual"
   },
   "stop_policy": {
       "on_success": 5,
       "on_failure": 5,
       "on_execute": 25
   },
   "category": {
     "name": "Report | Simple Job"
   }
}