Jobs

The Jobs section defines paths and operations for managing jobs that are coordinated by the backup server.

NOTE
In the current version, the REST API supports only jobs of the Backup type that include only VMware vSphere objects of the following types: VirtualMachine, vCenterServer, Datacenter, Cluster, Host, ResourcePool, Folder, Template, Tag, Datastore and DatastoreCluster. Objects with tags combination (or Multitag) are not supported.

Get All Jobs

The HTTP GET request to the /api/v1/jobs path allows you to get an array of all jobs coordinated by the backup server.

SecurityBearer
Request
query Parameters
skip
integer <int32>

Number of jobs to skip.

limit
integer <int32>

Maximum number of jobs to return.

orderColumn
string (EJobFiltersOrderColumn)

Sorts jobs by one of the job parameters.

Enum: "Name" "Type" "Description"
orderAsc
boolean

Sorts jobs in the ascending order by the orderColumn parameter.

nameFilter
string

Filters jobs by the nameFilter pattern. The pattern can match any job parameter. To substitute one or more characters, use the asterisk (*) character at the beginning, at the end or both.

typeFilter
string (EJobType)

Filters jobs by job type.

Value: "Backup"
header Parameters
x-api-version
required
string
Default: 1.1-rev0

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.

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/jobs
Request samples
Response samples
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Create Job

The HTTP POST request to the /api/v1/jobs path allows you to create a new job that has the specified parameters.

SecurityBearer
Request
header Parameters
x-api-version
required
string
Default: 1.1-rev0

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

Request Body schema: application/json
required
name
required
string

Name of the job.

description
required
string

Job description specified at the time of the job creation.

type
required
string (EJobType)

Type of the job.

required
object (BackupJobGuestProcessingModel)

Guest processing settings.

isHighPriority
required
boolean
Default: false

If true, the job has a high priority in getting backup infrastructure resources.

required
object (BackupScheduleModel)

Job scheduling options.

required
object (BackupJobStorageModel)

Backup storage settings.

required
object (BackupJobVirtualMachinesSpec)

Arrays of objects that you want to back up or exclude from the backup.

Responses
201

Job has been created.

400

Bad request. This error is related to POST/PUT requests. The request body is malformed, incomplete or otherwise invalid.

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/jobs
Request samples
application/json
{
  • "type": "Backup",
  • "name": "Backup Job 3",
  • "description": "Created by ENTERPRISE01\\Administrator",
  • "isHighPriority": false,
  • "virtualMachines": {
    },
  • "storage": {
    },
  • "guestProcessing": {
    },
  • "schedule": {
    }
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "type": "Backup",
  • "isDisabled": true,
  • "isHighPriority": true,
  • "virtualMachines": {
    },
  • "storage": {
    },
  • "guestProcessing": {
    },
  • "schedule": {
    }
}

Get All Job States

The HTTP GET request to the /api/v1/jobs/states path allows you to get an array of all job states. The states include brief job information that you can also find under the Jobs node in the Veeam Backup & Replication console.

SecurityBearer
Request
query Parameters
skip
integer <int32>

Number of job states to skip.

limit
integer <int32>

Maximum number of job states to return.

orderColumn
string (EJobStatesFiltersOrderColumn)

Sorts job states by one of the state parameters.

Enum: "Name" "Type" "Status" "LastRun" "LastResult" "NextRun" "Description" "RepositoryId" "ObjectsCount"
orderAsc
boolean

Sorts job states in the ascending order by the orderColumn parameter.

idFilter
string <uuid>

Filters job states by job ID.

nameFilter
string

Filters job states by the nameFilter pattern. The pattern can match any state parameter. To substitute one or more characters, use the asterisk (*) character at the beginning, at the end or both.

typeFilter
string (EJobType)

Filters job states by job type.

Value: "Backup"
lastResultFilter
string (ESessionResult)

Filters job states by status with which jobs must finish.

