This call lets you queue a job to export a file from a project on CAVATICA into a volume.
Essentially, the call writes to your cloud storage bucket on Amazon Web Services via the volume.
PrerequisiteThe file selected for export must not be a public file or an alias. 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_modeparameter toRWwhen creating or
modifying a volume.Please note that export from CAVATICA to Google Cloud Storage volumes is currently not supported.
If this call is successful, the original project file will become an alias to the newly exported object on the volume. The source file will be deleted from the Platform and, if no more copies of this file exist, it will no longer count towards your total storage price on the Platform.
Learn more about using the Volumes API for Amazon S3 and for Google Cloud Storage.
https://cavatica-api.sbgenomics.com/v2/storage/exportsRequest
Example request
POST /v2/storage/exports HTTP/1.1
Host: cavatica-api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
Content-Type: application/jsoncurl --data '@export.json' -X POST -H "X-SBG-Auth-Token: ce7ae5ab85e946599298e88a3430fba0" -H "Content-Type: application/json" 'https://cavatica-api.sbgenomics.com/v2/storage/exports'Header Fields
Key | Description of value |
|---|---|
| Your CAVATICA authentication token. |
|
|
Request body
In the body, you should enter a list of key-value pairs. The keys, and the values they take, are described in the following table.
Key | Data type of value | Description of value |
|---|---|---|
| Object | This object should describe the source from which the file should be exported. |
| String | The ID of the file for export. |
| Object | This object should describe the destination to which the file will be exported. |
| String | The ID of the volume to which the file will be exported. |
| String | Volume-specific location to which the file will be exported. This location should be recognizable to the underlying cloud service as a valid key or path to a new file. 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:
default: |
| String | S3 canned ACL to apply on the object on during export. Supported values:
default: |
| Boolean | If true and a file exists in the given location on the volume (respecting volume prefix if given), the API will attempt to delete the existing file on the volume before exporting.
|
Example request body
{
"source": {
"file": "567890abc8a5639cc6722063"
},
"destination": {
"volume": "rfranklin/output",
"location": "output.vcf"
}
}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 the status of the export job. The information is structured using the following key-value pairs:
Key | Data type of value | Description of value |
|---|---|---|
| String | ID of this export job |
| String | The state of this export job. Possible values are:
|
| Object | Export source, as passed when this job was started by the call to Start an export job. |
| Object | Export destination, as passed when this job was started by the call to Start an export job. |
| Object | File object that was exported. |
| Object | In case of error in the export job, standard API error is returned here. |
Example response body
{
"href": "https://cavatica-api.sbgenomics.com/v2/storage/exports/yrand0mrmxx4Zjr1u781HJaBGOhx02sd",
"id": "yrand0mrmxx4Zjr1u781HJaBGOhx02sd",
"state": "PENDING",
"source": {
"file": "567890abc8a5639cc6722063"
},
"destination": {
"volume": "rfranklin/output",
"location": "output.vcf"
},
"started_on": "2016-06-15T19:17:39Z",
"properties": {
"sse_algorithm": "AES256",
"aws_canned_acl": "public-read"
},
"overwrite": false
}