This call creates a new volume. Currently, volumes may be created using three types of cloud storage repository:
- Amazon Web Services' (AWS) S3 buckets
- Google Cloud Storage (GCS) buckets
- Other types of cloud storage, through an S3-compatible API (read-only). This cloud storage type requires an additional API layer that the storage employs, which must use the same "language" as the AWS S3 API.
If your are using a cloud storage provider other than Amazon Web Services S3 or Google Cloud Storage, please make sure you have met the following requirements:
- There is an additional API layer implemented on your cloud storage, compatible with the AWS S3 API. This means that you need to use an additional service or software on top of your storage, that will emulate the behavior and interaction of AWS S3 storage.
- You or your cloud storage administrator can provide S3-compatible storage endpoint and credentials that are required to connect the storage to CAVATICA. These should be available for creation or obtaining when you have met the previous prerequisite.
https://cavatica-api.sbgenomics.com/v2/storage/volumesRequest
Example request
POST /v2/storage/volumes HTTP/1.1
Host: cavatica-api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
Content-Type: application/jsoncurl --data '@create-volume.json' -X POST -H "X-SBG-Auth-Token: ce7ae5ab85e946599298e88a3430fba0" -H "Content-Type: application/json" 'https://cavatica-api.sbgenomics.com/storage/volumes'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 |
|---|---|---|
| String | The name of the volume. It must be unique from all other volumes for this user. |
String | Signifies whether this volume should be used for read-write ( The access mode is consulted independently of the credentials granted to Seven Bridges when the volume was created, so it is possible to use a read-write credentials to register both read-write and read-only volumes using it.
| |
| String | An optional description of this volume. |
| Object | This object should contain the information about the cloud service that this volume represents. See the |
The service object
service objectKey | Data type of value | Description of value |
|---|---|---|
| string | The type of cloud service supported. Currently the only valid values are |
| String | A service-specific prefix to prepend to all objects created in this volume. If the service supports folders, and this prefix includes them, the API will attempt to create any missing folders when it outputs a file.
|
applies to type: | String | The name of the bucket you wish to register as a volume. |
default:https://s3.amazonaws.com for | String | Cloud provider API endpoint to use when accessing this bucket. For a list of AWS-supported endpoints, see AWS Regions and Endpoints. |
| Object | Contains credentials for the underlying cloud provider.
For Google Cloud Storage, these credentials are: |
applies to type: | String | AWS access key ID of the IAM user shared with Seven Bridges to access this bucket. |
applies to type: | String | AWS secret access key of the IAM user shared with Seven Bridges to access this bucket. |
applies to type: | String | Google Cloud Platform user email. |
applies to type: | String | Google Cloud Platform private key. |
| Object | Contains properties of specific service. |
s3 | String | Use default AES256 server-side encryption or AWS KMS encryption when writing to this bucket. Can be:
default: AES256 |
s3 | String | If AWS KMS encryption is used, this should be set to the required KMS key. If not set and |
Example request body
{
"name": "my_s3_volume",
"service": {
"type": "s3",
"bucket": "input_files",
"prefix": "",
"credentials": {
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
},
"properties": {
"sse_algorithm": "AES256"
}
},
"access_mode": "RO"
}{
"name": "my_gcs_volume",
"description": "New google volume",
"service": {
"type": "gcs",
"bucket": "output_files",
"prefix": "output",
"credentials": {
"client_email": "[email protected]",
"private_key": "-----BEGIN RSA PRIVATE KEY-----\nEXAMPLEBAAKCAQEAsXj4E7svaB4szcOrAcraSbsGnNuTU1b/4llyspDa0lltZIKL\nfl5s3QoqbjUWqAZXkJexKus55g49ULD8BGKH2r4EF+XyKcpoon4uIFcbmYcmsUXM\nJ3ujgyL5DbWnQZ6GrqgFNRFVVz/PuvTZOd6KFCrjbbtCxfKoXQrmCwFC/4NlFR3v\n1kavU81w201Mied3e+pxjfiQKAJOoy5I7kfuH20xfzHXWR2YHdQGbzOUZyPgmzZ6\nH6Ry39b7bgLVbyk3++e13KrsTEf58rRzUHLzlcUDcGyf8iTO2vA2qzcbrbovwqJr\n7H4ZfFllDMYQ/ISj4cmi+sz/hR43LUK86emrXwIDAQABAoIBADBr2fvAMbINsZm+\njjTh/ObrAWXgvvSZIx3F2/Z+cUW9Ioyu1ZJ3/uncMTF6iKD1ggSwbqVQIq7zKaWP\ndGNZ4sk62PEQSx8924iiNsG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2tjzDZYl9Vl8pZqvAL+MjZYl9Vl8pZqvAL+MZ4hpyYvs9CzX1KClL38XdaZ2ftKJB2tjzDZYl9Vl8pZqvALSi0sVSXpA=\n-----END RSA PRIVATE KEY-----"
}
},
"access_mode": "RW"
}Response
See a list of CAVATICA-specific response codes that may be contained in the body of the response.
Example response body
{
"href": "https://cavatica-api.sbgenomics.com/v2/storage/volumes/rfranklin/my_volume",
"id": "rfranklin/my_volume",
"name": "my_volume",
"access_mode": "RW",
"service": {
"type": "S3",
"bucket": "output",
"prefix": "",
"endpoint": "s3.amazonaws.com",
"credentials": {
"access_key_id": "AKIAIOSFODNN7EXAMPLE"
},
"properties": {
"sse_algorithm": "AES256"
}
},
"created_on": "2016-06-30T08:14:02Z",
"modified_on": "2016-06-30T08:14:02Z",
"active": true
}
Note that you cannot view volumes that you have created via the visual interface. However, you can see all your volumes by making the call to list volumes.
