Aidbox
Search…
⌃K

restore-archive

To restore archived data you should start restoration process with /execution/aidbox.archive/restore-archive task.
Make sure that archived data is deleted from your database before restoring it. You can make this automatically with pruneArchivedData parameter of create-archive request.
Restoring data that already stored in your database may cause duplication exceptions.

restore-archive properties:

Properties
Required
Description
archiveId
archiveId property of succeeded create-archive status response if it archived at least 1 row.
Request
Response
POST /execution/aidbox.archive/restore-archive
accept: text/yaml
content-type: text/yaml
​
archiveId: cd4d62de-10fb-452f-84c1-52ce9d6300f7
Status: 201
​
id: ff0fa264-bad5-48f9-b4b3-f9588a64265f
To fetch status of the task make /execution/aidbox.archive/restore-archive/[task_id] request with id from restore-archive response:
Request
Response
GET /execution/aidbox.archive/restore-archive/ff0fa264-bad5-48f9-b4b3-f9588a64265f
accept: text/yaml
content-type: text/yaml
definition: aidbox.archive/restore-archive
meta:
lastUpdated: '2023-01-10T11:27:40.727967Z'
createdAt: '2023-01-10T11:27:40.440402Z'
versionId: '26143'
params:
archiveId: cd4d62de-10fb-452f-84c1-52ce9d6300f7
retryCount: 1
outcome: succeeded
resourceType: AidboxTask
requester:
id: >-
admin
resourceType: User
status: done
result:
archiveId: cd4d62de-10fb-452f-84c1-52ce9d6300f7
restoredResourcesCount: 30
execId: 03957f3a-0141-4148-9c44-c8646849b361
id: >-
5f134af7-ba67-4537-b1c4-8cbb214b99ae