Log export

The Log Export section defines operations for exporting Veeam Backup & Replication logs.

Start Log Export Session

The HTTP POST request to the /api/v1/exportlogs endpoint starts an export session for Veeam Backup & Replication logs. You can export all logs or the logs generated within a particular time range. To download the logs, run the Download Logs request.

Available to: Backup Administrator.

SecurityBearer
Request
header Parameters
x-api-version
required
string
Default: 1.3-rev2

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Request Body schema: application/json
required
exportType
required
string (ExportLogsType)

Log collection scope.

Enum Value Description
DateRange

Veeam Backup & Replication will export the logs generated within a certain time range.

All

Veeam Backup & Replication will export all logs. Note that this may result in a very large log bundle.

scopeType
required
string (ExportLogsScopeType)

Log collection scope.

Enum Value Description
Hosts

Veeam Backup & Replication exports the logs generated by the components installed on the specified hosts.

Jobs

Veeam Backup & Replication exports the logs generated by the specified jobs.

dateFrom
string <date-time>

Date and time marking the beginning of the period for which you want to export logs.

dateTo
string <date-time>

Date and time marking the end of the period for which you want to export logs.

hostIds
Array of strings <uuid>

Array of managed server IDs whose component logs need to be exported. If an empty list is provided, the backup server ID is used.

jobIds
Array of strings <uuid>

Array of job IDs whose logs need to be exported. Required if the scopeType property is set to Jobs.

exportLocalPgLogs
boolean

If true, local PostgreSQL instance logs are collected.

Responses
201

OK

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

post/api/v1/exportlogs
Request samples
application/json
{
  • "exportType": "DateRange",
  • "scopeType": "Jobs",
  • "dateFrom": "2025-04-12T08:06:40.141Z",
  • "dateTo": "2025-04-14T08:06:40.141Z",
  • "jobIds": [
    ]
}
Response samples
application/json
{
  • "sessionType": "LogsExport",
  • "state": "Stopped",
  • "id": "320e895f-6c1a-410f-bd5a-96d1ca78ff84",
  • "name": "Log Export",
  • "jobId": "320e895f-6c1a-410f-bd5a-96d1ca78ff84",
  • "creationTime": "2025-04-14T11:20:18.233101+02:00",
  • "endTime": "2025-04-14T11:21:02.349317+02:00",
  • "progressPercent": 100,
  • "result": {
    },
  • "usn": 730541
}

Download Logs

The HTTP GET request to the /api/v1/exportlogs/{sessionId}/download endpoint downloads the logs generated by the specified export session as a ZIP file.

Available to: Backup Administrator.

SecurityBearer
Request
path Parameters
sessionId
required
string <uuid>

ID of the log export session. To get the ID, run the Get All Sessions request.

header Parameters
x-api-version
required
string
Default: 1.3-rev2

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Responses
200

OK

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

404

Not found. No object was found with the path parameter specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

get/api/v1/exportlogs/{sessionId}/download
Request samples
Response samples
application/json
{
  • "errorCode": "AccessDenied",
  • "message": "Unauthorized. Get bearer JWT token at /api/login"
}