---
title: "Generate download script"
method: GET
path: "/data-links/{dataLinkId}/script/download"
tags: ["data-links"]
---

# Generate download script

`GET /data-links/{dataLinkId}/script/download`

Creates a script to download files from the data-link associated with the given `dataLinkId`. Append `?dirs` or `?files` to specify a list of files or paths to download within the data-link.

## Path parameters

- `dataLinkId` string, required

## Query parameters

- `workspaceId` integer
- `credentialsId` string
- `dirs` object[]
- `files` object[]

## Response `200`

OK

- DataLinkDownloadScriptResponse
  - `script` string

## Other responses

- `400` — BadRequest
- `403` — Operation not allowed
- `404` — NotFound — workspace or credentials not found, API disabled for the workspace, or data-link or path not found

---

[API](https://skmtc.net/seqeralabs/apis/seqera-api.md) · [All operations](https://skmtc.net/seqeralabs/apis/seqera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/seqeralabs/seqera-api/revisions/13316c9fe5ff/schema)
