/upload/multipart
For general information on the API, including formatting, parameters, and pagination, please see the API Overview.
This call initializes a multipart file upload.
https://cavatica-api.sbgenomics.com/v2/upload/multipartRequest
Example request
POST /v2/upload/multipart HTTP/1.1
Host: cavatica-api.sbgenomics.com
Content-Type: application/json
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
{
"project": "RFranklin/my-project",
"name": "CanFam3.1.dna_rm.toplevel.fa.gz",
"part_size": 5242880,
"size": 433759572
}curl --data '{"project": "RFranklin/my-project", "name": "CanFam3.1.dna_rm.toplevel.fa.gz", "part_size": 5242880, "size": 433759572}' -s -H "X-SBG-Auth-Token: 7942f56901534434a054dafc3813bc96" -H "content-type: application/json" -X POST "https://cavatica-api.sbgenomics.com/v2/upload/multipart"Header Fields
Name | Description |
|---|---|
| Your CAVATICA authentication token. |
|
|
Query parameters
Name | Datatype | Description |
|---|---|---|
| Boolean: | If |
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 | Datatype of value | Description of value |
|---|---|---|
| String | The name of the project you want to upload a file to. |
| String | The ID of the folder to which the item is being uploaded. Should not be used together with |
| String | The name of the file you are about to upload. This must be unique in the project, unless you are also enabling the Allowed characters in file names are all alphanumerics and special characters except slash ( |
| Integer | The size of the file that will be uploaded. This can be used to track progress of an ongoing upload, but is otherwise optional. |
| Integer | The preferred size for upload parts. If omitted or set to a value that is incompatible with the cloud storage provider, a default value will be used. |
| String | 32-byte hexadecimal MD5 checksum of the file. This value is currently only stored but is not used by the Platform. |
Response
See a list of CAVATICA-specific response codes that may be contained in the body of the response.
Example response body
{
"project": "RFranklin/my-project",
"name": "CanFam3.1.dna_rm.toplevel.fa.gz",
"size": 433759572,
"upload_id": "srand0mB1h7n3UcjUEqcHKahAl1cizencbI1OQvIkGv8qQRDiP2VAtUpO8NnLKFN",
"part_size": 5242880,
"parallel_uploads": true
}