create-archive
/execution/aidbox.archive/create-archive
is designed to create and start archiving task. It returns reference to the created archive task.
create-archive properties:
targetResourceType
Name of the resource to be archived.
history
Archives only history records if true.
Archives only last records if false. False by default.
criteriaPaths
Array of paths to define period/retentionPeriod properties. Use dots to separate nested properties.
For example: ["period.end", "recorded"]
period/retentionPeriod
Use period to specify period for which resources should be archived.
For example:
{"start": "2022-01-01",
"end": "2022-02-01"}
You may also use retentionPeriod instead to specify period of time for which the resources should be retained.
Available units: "day", "week", "month", "year".
For example:
{"value": 2, "unit": "day"}
storageBackend
Use this property to specify type of your storage. Available types: "gcp", "aws".
serviceAccount
Reference to GcpServiceAccount or AwsAccount resource in your Aidbox database. Make sure that you already create one.
For example: {"id": "my-account", "resourceType": "GcpServiceAccount"}
bucket
Name of the bucket where the data will be uploaded.
pruneArchivedData
Delete archived rows if true. False by default.
POST /execution/aidbox.archive/create-archive
accept: text/yaml
content-type: text/yaml
targetResourceType: AuditEvent
period:
end: '2022-10-15'
criteriaPaths:
- recorded
storageBackend: gcp
bucket: aidbox-archive-test
pruneArchivedData: true
serviceAccount:
id: my-account
resourceType: GcpServiceAccount
To fetch status of the task make /execution/aidbox.archive/create-archive/[task_id]
request with id from create-archive response:
GET /execution/aidbox.archive/create-archive/9ed444a3-8344-40f5-bba2-d9a5728e7471
accept: text/yaml
content-type: text/yaml
Get archive summary
GET AidboxArchive/08b0004b-e383-4c43-bacd-d05c5e2d1560
Last updated
Was this helpful?