Initialize a multipart upload

/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/multipart

Request

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

NameDescription
X-SBG-Auth-Token
required
Your CAVATICA authentication token.
Content-Type
required
application/json

Query parameters

NameDatatypeDescription
overwriteBoolean: true or falseIf overwrite is set to true and a file already exists under the name specified in the request, the existing file will be deleted and a new one created in its place.

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.

KeyDatatype of valueDescription of value
project
Required
StringThe name of the project you want to upload a file to.
parentStringThe ID of the folder to which the item is being uploaded.

Should not be used together with project. If parent is used, the upload will take place into the specified folder, within the project to which the folder belongs. If project is used, the items will be imported to the root of the project's files.
name
Required
StringThe name of the file you are about to upload. This must be unique in the project, unless you are also enabling the overwrite query parameter.

Allowed characters in file names are all alphanumerics and special characters except slash (/). File names can’t be longer than 255 characters.
sizeIntegerThe size of the file that will be uploaded. This can be used to track progress of an ongoing upload, but is otherwise optional.
part_sizeIntegerThe 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.
md5String32-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
}

Language