Download a BAM file

downloadBAM

URL

/api/v1/downloadBAM

Description

Download a BAM file for a given sample or analysis. This procedure applies to Ion Reporter™ Server only.

Method

GET

Request query parameters

  • filePath

    String. Mandatory.

    Filepath of bam file got using / getAssociatedBamfiles AP.

  • type

    String. Optional.

    Valid values are "pdf" or "" (by default creates a ZIP file and downloads it.)

Example request

https://ionreporter.thermofisher.com:80/api/v1/downloadBAM?filePath=/shared/data/ShazIndia-Labs/data/IRU_Uploads/20180302_01_06_30/v1/CFTR_15KB_deletion/1_AmpCFTR_contig7_15KBDeletions.bam"

Request headers

Content-Type:application/x-www-form-urlencoded

Authorization:API Token

Returns

Downloads the given BAM file. User can replace "download.bam" in curl command with the BAM file name.

Response fields

Status code

Response message

200

Successful response

400

Bad request

404

Not found

401

User is not authenticated

500

Error occurred

Curl command


curl -o download.bam -L -k -X GET "https://<server name>/api/v1/downloadBAM?filePath=/data/IR/data/IR_Org/ion.reporter@lifetech.com/Demo_AmpliSeq_CHPv2_tumor/Demo_AmpliSeq_CHPv2_tumor_20180319063625805/outputs/VariantCallerActor-00/merged.bam.ptrim.bam" -H "Content-Type:application/x-www-form-urlencoded" -H "auth: ZWJjODU2ODIwYWY4OTk2Yjg2MzI5NTU1MzIxZTA0NGVlYTZlNjIyYTJlMGJlNDMwMGI3OWM4ZGNhZTNlNzg1Mw" -H "Connection: close"