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://ir-dev.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 modify the BAM file name in curl command instead of "download.bam".
(INBL2-0QFG8WP:bamDownLaod_test dasd$ curl -0 download.bam _L -k _X GET "https://juicebox.itw:443/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: ZWJjODU2ODIwYWY40Tk2Yjg2MzI5NTU1MzIxZTA0NGVlYTZlnjIyYTJllGJlNDMwMGI3oWM4ZGNhZTNlNzg1Mw" -H "Connection: close"
					 % Total % Received %Xferd Average Speed Time Time Current 100 43.2M 100 43.2M 0 0 186k 0 0:03:58 0:03:58 --:--:-- 242k [INBL2-0QFG8WP:bamDownLoad_test dasd$ ls -lrt total 88608 -rw-r-r 1 dasd 1153344739 45363244 Mar 29 21:09 download.bam INBL2-0QFG8WP:bamDownLoad_test dasd$

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://<your 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"