Getting Backup Jobs

In this article

    You can get a resource representation of a backup job with the specified ID.

    Request

    GET https://<hostname>:4443/v6/Jobs/{jobId}

    Request Headers

    The request header must contain an authorization token of the current session.

    Request Parameters

    The following parameter must be specified in the URL of the request:

    Parameter

    Type

    Description

    jobId

    string

    Specifies the identification number of the backup job. For more information on how to get this parameter, see Getting Backup Jobs.

    Request Body

    None.

    Response

    The server returns the following response to the client.

    Response Codes

    A successfully completed operation returns a response code 200 OK.

    Response Headers

    The response to this request contains the following headers. The response may also include additional standard HTTPS headers.

    Header

    Description

    Content-length

    The length of the response body.

    Content-type

    The media type and syntax of the response body message: application/json; charset=utf-8

    Response Body

    The response body contains the following properties:

    Property

    Type

    Description

    id

    string

    Specifies the backup job ID.

    name

    string

    Specifies a name of the backup job.

    repositoryId

    string

    Specifies the backup repository ID.

    description

    string

    Specifies a description of the backup job.

    lastStatus

    string

    Specifies the latest status of the backup job. The following values are available:

    • Stopped
    • Running
    • Success
    • Warning
    • Failed
    • Disconnected
    • NotConfigured
    • Queued

    lastRun

    UTC

    Specifies the time of the last run of the backup job.

    nextRun

    UTC

    Specifies the time of the next run of the backup job per schedule.

    isEnabled

    boolean

    If set to true, indicates that the backup job is enabled.

    backupType

    string

    Specifies the backup job type. The following types are available:

    • SelectedItems
    • EntireOrganization

    schedulePolicy

    schedulePolicy

    Specifies the backup job scheduling options.

    runNow

    boolean

    If set to true, indicates that the job will run right after it is created.

    _links

    Dictionary of string [key] and Object [value]

    Links to related resources (navigation property).

    schedulePolicy

    The backup job schedule policy has the following properties:

    Property

    Type

    Description

    type

    string

    Specifies the backup job schedule type. The following types are available:

    • Daily. The backup job runs on specific days.
    • Periodically. The backup job runs repeatedly throughout a day with a specific time interval.
    • ManualOnly. The backup job runs manually.

    dailyType

    string

    Specifies the days when the backup job will run. The following values are available:

    • Everyday
    • Weekends
    • Workdays
    • Monday
    • Tuesday
    • Wednesday
    • Thursday
    • Friday
    • Saturday
    • Sunday

    dailyTime

    UTC

    Specifies the time to start the backup job.

    periodicallyEvery

    string

    Specifies the time interval between the job runs. The following values are available:

    • Minutes5
    • Minutes10
    • Minutes15
    • Minutes30
    • Hours1
    • Hours2
    • Hours4
    • Hours8

    backupWindowEnabled

    boolean

    If set to true, indicates that a backup window feature is enabled for this job.

    scheduleEnabled

    boolean

    If set to true, indicates that a schedule feature is enabled for this job. Use this property only with the periodicallyEvery property and the time interval specified in hours.

    backupWindowSettings

    backupWindowSettings

    Specifies the settings of the job backup window. A backup window is a time period within which the backup job must be completed.

    periodicallyWindowSettings

    periodicallyWindowSettings

    Specifies allowed and prohibited hours for the backup job to run. Use this property only with the periodicallyEvery property and the time interval specified in hours.

    periodicallyOffsetMinutes

    integer

    Specifies a number of minutes for which you want to shift starting of the backup job within an hour if several backup jobs are scheduled to be started simultaneously. Use this property only with the periodicallyEvery property and the time interval specified in hours.

    retryEnabled

    boolean

    If set to true, indicates that Veeam Backup for Microsoft 365 will attempt to restart a backup job if it fails for some reason.

    retryNumber

    integer

    Specifies the number of attempts to run the backup job.

    retryWaitInterval

    integer

    Specifies the time intervals between the backup job retry attempts (in minutes).

    backupWindowSettings

    A backup window is a time period within which the backup job must be completed. The backup window has the following properties:

    Property

    Type

    Description

    backupWindow

    boolean[]

    Defines an hourly scheme for the backup window. The scheduling scheme consists of 168 boolean elements. These elements can be logically divided into 7 groups by 24. Each group represents a day of the week starting from Sunday. Each element represents a backup hour:

    • true — the allowed backup hour
    • false — the prohibited backup hour

    minuteOffset

    integer

    Specifies the current minute offset from the UTC time.

    periodicallyWindowSettings

    For the backup job that runs periodically every N hours, the schedule has the following properties:

    Property

    Type

    Description

    backupWindow

    boolean[]

    Defines an hourly scheme for the backup job to run. The scheduling scheme consists of 168 boolean elements. These elements can be logically divided into 7 groups by 24. Each group represents a day of the week starting from Sunday. Each element represents a backup hour:

    • true — the allowed backup hour
    • false — the prohibited backup hour

    minuteOffset

    integer

    Specifies the current minute offset from the UTC time.

    Example

    The example returns a resource representation of the backup job with the ID b7c1cc0b-2b3c-4096-9ba1-2d665b4ae504.

    Request:

    GET https://abc.tech.local:4443/v6/Jobs/b7c1cc0b-2b3c-4096-9ba1-2d665b4ae504

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Response:

    200 OK

     

    Response Body:

    {

     "description": "",

     "backupType": "SelectedItems",

     "schedulePolicy": {

       "scheduleEnabled": true,

       "backupWindowEnabled": true,

       "backupWindowSettings": {

         "backupWindow": [

           true,

           true,

           true,

           true,

           true,

          ...

           true,

           true,

           true,

           true

         ],

         "minuteOffset": 0

       },

       "periodicallyWindowSettings": {

         "backupWindow": [

           false,

           false,

           true,

           true,

           true,

           true,

          ...

           true,

           true,

           true

         ],

         "minuteOffset": 0

       },

       "periodicallyOffsetMinutes": 5,

       "type": "Periodically",

       "periodicallyEvery": "Hours2",

       "retryEnabled": true,

       "retryNumber": 3,

       "retryWaitInterval": 10

     },

     "id": "b7c1cc0b-2b3c-4096-9ba1-2d665b4ae504",

     "repositoryId": "5f7c94d0-c339-46f1-9b0f-2b9763ba83de",

     "name": "Backup1",

     "lastRun": "2022-01-11T13:54:47.3621792Z",

     "nextRun": "2022-01-20T22:05:00Z",

     "isEnabled": true,

     "lastStatus": "Success",

     "_links": {

       "self": {

         "href": "v6/jobs/b7c1cc0b-2b3c-4096-9ba1-2d665b4ae504"

       },

       "copyJob": {

         "href": "v6/jobs/b7c1cc0b-2b3c-4096-9ba1-2d665b4ae504/copyJob"

       },

       "organization": {

         "href": "v6/organizations/e60dfb9c-ac58-4463-879f-9855ac35576b"

       },

       "backupRepository": {

         "href": "v6/backuprepositories/5f7c94d0-c339-46f1-9b0f-2b9763ba83de"

       },

       "jobsessions": {

         "href": "v6/jobs/b7c1cc0b-2b3c-4096-9ba1-2d665b4ae504/jobsessions"

       },

       "excludedItems": {

         "href": "v6/jobs/b7c1cc0b-2b3c-4096-9ba1-2d665b4ae504/excludedItems"

       },

       "selectedItems": {

         "href": "v6/jobs/b7c1cc0b-2b3c-4096-9ba1-2d665b4ae504/selectedItems"

       }

     }

    }