Enum: "None" "Success" "Warning" "Failed"
statusFilter
string (EJobStatus)

Filters job states by current status of the job.

Enum: "running" "inactive" "disabled"
workloadFilter
string (EJobWorkload)

Filters job states by workloads that jobs must process.

Enum: "application" "cloudVm" "file" "server" "workstation" "vm"
lastRunAfterFilter
string <date-time>

Returns job states for jobs that have run after the specified date and time.

lastRunBeforeFilter
string <date-time>

Returns job states for jobs that have not run after the specified date and time.

isHighPriorityJobFilter
boolean

If true, Returns job states for jobs with high priority.

repositoryIdFilter
string <uuid>

Filters job states by repository ID.

objectsCountFilter
integer

Filters job states by number of objects processed by the job.

header Parameters
x-api-version
required
string
Default: 1.1-rev0

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.

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/jobs/states
Request samples
Response samples
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Get Job

The HTTP GET request to the /api/v1/jobs/{id} path allows you to get a job that has the specified id.

SecurityBearer
Request
path Parameters
id
required
string <uuid>

ID of the job.

header Parameters
x-api-version
required
string
Default: 1.1-rev0

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/jobs/{id}
Request samples
Response samples
application/json
{
  • "isHighPriority": false,
  • "virtualMachines": {
    },
  • "storage": {
    },
  • "guestProcessing": {
    },
  • "schedule": {
    },
  • "type": "Backup",
  • "id": "75fc491a-d158-4380-a433-ebc42a28e4df",
  • "name": "Oracle Backup",
  • "description": "Created by GAMMA\\Administrator",
  • "isDisabled": false
}

Edit Job

The HTTP PUT request to the /api/v1/jobs/{id} path allows you to edit a job that has the specified id.

SecurityBearer
Request
path Parameters
id
required
string <uuid>

ID of the job.

header Parameters
x-api-version
required
string
Default: 1.1-rev0

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

Request Body schema: application/json
required
id
required
string <uuid>

ID of the job.

name
required
string

Name of the job.

description
required
string

Description of the job.

type
required
string (EJobType)

Type of the job.

isDisabled
required
boolean

If true, the job is disabled.

required
object (BackupJobGuestProcessingModel)

Guest processing settings.

isHighPriority
required
boolean

If true, the job has a high priority in getting backup infrastructure resources.

required
object (BackupScheduleModel)

Job scheduling options.

required
object (BackupJobStorageModel)

Backup storage settings.

required
object (BackupJobVirtualMachinesModel)

Included and excluded objects.

Responses
200

Job has been updated.

400

Bad request. This error is related to POST/PUT requests. The request body is malformed, incomplete or otherwise invalid.

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.

put/api/v1/jobs/{id}
Request samples
application/json
{
  • "isHighPriority": true,
  • "virtualMachines": {
    },
  • "storage": {
    },
  • "guestProcessing": {
    },
  • "schedule": {
    },
  • "type": "Backup",
  • "id": "53b87378-7958-477d-8def-fbe6740d4b6f",
  • "name": "Exchange Backup",
  • "description": "Created by GAMMA\\Administrator",
  • "isDisabled": false
}
Response samples
application/json
{
  • "isHighPriority": true,
  • "virtualMachines": {
    },
  • "storage": {
    },
  • "guestProcessing": {
    },
  • "schedule": {
    },
  • "type": "Backup",
  • "id": "53b87378-7958-477d-8def-fbe6740d4b6f",
  • "name": "Exchange Backup",
  • "description": "Created by GAMMA\\Administrator",
  • "isDisabled": false
}

Delete Job

The HTTP DELETE request to the /api/v1/jobs/{id} path allows you to delete a job that has the specified id.

SecurityBearer
Request
path Parameters
id
required
string <uuid>

ID of the job.

header Parameters
x-api-version
required
string
Default: 1.1-rev0

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

