Skip to main content
POST
POST samples instances_init_upload
Start an upload by POSTing the filename and size to /samples/init_upload. To actually perform the upload it is then necessary to transmit the file to the provided upload_url, with any additional_fields as needed. This second step varies depending on the upload_type. Currently only a standard upload type is available.

Performing the actual upload – “standard” upload type

The standard upload involves POSTing a sample up to 20GB in size to a provided HTTPS URL. The Content-Type should be multipart/form-data and the additional_fields should be included in the POST body. The workflow using httpie or Python requests is:

Authorizations

X-API-Key
string
header
required

Body

application/json
filename
string
required

The filename of the sample to be uploaded. FASTA and FASTQ records, optionally gzipped (and ending in .gz or .gzip) are supported. Filenames should only contain alphanumeric characters, dashes, underscores, and periods.

Pattern: ^[\w\.]+[\w\-\.\[\]\(\)\{\} ]*\.[\w\.]+$
external_sample_id
string | null

An optional external sample ID (see the Metadata resource) to match against pre-uploaded samples. Returns a 400 if no matching sample is found.

interleaved
boolean | null

Whether the file is interleaved (true) or not (false).

metadata
InlineMetadata · object | null

An optional metadata object to be added to the sample.

paired_end_filename
string | null

Optional filename for paired end uploads.

Pattern: ^[\w\.]+[\w\-\.\[\]\(\)\{\} ]*\.[\w\.]+$
project
projects · object | null

An optional project into which to upload the sample.

sample_id
string | null

An optional sample ID to match against pre-uploaded samples. Returns a 400 if no matching sample is found.

size
integer | null

The size of the file in bytes.

Required range: x >= 0
tags
InlineTag · object[]

An array of tags to be added to the sample.

upload_type
string
default:standard

The type of upload to initiate. Currently only standard uploads are supported via the init_upload route.

Allowed value: "standard"

Response

200 - application/json

OK

sample_id
string
required

The sample ID. Use to confirm the upload.

upload_url
string
required

Object storage location to POST the file to.

additional_fields
Additional Fields · object

Additional fields to include in the object storage POST request.

fallback_options
Fallback Options · object | null

Fallback options for the upload. Please contact support for help as needed.

paired_end_additional_fields
Paired End Additional Fields · object | null

Additional fields to include in the object storage POST request for the paired end file (optional).

paired_end_upload_url
string | null

Object storage location to POST the paired end file to (optional).