Skip to content

Get variant file download ticket

GET
/variants/{id}

Gets an htsget ticket containing URLs that will enable the transfer of a requested variant file

Parameters

Path Parameters

id
required
string format: path

Read or variant object identifier

Query Parameters

format
string
default: VCF
Allowed values: VCF BCF VCF-JSON

Desired variant file format

Example
VCF
class
string
Allowed values: header body

Request different classes of data. By default, i.e., when class is not specified, the response will represent a complete read or variant data stream, encompassing SAM/CRAM/VCF headers, body data records, and EOF marker

Example
header
referenceName

Reference sequence name

string
chr1
start

The start position of the range on the reference, 0-based, inclusive

integer format: int64
12312
end

The end position of the range on the reference, 0-based, exclusive

integer format: int64
99999

Responses

200

Successfully retrieved htsget ticket

object
htsget
required

Contains htsget ticket attributes that will enable genomic file transfer

object
format
required

The format of the returned file

string
Allowed values: BAM CRAM VCF BCF
urls
required

An array of URLs and headers that, when requested, will transfer individual file parts of a requested genomic file

Array<object>

A URL and associated headers that, when requested, perform transfer of a requested file

object
url
required

Data transfer URL

string
https://htsget.ga4gh.org/reads/data/object00001?referenceName=chr1
headers
required

Headers that must be supplied in the request to a data transfer URL

object
HtsgetBlockClass

When supplied to the data transfer URL, indicates whether a header or body file part is to be returned

string
Allowed values: header body
header
HtsgetCurrentBlock

Indicates the file part’s position within the overall downloaded file

string
0
HtsgetTotalBlocks

Indicates how many file parts the overall genomic file transfer has been broken into

string
100
HtsgetFilePath

Path to a local file that is to be streamed on simple byte indices

string
/data/reads/object00001.bam
Range

The start/end byte positions of the file to be streamed

string
bytes=0-500000
class

Indicates whether the url is responsible for downloading the requested file header or body

string
Allowed values: header body
id

ID of the htsget object

string
htsget
object
format
VCF
urls
object
url
required

Data transfer URL

string
https://htsget.ga4gh.org/reads/data/object00001?referenceName=chr1
headers
required

Headers that must be supplied in the request to a data transfer URL

object
HtsgetBlockClass

When supplied to the data transfer URL, indicates whether a header or body file part is to be returned

string
Allowed values: header body
header
HtsgetCurrentBlock

Indicates the file part’s position within the overall downloaded file

string
0
HtsgetTotalBlocks

Indicates how many file parts the overall genomic file transfer has been broken into

string
100
HtsgetFilePath

Path to a local file that is to be streamed on simple byte indices

string
/data/reads/object00001.bam
Range

The start/end byte positions of the file to be streamed

string
bytes=0-500000
class

Indicates whether the url is responsible for downloading the requested file header or body

string
Allowed values: header body
url
https://htsget.ga4gh.org/variants/data/00001
headers
object
HtsgetBlockClass

When supplied to the data transfer URL, indicates whether a header or body file part is to be returned

string
Allowed values: header body
header
HtsgetCurrentBlock

Indicates the file part’s position within the overall downloaded file

string
0
HtsgetTotalBlocks

Indicates how many file parts the overall genomic file transfer has been broken into

string
100
HtsgetFilePath

Path to a local file that is to be streamed on simple byte indices

string
/data/reads/object00001.bam
Range

The start/end byte positions of the file to be streamed

string
bytes=0-500000
FilePath
/data/variants/object00001.vcf

400

The request was not processed, as the request parameters did not adhere to the specification

object
htsget
required

Error object container

object
error
required

Name/type of the error that occurred

string
ServerError
message
required

Message explaining why the error occurred

string
An unspecified server error occurred
htsget
object
error
InvalidInput
message
'FOO' is not an acceptable field

404

The request was not processed, as the requested object was not found

object
htsget
required

Error object container

object
error
required

Name/type of the error that occurred

string
ServerError
message
required

Message explaining why the error occurred

string
An unspecified server error occurred
htsget
object
error
NotFound
message
The requested resource could not be located

5XX

Unspecified server error encountered

object
htsget
required

Error object container

object
error
required

Name/type of the error that occurred

string
ServerError
message
required

Message explaining why the error occurred

string
An unspecified server error occurred