Getting Sessions
This section explains how to get a list of session.
Request
GET https://<hostname>/api/v1/jobSessions |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
None.
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
Property | Type | Description |
|---|---|---|
offset | integer | Shows the offset value. |
limit | integer | Shows the offset limit. |
totalCount | integer | Shows the number of records in the results array. |
results | Contains the result object. | |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Property | Type | Description |
|---|---|---|
id | string | Shows the identification number of the backup policy session. |
type | string | Shows the type of the backup policy session. |
localizedType | string |
|
executionStartTime | string | Shows the time when the backup policy session started. |
executionStopTime | string | Shows the time when the backup policy session stopped. |
executionDuration | string | Shows the duration of the session. |
status | string | Shows status of the backup policy session. |
usn | integer |
|
backupJobInfo |
| |
restoreJobInfo |
| |
fileLevelRestoreJobInfo |
| |
repositoryJobInfo | Shows info about repository. | |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Property | Type | Description |
|---|---|---|
policyId | string | Shows the identification number of the backup policy. |
policyName | string | Shows the name of the backup policy. |
protectedInstancesCount | integer | Shows the number of protected VMs. |
policyRemoved | boolean | Shows if a backup policy is removed. |
Property | Type | Description |
|---|---|---|
reason | string | Shows the reason of the restore (if any). |
items | RecoveryItem | Shows recovery items. |
FileLevelRestoreJobInfo Object
Property | Type | Description |
|---|---|---|
reason | string | Shows the reason of the restore (if any). |
flrLink | FlrLink Object | Contains the URL to access the File-Level Recovery Browser and a thumbprint. |
vmId | string | Shows the identification number of the VM.. |
Property | Type | Description |
|---|---|---|
repositoryId | integer | Shows the identification number of the backup repository. |
repositoryName | string | Shows the name of the backup repository. |
repositoryRemoved | boolean | Shows if a backup policy is removed. |
Example
Request: GET https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "offset": 0, "limit": 30, "totalCount": 14, "results": [ { "id": "14", "type": "PolicyBackup", "localizedType": "Policy Backup", "executionStartTime": "2020-02-07T12:21:04.223155Z", "executionStopTime": "2020-02-07T12:22:22.046855Z", "executionDuration": "00:01:17.8237000", "status": "Canceled", "usn": 102, "backupJobInfo": { "policyId": "a91630ab-1603-47ea-a76c-0525e77a1188", "policyName": "Policy 1", "protectedInstancesCount": 0, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/14"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/14/log"} } }, { "id": "13", "type": "PolicySnapshot", "localizedType": "Policy Snapshot", "executionStartTime": "2020-02-07T12:21:04.212935Z", "executionStopTime": "2020-02-07T12:22:01.077103Z", "executionDuration": "00:00:56.8641680", "status": "Success", "usn": 100, "backupJobInfo": { "policyId": "a91630ab-1603-47ea-a76c-0525e77a1188", "policyName": "Policy 1", "protectedInstancesCount": 0, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/13"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/13/log"} } }, { "id": "12", "type": "PolicyBackup", "localizedType": "Policy Backup", "executionStartTime": "2020-02-07T10:56:03.648783Z", "executionStopTime": "2020-02-07T11:20:57.212294Z", "executionDuration": "00:24:53.5635110", "status": "Success", "usn": 92, "backupJobInfo": { "policyId": "8ada583b-cbc9-401c-875a-140b75d877a4", "policyName": "Policy_2", "protectedInstancesCount": 1, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/12"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/12/log"} } }, { "id": "11", "type": "PolicySnapshot", "localizedType": "Policy Snapshot", "executionStartTime": "2020-02-07T10:56:03.635623Z", "executionStopTime": "2020-02-07T10:57:12.888621Z", "executionDuration": "00:01:09.2529980", "status": "Success", "usn": 85, "backupJobInfo": { "policyId": "8ada583b-cbc9-401c-875a-140b75d877a4", "policyName": "Policy_2", "protectedInstancesCount": 1, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/11"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/11/log"} } }, { "id": "10", "type": "PolicyBackup", "localizedType": "Policy Backup", "executionStartTime": "2020-02-07T10:23:35.420746Z", "executionStopTime": "2020-02-07T10:25:18.999327Z", "executionDuration": "00:01:43.5785810", "status": "Success", "usn": 74, "backupJobInfo": { "policyId": "a91630ab-1603-47ea-a76c-0525e77a1188", "policyName": "Policy 1", "protectedInstancesCount": 0, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/10"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/10/log"} } }, { "id": "9", "type": "PolicySnapshot", "localizedType": "Policy Snapshot", "executionStartTime": "2020-02-07T10:23:35.3557Z", "executionStopTime": "2020-02-07T10:24:28.457434Z", "executionDuration": "00:00:53.1017340", "status": "Success", "usn": 72, "backupJobInfo": { "policyId": "a91630ab-1603-47ea-a76c-0525e77a1188", "policyName": "Policy 1", "protectedInstancesCount": 0, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/9"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/9/log"} } }, { "id": "8", "type": "PolicyBackup", "localizedType": "Policy Backup", "executionStartTime": "2020-02-07T09:55:10.63284Z", "executionStopTime": "2020-02-07T10:01:21.35541Z", "executionDuration": "00:06:10.7225700", "status": "Success", "usn": 64, "backupJobInfo": { "policyId": "4e096ba7-8125-4d5d-804b-581f4e6c8440", "policyName": "Backup Policy", "protectedInstancesCount": 1, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/8"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/8/log"} } }, { "id": "7", "type": "PolicySnapshot", "localizedType": "Policy Snapshot", "executionStartTime": "2020-02-07T09:55:10.627827Z", "executionStopTime": "2020-02-07T09:56:36.458427Z", "executionDuration": "00:01:25.8306000", "status": "Success", "usn": 56, "backupJobInfo": { "policyId": "4e096ba7-8125-4d5d-804b-581f4e6c8440", "policyName": "Backup Policy", "protectedInstancesCount": 1, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/7"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/7/log"} } }, { "id": "6", "type": "ManualSnapshot", "localizedType": "Manual Snapshot", "executionStartTime": "2020-02-07T08:43:30.892836Z", "executionStopTime": "2020-02-07T08:44:41.08057Z", "executionDuration": "00:01:10.1877340", "status": "Success", "usn": 44, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/6"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/6/log"} } }, { "id": "4", "type": "PolicyBackup", "localizedType": "Policy Backup", "executionStartTime": "2020-02-07T08:07:02.906363Z", "executionStopTime": "2020-02-07T08:23:28.858646Z", "executionDuration": "00:16:25.9522830", "status": "Success", "usn": 37, "backupJobInfo": { "policyId": "4e096ba7-8125-4d5d-804b-581f4e6c8440", "policyName": "Backup Policy", "protectedInstancesCount": 1, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/4"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/4/log"} } }, { "id": "5", "type": "PolicySnapshot", "localizedType": "Policy Snapshot", "executionStartTime": "2020-02-07T08:07:02.854986Z", "executionStopTime": "2020-02-07T08:08:11.547434Z", "executionDuration": "00:01:08.6924480", "status": "Success", "usn": 34, "backupJobInfo": { "policyId": "4e096ba7-8125-4d5d-804b-581f4e6c8440", "policyName": "Backup Policy", "protectedInstancesCount": 1, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/5"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/5/log"} } }, { "id": "3", "type": "RepositoryCreation", "localizedType": "Create Repository", "executionStartTime": "2020-02-07T08:04:29.825504Z", "executionStopTime": "2020-02-07T08:05:05.293101Z", "executionDuration": "00:00:35.4675970", "status": "Success", "usn": 19, "repositoryJobInfo": { "repositoryId": 1, "repositoryName": "Backup Repository", "repositoryRemoved": true }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/3"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/3/log"} } }, { "id": "2", "type": "LingeringSnapshotRetention", "localizedType": "Obsolete Snapshot Retention", "executionStartTime": "2020-02-06T19:11:10.679602Z", "executionStopTime": "2020-02-06T19:11:13.561972Z", "executionDuration": "00:00:02.8823700", "status": "Success", "usn": 11, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/2"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/2/log"} } }, { "id": "1", "type": "LingeringSnapshotRetention", "localizedType": "Obsolete Snapshot Retention", "executionStartTime": "2020-02-06T19:10:16.284158Z", "executionStopTime": "2020-02-06T19:10:19.6246Z", "executionDuration": "00:00:03.3404420", "status": "Success", "usn": 6, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/1"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/1/log"} } } ], "_links": {"self": {"href": "https://abc.ukwest.cloudapp.azure.com:443/api/v1/jobSessions?offset=0&limit=30&display=Full"}} } |