Downloads
File resolution by ID, species-scoped downloads, and asset catalog endpoints.
GET /api/v1/downloads
Returns available download assets, including data templates, reference FASTA files, and packaged archives.
curl https://api.ilepbase.com/api/v1/downloadsResponse
{
"success": true,
"data": {
"items": [
{
"id": "template",
"label": "Data Template",
"href": "/downloads/ilepbase-data-template.xlsx",
"type": "template"
},
{
"id": "barcode-reference",
"label": "Barcode Reference FASTA",
"href": "/downloads/barcode-reference.fa",
"type": "fasta"
},
{
"id": "genome-archive",
"label": "Genome Assembly Archive",
"href": "/downloads/genome-assemblies.tar.gz",
"type": "archive"
}
]
},
"timestamp": "2026-04-23T12:00:00.000Z"
}| Field | Type | Description |
|---|---|---|
items[].id | string | Asset identifier. |
items[].label | string | Human-readable label. |
items[].href | string | Download URL. |
items[].type | string | Asset type: template, fasta, or archive. |
GET /api/v1/downloads/{fileId}
Resolves a download file by ID. Returns the dataset type, storage provider, and the actual download URL (S3 pre-signed URL or direct link).
curl https://api.ilepbase.com/api/v1/downloads/1Response
{
"success": true,
"data": {
"fileId": 1,
"datasetType": "genome",
"storageProvider": "s3",
"downloadUrl": "https://downloads.ilepbase.com/genome/lepidoptera-assembly-v1.fa.gz"
},
"timestamp": "2026-04-23T12:00:00.000Z"
}| Field | Type | Description |
|---|---|---|
fileId | int | File identifier. |
datasetType | string | genome, transcriptome, or proteome. |
storageProvider | string | s3 or local. |
downloadUrl | string | Resolved download URL. |
Error: 404 Not Found
{
"success": false,
"error": {
"code": "FILE_NOT_FOUND",
"message": "File with ID 999 does not exist."
},
"timestamp": "2026-04-23T12:00:00.000Z"
}GET /api/v1/downloads/{fileId}/stream
Streams file bytes directly as a binary response.
curl -L -o assembly.fa.gz "https://api.ilepbase.com/api/v1/downloads/1/stream"Path Parameters
| Name | Type | Description |
|---|---|---|
fileId | int | File identifier (same as metadata endpoint). |
GET /api/v1/species/{speciesSlug}/downloads
Lists all downloadable assets for a given species, grouped by dataset type.
curl "https://api.ilepbase.com/api/v1/species/papilio-xuthus/downloads?datasetType=all"Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
datasetType | string | No | all | Filter by: genome, transcriptome, proteome, or all. |
Response
{
"success": true,
"data": {
"items": [
{
"datasetType": "genome",
"datasetId": "papilio-xuthus",
"datasetName": "Papilio xuthus genome assembly v1",
"source": "NCBI",
"file": {
"href": "/downloads/genome/papilio-xuthus-assembly.fa.gz",
"label": "assembly.fa.gz"
}
},
{
"datasetType": "transcriptome",
"datasetId": "tx-pxut-001",
"datasetName": "Larval midgut RNA-seq",
"source": "SRA",
"file": {
"href": "/downloads/transcriptome/tx-pxut-larval-midgut.fq.gz",
"label": "transcriptome.fq.gz"
}
},
{
"datasetType": "proteome",
"datasetId": "px-001",
"datasetName": "Papilio xuthus predicted proteins v2",
"source": "NCBI",
"file": {
"href": "/downloads/proteome/pxut-v2.faa.gz",
"label": "proteome.faa.gz"
}
}
]
},
"timestamp": "2026-04-23T12:00:00.000Z"
}