Downloads

Each instance of Flow, in addition to having a URL for the API, has a URL for the files server. For example, on the public instance this is https://files.flow.bio. If you have a private instance of Flow, it will likely be the API's URL, with files in place of api. This service can be used to download individual files, or multiple files at once.

Individual Data

Any data object's underlying file can be downloaded from the files service using the path: /downloads/<data_id>/<data_filename>.

If the data is public, this will return the file - if not, you will get an unauthorized error. You need to provide a JWT in the Authorization HTTP header of the request, just as you would with the API service. See here for an overview of what JWTs are and how they are used, or see the REST or GraphQL docs for details on how to obtain one.

For example, if downloading from the public Flow instance:

Download private file from files server

curl https://files.flow.bio/downloads/12345/myfile.fa \
  -H "Authorization: Bearer {token}"

Bulk data download

Flow can zip multiple files at once and allow you to download this single zip. You trigger this job using the API, and can poll its status. Once ready, it is accessible from the files server at /downloads/<bulk_download_job_id> - again with the token parameter to authenticate.

A bulk download job has the following properties:

  • Name
    created
    Type
    int
    Description

    The timestamp for the creation of the job.

  • Name
    started
    Type
    int
    Description

    The timestamp for when the job started compression.

  • Name
    finished
    Type
    int
    Description

    The timestamp for when the job finished compression.

  • Name
    by_execution
    Type
    bool
    Description

    Whether the data files should be grouped by execution in the zip.

  • Name
    data
    Type
    [ID]
    Description

    The data objects to compress.

  • Name
    user
    Type
    ID
    Description

    The user who triggered the job.

You can trigger this job using the GraphQL API or the REST API.

Was this page helpful?