This is an archive version of the document. To get the most up-to-date information, see the current version.

Get Collection of Sessions

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

Request

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

HTTP Request

GET https://<hostname>:<port>/api/v1/sessions

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

Sort

  • startTimeAsc
  • startTimeDesc
  • stopTimeAsc
  • stopTimeDesc
  • durationAsc
  • durationDesc
  • typeAsc
  • typeDesc
  • reasonAsc
  • reasonDesc
  • usnAsc
  • usnDesc

Specifies the order of items in the response. For more information, see Sort Parameter.

Status

  • Running
  • NeverExecuted
  • Succeeded
  • Warning
  • Failed
  • Canceled

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

Types

  • Policy
  • Job
  • Task
  • UserPolicy
  • RetentionActivity
  • RestoreTask
  • FLRTask
  • SelfBackupActivity

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

Usn

integer($int64)

Returns only sessions with the specified USN. 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 EC2 instance 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.

Request Headers

The request contains the following headers.

Header

Required/Optional

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.

x-api-version

Required

1.0-rev0

Specifies the current revision of the Veeam Backup for AWS REST API.

Accept

Optional

  • application/json
  • application/problem+json

Specifies a media type of representation that is required in the response message. If the requested type is not supported, the server will return the response in the application/json media type.

Response

The server returns the following response to the client.

Response Code

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 AWS returns a representation of the /sessions collection. The Session 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 AWS database.

Request:

GET https://135.169.170.192:11005/api/v1/sessions

 

Request Header:

Authorization: Bearer <Access-Token>

x-api-version: 1.0-rev0

 

Response:

200

 

Response Body:

{

 "totalCount": 5,

 "results": [

   {

     "type": "Job",

     "status": "Succeeded",

     "result": "Success",

     "id": "ab9562f2-2bea-40f3-ac83-4f8432b85940",

     "executionStartTime": "2020-06-23T10:00:18.163004",

     "executionStopTime": "2020-06-23T10:01:26.317649",

     "executionDuration": 154,

     "reason": "Snapshots",

     "usn": 16196,

     "_links": [

       {

         "method": "GET",

         "rel": "self",

         "href": "https://135.169.170.192:11005/api/v1/sessions/ab9562f2-2bea-40f3-ac83-4f8432b85940"

       },

       {

         "method": "GET",

         "rel": "SessionLogs",

         "href": "https://135.169.170.192:11005/api/v1/sessions/ab9562f2-2bea-40f3-ac83-4f8432b85940/log"

       }

     ],

     "_embedded": {}

   },

   {

     "type": "Policy",

     "status": "Succeeded",

     "result": "Success",

     "id": "ed267869-1da0-487c-833f-b0e0b9dd273f",

     "executionStartTime": "2020-06-23T10:00:14.682852",

     "executionStopTime": "2020-06-23T10:02:33.544943",

     "executionDuration": 862,

     "reason": "",

     "usn": 16236,

     "_links": [

       {

         "method": "GET",

         "rel": "self",

         "href": "https://135.169.170.192:11005/api/v1/sessions/ed267869-1da0-487c-833f-b0e0b9dd273f"

       },

       {

         "method": "GET",

         "rel": "SessionLogs",

         "href": "https://135.169.170.192:11005/api/v1/sessions/ed267869-1da0-487c-833f-b0e0b9dd273f/log"

       }

     ],

     "_embedded": {

       "backupJobInfo": {

         "method": "GET",

         "rel": "ProtectedItems",

         "href": "https://135.169.170.192:11005/api/v1/sessions/ed267869-1da0-487c-833f-b0e0b9dd273f/protectedItems"

       }

     }

   },

   {

     "type": "UserPolicy",

     "status": "Succeeded",

     "result": "Success",

     "id": "06decb67-dc16-411b-8d88-7b4e8e150771",

     "executionStartTime": "2020-06-23T10:00:13.503698",

     "executionStopTime": "2020-06-23T10:02:33.563738",

     "executionDuration": 60,

     "reason": "",

     "usn": 16233,

     "_links": [

       {

         "method": "GET",

         "rel": "self",

         "href": "https://135.169.170.192:11005/api/v1/sessions/06decb67-dc16-411b-8d88-7b4e8e150771"

       },

       {

         "method": "GET",

         "rel": "SessionLogs",

         "href": "https://135.169.170.192:11005/api/v1/sessions/06decb67-dc16-411b-8d88-7b4e8e150771/log"

       }

     ],

     "_embedded": {}

   },

  {
     "type": "RetentionActivity",
     "status": "Succeeded",
     "result": "Success",
     "id": "73737aba-c33b-4fcf-8341-9dfb3e58ccea",
     "executionStartTime": "2020-06-23T02:00:13.572632",
     "executionStopTime": "2020-06-23T02:00:37.086188",
     "executionDuration": 513,
     "reason": "",
     "usn": 15694,
     "_links": [
       {
         "method": "GET",
         "rel": "self",
         "href": "https://135.169.170.192:11005/api/v1/sessions/73737aba-c33b-4fcf-8341-9dfb3e58ccea"
       },
       {
         "method": "GET",
         "rel": "SessionLogs",
         "href": "https://135.169.170.192:11005/api/v1/sessions/73737aba-c33b-4fcf-8341-9dfb3e58ccea/log"
       }
     ],
     "_embedded": {
       "retentionJobDeletedRestorePoints": {
         "method": "GET",
         "rel": "RetentionJobDeletedRestorePoints",
         "href": "https://135.169.170.192:11005/api/v1/sessions/73737aba-c33b-4fcf-8341-9dfb3e58ccea/deletedItems"
       }
     }
   },
   {
     "type": "Task",
     "status": "Succeeded",
     "result": "Success",
     "id": "6f563486-e529-478c-8236-697cc8c08fb0",
     "executionStartTime": "2020-06-22T23:58:29.995755",
     "executionStopTime": "2020-06-22T23:58:31.261495",
     "executionDuration": 265,
     "reason": "",
     "usn": 14622,
     "_links": [
       {
         "method": "GET",
         "rel": "self",
         "href": "https://135.169.170.192:11005/api/v1/sessions/6f563486-e529-478c-8236-697cc8c08fb0"
       },
       {
         "method": "GET",
         "rel": "SessionLogs",
         "href": "https://135.169.170.192:11005/api/v1/sessions/6f563486-e529-478c-8236-697cc8c08fb0/log"
       }
     ],
     "_embedded": {}
   }

],

 "_links": [

   {

     "method": "GET",

     "rel": "self",

     "href": "https://135.169.170.192:11005/api/v1/sessions"

   }

 ]

}