Responses
204

Removed.

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.

delete/api/v1/jobs/{id}
Request samples
Response samples
application/json
{ }

Start Job

The HTTP POST request to the /api/v1/jobs/{id}/start path allows you to start a job that has the specified id.

SecurityBearer
Request
path Parameters
id
required
string <uuid>

ID of the job.

header Parameters
x-api-version
required
string
Default: 1.1-rev0

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

Request Body schema: application/json
optional
performActiveFull
required
boolean
Default: false

If true, Veeam Backup & Replication will perform an active full backup.

startChainedJobs
boolean
Default: false

If true, Veeam Backup & Replication will start chained jobs as well.

Responses
201

Job session has been started.

400

Bad request. This error is related to POST/PUT requests. The request body is malformed, incomplete or otherwise invalid.

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.

post/api/v1/jobs/{id}/start
Request samples
application/json
{
  • "performActiveFull": false,
  • "startChainedJobs": false
}
Response samples
application/json
{
  • "sessionType": "Job",
  • "state": "Starting",
  • "id": "b1380736-18a9-4fac-adfe-20abc570e8de",
  • "name": "Oracle Backup",
  • "activityId": "75fc491a-d158-4380-a433-ebc42a28e4df",
  • "creationTime": "2022-02-04T20:46:49.067+03:00",
  • "endTime": null,
  • "progressPercent": 0,
  • "result": null,
  • "resourceId": null,
  • "resourceReference": null,
  • "parentSessionId": null,
  • "usn": 0
}

Stop Job

The HTTP POST request to the /api/v1/jobs/{id}/stop path allows you to stop a job that has the specified id.

SecurityBearer
Request
path Parameters
id
required
string <uuid>

ID of the job.

header Parameters
x-api-version
required
string
Default: 1.1-rev0

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

Request Body schema: application/json
optional
gracefullStop
required
boolean
Default: true

If true, Veeam Backup & Replication will produce a new restore point for those VMs that have already been processed and for VMs that are being processed at the moment.

Responses
201

Job session has been stopped.

400

Bad request. This error is related to POST/PUT requests. The request body is malformed, incomplete or otherwise invalid.

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.

post/api/v1/jobs/{id}/stop
Request samples
application/json
{
  • "gracefullStop": true
}
Response samples
application/json
{
  • "sessionType": "Job",
  • "state": "Working",
  • "id": "3b5a044b-f38d-4ae8-85d1-38872095a537",
  • "name": "Oracle Backup",
  • "activityId": "75fc491a-d158-4380-a433-ebc42a28e4df",
  • "creationTime": "2022-02-04T20:52:06.387+03:00",
  • "endTime": null,
  • "progressPercent": 0,
  • "result": null,
  • "resourceId": null,
  • "resourceReference": null,
  • "parentSessionId": null,
  • "usn": 0
}

Disable Job

The HTTP POST request to the /api/v1/jobs/{id}/disable path allows you to disable a job that has the specified id.

SecurityBearer
Request
path Parameters
id
required
string <uuid>

ID of the job.

header Parameters
x-api-version
required
string
Default: 1.1-rev0

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

Responses
200

Job has been disabled.

400

Bad request. This error is related to POST/PUT requests. The request body is malformed, incomplete or otherwise invalid.

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.

post/api/v1/jobs/{id}/disable
Request samples
Response samples
application/json
{ }

Enable Job

The HTTP POST request to the /api/v1/jobs/{id}/enable path allows you to enable a job that has the specified id.

SecurityBearer
Request
path Parameters
id
required
string <uuid>

ID of the job.

header Parameters
x-api-version
required
string
Default: 1.1-rev0

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

Responses
200

Job has been enabled.

400

Bad request. This error is related to POST/PUT requests. The request body is malformed, incomplete or otherwise invalid.

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.

post/api/v1/jobs/{id}/enable
Request samples
Response samples
application/json
{ }