Get Collection of Sessions

You can get a list of sessions stored in the Veeam Backup for Microsoft Azure database.

Request

To retrieve a representation of a collection of sessions, send the HTTP GET request to the /jobSessions endpoint.

HTTP Request

GET https://<hostname>/api/v2/jobSessions

Query Parameters

To control the amount and order of data in the response, you can use Offset, Limit and the following query parameters:

Query Parameter

Value

Description

Status

  • Canceled
  • Canceling
  • Error
  • NeverExecuted
  • Pending
  • Running
  • RunningWithError
  • RunningWithWarning
  • Success
  • Warning

Returns only sessions with the specified status. For more information, see Filter Parameters.

Types

  • AutoBackuo
  • BackupRetention
  • RestoreDisks
  • FileLevelRestore
  • ObsoleteSnapshotRetention
  • ManualSnapshot
  • PolicyBackup
  • PolicySnapshot
  • RestoreVms
  • BackupDeletion
  • SnapshotDeletion
  • RepositoryCreation
  • RepositoryDeletion
  • RepositoryEdit
  • ManualSnapshotDeletion
  • InvalidSnapshotRetention
  • OrphanedSnapshotRetention

Returns only sessions of the specified session type. For more information, see Filter Parameters.

PolicyId

string($uuid)

Returns only sessions of a backup policy with the specified ID. For more information, see Filter Parameters.

VmId

string($uuid)

Returns only sessions where an Azure VM with the specified ID is processed. For more information, see Filter Parameters.

FromUtc

string($date-time)

Returns only sessions run after the specified date and time. For more information, see Filter Parameters.

ToUtc

string($date-time)

Returns only sessions run before the specified date and time. For more information, see Filter Parameters.

Display

  • Full
  • Grouped

Returns full information on restored items or grouped.

Request Headers

The request contains the following headers.

Header

Required

Value

Description

Authorization

Required

Bearer <Access-Token>

Authenticates a client who sends the request to the server. Must contain the access token for the current logon session in the Bearer <Access-Token> format.

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 HTTP headers.

Header

Value

Description

Content-length

integer

Identifies the length of the response body message, in bytes.

Content-type

  • application/json
  • application/problem+json

Identifies the media type of the response body message.

Response Body

In the response body, Veeam Backup for Microsoft Azure returns a representation of the /jobSessions collection. The JobSessionV2 schema is used for the collection representation.

Get Collection of SessionsExample

The following request returns a full list of sessions stored in the Veeam Backup for Microsoft Azure database.

Request:

GET https://51.11.247.127>/api/v2/jobSessions

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200

 

Response Body:

{

 "offset": 0,

 "limit": 2,

 "totalCount": 88,

 "results": [

   {

     "id": "gb01f07bc-e742-4ac1-8ed9-4e8972ded267",

     "type": "RestoreVms",

     "localizedType": "VM Restore",

     "executionStartTime": "2020-11-23T13:01:15.475042Z",

     "executionStopTime": "2020-11-23T13:06:26.274119Z",

     "executionDuration": "00:05:10.7990770",

     "status": "Success",

     "restoreJobInfo": {

       "reason": "",

       "vmId": "4w376jgoh5yd8xrxbmzjpq9f7f75gs89r4t4u1bo7of1f9imt5my",

       "items": [

         {

           "id": "dhcds1z7wuu93og9iqygcoc7k4si975we47oqrtu85b55yirmdny",

           "name": "administrator_OsDisk_1_fe68f6a2f30f414b9692ecfb189bfe19",

           "type": "Disk"

         },

         {

           "id": "4w376jgoh5yd8xrxbmzjpq9f7f75gs89r4t4u1bo7of1f9imt5my",

           "name": "administrator"

         }

       ]

     },

     "_links": {

       "self": {

         "href": "https://51.11.247.127/api/v2/jobSessions/gb01f07bc-e742-4ac1-8ed9-4e8972ded267"

       }

     },

     

   },

   {

     "id": "g60a7fe13-6155-460b-8beb-42c3243fef05",

     "type": "AutoBackup",

     "localizedType": "Auto Backup",

     "executionStartTime": "2020-11-23T08:00:03.629258Z",

     "executionStopTime": "2020-11-23T08:00:35.466351Z",

     "executionDuration": "00:00:31.8370930",

     "status": "Succes",

     "_links": {

       "self": {

         "href": "https://51.11.247.127/api/v2/jobSessions/g60a7fe13-6155-460b-8beb-42c3243fef05"

       }

     },

     

   }

 ],

 "_links": {

   "self": {

     "href": "https://51.11.247.127/api/v2/jobSessions?offset=0&limit=2&display=Grouped&expand=RestoreParameters"

   },

   "next": {

     "href": "https://51.11.247.127/api/v2/jobSessions?offset=2&limit=2&display=Grouped&expand=RestoreParameters"

   }

 }

}

I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.