Bulk export files from your project on CAVATICA into your volume on Amazon Web Services. One call can contain up to 100 items.
Files selected for export must not be public files or aliases. Aliases are objects stored in your cloud storage bucket which have been made available on CAVATICA The volume you are exporting to must be configured for read-write access. To do this, set the access_mode parameter to RW when creating or modifying a volume.
Essentially, the call writes to your cloud storage bucket on Amazon Web Services via the volume. If this call is successful, the original project files will become aliases to the newly exported objects on the volume. Source files will be deleted from CAVATICA and, if no more copies of the files exist, they will no longer count towards your total storage price on CAVATICA. In summary, once you export files from CAVATICA to a volume, they are no longer part of the storage on CAVATICA and cannot be exported again.
Please note that export from CAVATICA to Google Cloud Storage volumes is currently not supported.
Learn more about using the Volumes API for for Amazon S3.
Request
https://cavatica-api.sbgenomics.com/v2/bulk/storage/exports/createExample request
POST v2/bulk/storage/exports/create
Host: cavatica-api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f75curl -X POST \
https://cavatica-api.sbgenomics.com/v2/bulk/storage/exports/create \
-H 'Content-Type: application/json' \
-H 'X-SBG-Auth-Token: b04aa2a2e98348a1a3a75ca677ea7fd7' \
-d '{
"items": [
{
"source": {
"file": "5abce8051c948ec3c0ce2b7c"
},
"destination": {
"volume": "rfranklin/output",
"location": "output.vcf"
},
"overwrite": true,
"properties": {
"sse_algorithm": "AES256"
}
},
{
"source": {
"file": "5abce8191c948ec3c0ce2b7f"
},
"destination": {
"volume": "rfranklin/output",
"location": "output.vcf"
},
"overwrite": false,
"properties": {
"sse_algorithm": "AES256"
}
}
]
}
'Header Fields
Name | Description |
|---|---|
X-SBG-Auth-Token required | Your CAVATICA authentication token. |
Content-Type |
|
Query parameters
Key | Data type | Description |
|---|---|---|
| Boolean | If set to |
Request body
For every item in the request body, you should enter the list of key-value pairs described in the table below. One API call can contain up to 100 items.
Key | Data type | Description |
|---|---|---|
| Boolean | If set to |
| String | The ID of the file for export. |
| Object | This object describes the destination to which the file will be exported. |
| String | The ID of the volume to which the files will be exported. |
| String | Volume-specific location to which the files will be exported. Please note that if this volume has been configured with a |
| Object | Service-specific properties of the export. These values override the defaults from the volume. |
| String | S3 server-side encryption to use when exporting to this bucket. Supported values:
|
| String | If AWS KMS encryption is used, this should be set to the required KMS key. If not set and |
| String | If AWS KMS encryption is used, this should be set to the required KMS key. If not set and aws:kms is set as sse_algorithm, default KMS key is used. |
| Boolean | If this is set to true and a named file exists in the project where the alias is about to be created, the existing file will be deleted. default:false |
Example request (normal)
POST /v2/bulk/storage/exports/create HTTP/1.1
Host: cavatica-api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
Content-Type: application/json{
"items": [
{
"source": {
"file": "5abce8051c948ec3c0ce2b7c"
},
"destination": {
"volume": "rfranklin/output",
"location": "output.vcf"
},
"overwrite": true,
"properties": {
"sse_algorithm": "AES256"
}
},
{
"source": {
"file": "5abce8191c948ec3c0ce2b7f"
},
"destination": {
"volume": "rfranklin/output",
"location": "output.vcf"
},
"overwrite": false,
"properties": {
"sse_algorithm": "AES256"
}
}
]
}Example request (advance access - copy file only)
POST /v2/bulk/storage/exports?copy_only=true HTTP/1.1
Host: cavatica-api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
Content-Type: application/json{
"items": [
{
"source": {
"file": "5abce8051c948ec3c0ce2b7c"
},
"destination": {
"volume": "rfranklin/output",
"location": "output.vcf"
},
"overwrite": true,
"properties": {
"sse_algorithm": "AES256"
}
},
{
"source": {
"file": "5abce8191c948ec3c0ce2b7f"
},
"destination": {
"volume": "rfranklin/output",
"location": "output.vcf"
},
"overwrite": false,
"properties": {
"sse_algorithm": "AES256"
}
}
]
}Response
See a list of CAVATICA-specific response codes that may be contained in the body of the response.
Response body
The response object contains information about all of the exported items. The information is structured using the following key-value pairs:
Key | Data type | Description |
|---|---|---|
| string | ID of this import job. |
| string | The state of this import job. Possible values are:
|
| object | Import source, as passed when this job was started by the call to start an import job. |
| object | Import destination, as passed when this job was start an import job. |
| object | File object that was imported. |
| object | In case of error in the import job, standard API error is returned here. |
Example response body
{
"items": [
{
"resource": {
"href": "https://cavatica-api.sbgenomics.com/v2/storage/exports/MiNOzItzc9HpRfZxoGp3YTZE8STJMZmI",
"id": "MiNOzItzc9HpRfZxoGp3YTZE8STJMZmI",
"state": "PENDING",
"source": {
"file": "5abce8051c948ec3c0ce2b7c"
},
"destination": {
"volume": "rfranklin/output",
"location": "output.vcf"
},
"properties": {
"sse_algorithm": "AES256",
"sse_aws_kms_key_id": null,
"aws_canned_acl": null
},
"overwrite": true
}
},
{
"resource": {
"href": "https://cavatica-api.sbgenomics.com/v2/storage/exports/1sKqNbEI8nrb3TGui6OD3ATRz1XxDRIi",
"id": "1sKqNbEI8nrb3TGui6OD3ATRz1XxDRIi",
"state": "PENDING",
"source": {
"file": "5abce8191c948ec3c0ce2b7f"
},
"destination": {
"volume": "rfranklin/output.vcf",
"location": "output.vcf"
},
"properties": {
"sse_algorithm": "AES256",
"sse_aws_kms_key_id": null,
"aws_canned_acl": null
},
"overwrite": false
}
}
]
}