Initialize a multipart upload

/upload/multipart

This call initializes a multipart file upload.

https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/upload/multipart

Request

Example request

POST /v2/upload/multipart HTTP/1.1
Host: api.sb.biodatacatalyst.nhlbi.nih.gov
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://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/upload/multipart"

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your 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.
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.
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 (AWS), 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 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": "0rand0mQtmDILPCn1Gnhm8NC9qInFSzAo08sGG3AQmGzFXjmsw0Q9OlH55jTMcEg",
  "part_size": 5242880,
  "parallel_uploads": true
}