Create archive from a dataset
Creates an archive of a dataset - a snapshot of its data and metadata.
This operation requires space_manage_datasets and space_create_archives privileges.
Example cURL requests
Create archive from a dataset
curl -H "X-Auth-Token: $TOKEN" -X POST "https://$PROVIDER_HOST/api/v3/oneprovider/archives" \
-H "Content-Type: application/json" -d '{
"datasetId": "'$DATASET_ID'",
"config": {
"incremental": {"enabled": true},
"includeDip": false,
"layout": "bagit",
"createNestedArchives": true,
"followSymlinks": true
},
"preservedCallback": "https://example.org/preserved_archives",
"deletedCallback": "https://example.org/deleted_archives",
"description": "Archived dataset with experiment data from 2021."
}'
Request body
Dataset properties.
| Property | Type & Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
datasetId string Id of the dataset that will be archived. | |||||||||||||||
config object (ArchiveConfig) Parameters used to configure the process of creating an archive.
| |||||||||||||||
description string (ArchiveDescription) User defined description of the archive. | |||||||||||||||
preservedCallback string (ArchivePreservedCallback) URL on which POST request will be performed to notify that process of persisting an archive has finished. The callback request will include body in the following JSON format:
Requested server should response with one of | |||||||||||||||
deletedCallback string (ArchiveDeletedCallback) URL on which POST request will be performed to notify that process of purging an archive has finished. The callback request will include body in the following JSON format:
Requested server should response with one of | |||||||||||||||
Request Examples
{
"datasetId": "1f4b762b1380946e73aeca574c77f14c",
"config": {
"incremental": {
"enabled": true,
"basedOn": "ae6f78c89a97c9e78e891105f703bcb8"
},
"includeDip": false,
"layout": "plain"
},
"preservedCallback": "https://example.org/preserved_archives",
"deletedCallback": "https://example.org/deleted_archives",
"description": "Archived dataset with experiment data from 2021."
}Responses
The request has been accepted and the result is the archive Id. Also URI of the Archive in form https://$PROVIDER_HOST/api/v3/oneprovider/archives/{id} is returned in the response Location header.
| Property | Type & Description |
|---|---|
archiveId string Archive Id. | |
Example
{
"archiveId": "ae6f78c89a97c9e78e891105f703bcb8"
}Invalid request.
| Property | Type & Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error object (ErrorJson) Object describing an error.
| |||||||||||||||||||||||||||
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.0",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}Forbidden request.
| Property | Type & Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error object (ErrorJson) Object describing an error.
| |||||||||||||||||||||||||||
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.0",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}Dataset not found.
| Property | Type & Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error object (ErrorJson) Object describing an error.
| |||||||||||||||||||||||||||
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.0",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}Internal server error.
| Property | Type & Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error object (ErrorJson) Object describing an error.
| |||||||||||||||||||||||||||
Example
{
"error": {
"id": "example",
"description": "This is an example error.",
"ctx": {
"timestamp": 1750762637248,
"serviceReleaseVersion": "25.0",
"serviceId": "a7ee2722915b8bf7fb064eb65087cc61ch9357",
"serviceDomain": "dev-oneprovider-krakow.default.svc.cluster.local",
"serviceBuildVersion": "231-g8d26f953c3",
"service": "opw",
"onedataErrorsRevision": "ca3af8cb",
"module": "metadata_req",
"line": 45
}
}
}