Tracking Import Operation

When you perform an import operation, you send the POST HTTP request. In response, you receive a session of the Automation type. Within this session, Veeam Backup & Replication adds new objects (for example, credentials, managed servers or backup jobs) to the infrastructure of the backup server. To check the import progress, track the session state. If the import fails, you can view debug logs for detailed information on each object.

For example, you import credentials records. In response, you receive an automation session in the following format:

Response

200

Response Body

{

   "sessionType": "Automation",

   "state": "Working",

   "id": "dbf9c10f-501e-445d-8387-eb19bbeb582c",

   "name": "REST Automation",

   "activityId": "5d2fb004-4ee4-47ae-905e-58c340e48262",

   "creationTime": "2021-02-01T18:18:10.4421165+01:00",

   "endTime": null,

   "progressPercent": 0,

   "result": null,

   "resourceId": null,

   "resourceReference": null,

   "parentSessionId": null,

   "usn": 0

}

To track the session state, send the HTTP GET request to the /automation/sessions/{ID} path:

Request

GET https://backupserver02:9419/api/v1/automation/sessions/dbf9c10f-501e-445d-8387-eb19bbeb582c

 

Request Header

x-api-version:1.1-rev1

Authorization: Bearer YSEoaL6H9EEyJpnrJ9WhLtzbrrBBYWqMQFDBQuLnp13qGQX6MjNfZ_wriPIRHQrbY-8dYtsWcRZQczIHVuSqbnVb00m-yOihPZZHQ48aP1VcgUtgnYTvtAO3WRJ1cJ8VaIXzsVYKIGrLa1Lm41LsjpMiiPZytkqIUUiphhlXn7Vm10xlTzQUe0TU3HmXK-KD2MiB6qBImaISkEjgCmyIsurSN2mHi1Qo8VlZadnhkBd3v6nD5GEb8Gh4Zw7YAv5klmrnM0iBu7xhev2hVMZvKHGXvGshI3gS24-hIWbSsBGarVnRLSiUzor6QExTGShSa7pIeJWsAtJXLF5a3oSUooUv_YMYe8d5iZEouUuirrw

 

Response

200

 

Response Body

{

   "sessionType": "Automation",

   "state": "Stopped",

   "id": "dbf9c10f-501e-445d-8387-eb19bbeb582c",

   "name": "REST Automation",

   "activityId": "5d2fb004-4ee4-47ae-905e-58c340e48262",

   "creationTime": "2021-02-01T18:18:10.443+01:00",

   "endTime": "2021-02-01T18:18:25.727+01:00",

   "progressPercent": 100,

   "result": {

       "result": "Success",

       "message": "Result: Success 1, Warning 0, Failed 0. Check debug logs for more information",

       "isCanceled": false

   },

   "resourceId": null,

   "resourceReference": null,

   "parentSessionId": null,

   "usn": 0

}

If some of the credentials records are not imported, you can view debug logs for detailed information on each record. To do this, send the following HTTP GET request:

Request

GET https://backupserver02:9419/api/v1/automation/sessions/dbf9c10f-501e-445d-8387-eb19bbeb582c/logs

 

Request Header

x-api-version:1.1-rev1

Authorization: Bearer YSEoaL6H9EEyJpnrJ9WhLtzbrrBBYWqMQFDBQuLnp13qGQX6MjNfZ_wriPIRHQrbY-8dYtsWcRZQczIHVuSqbnVb00m-yOihPZZHQ48aP1VcgUtgnYTvtAO3WRJ1cJ8VaIXzsVYKIGrLa1Lm41LsjpMiiPZytkqIUUiphhlXn7Vm10xlTzQUe0TU3HmXK-KD2MiB6qBImaISkEjgCmyIsurSN2mHi1Qo8VlZadnhkBd3v6nD5GEb8Gh4Zw7YAv5klmrnM0iBu7xhev2hVMZvKHGXvGshI3gS24-hIWbSsBGarVnRLSiUzor6QExTGShSa7pIeJWsAtJXLF5a3oSUooUv_YMYe8d5iZEouUuirrw