Get details of a bulk export job

📘

When exporting a file from the Platform to an attached volume, export is possible only to a volume that is in the same location (cloud provider and region) as the project from which the file is being exported.

This call returns the details of a bulk export job.

When you export files from a project on the Platform into a volume, you write to your cloud storage bucket. This call obtains the details of that job.

Learn more about using the Volumes API for Amazon S3.

Request

https://api.sbgenomics.com/v2/bulk/storage/export/get
https://eu-api.sbgenomics.com/v2/bulk/storage/export/get

Example request

POST v2/bulk/storage/export/get
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f75
curl -X POST \
  https://api.sbgenomics.com/v2/bulk/storage/exports/get \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'X-SBG-Auth-Token: b04aa2a2e98348a1a3a75ca677ea7fd7' \
  -d '{
    "export_ids": [
        "gOM3zcx6CG411ac0SbNkaUE0SNRK4H0S", "YFyyZ7rpCGtXjKTzjGGRJIIAmCd6Mh19"
    ]
}
'
from sevenbridges import Api

api = Api(url='https://api.sbgenomics.com/v2',
          token='3259c50e1ac5426ea8f1273259740f74')

# send POST request to SB API
bulk_exports = api.exports.bulk_get(
    exports=[
        'gOM3zcx6CG411ac0SbNkaUE0SNRK4H0S',
        'YFyyZ7rpCGtXjKTzjGGRJIIAmCd6Mh19'
    ]
)

for export_record in bulk_exports:
    if export_record.valid:
        export = export_record.resource
        print(export.id, export.state)
    else:
        print(export_record.error)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Content-Type
required

application/json

Request body

Key

Description

export_ids

The IDs of the export job as returned by the call to start a bulk export job. Separate IDs with a comma.

Response

See a list of Seven Bridges Platform-specific response codes that may be contained in the body of the response.

Response body

Key

Data type

Description

id

string

The ID of the particular export job.

state

string

The state of this export job. Possible values are:

  • PENDING: the export is queued
  • RUNNING: the export is running
  • COMPLETED: the export has completed successfully
  • FAILED: the export has failed

source

object

Export source, as passed when this job was started by the call to start an export job.

destination

object

export destination, as passed when this job was start an export job.

result

object

File object that was exported.

error

object

In case of error in the export job, standard API error is returned here.

Example response body

{
    "items": [
        {
            "resource": {
                "href": "https://api.sbgenomics.com/v2/storage/exports/gOM3zcx6CG411ac0SbNkaUE0SNRK4H0S",
                "id": "gOM3zcx6CG411ac0SbNkaUE0SNRK4H0S",
                "state": "COMPLETED",
                "overwrite": true,
                "source": {
                    "volume": "rfranklin/input",
                    "location": "my_uploaded_example_human_Illumina.pe_1.fastq"
                },
                "destination": {
                    "project": "rfranklin/my_project",
                    "name": "example_human_Illumina.pe_1.fastq"
                },
                "result": {
                    "href": "https://api.sbgenomics.com/v2/files/5aba5c8b1c94b662fa6c2ae4",
                    "id": "5aba5c8b1c94b662fa6c2ae4",
                    "name": "example_human_Illumina.pe_1.fastq",
                    "size": 36433,
                    "project": "rfranklin/my-project",
                    "created_on": "2018-03-27T15:00:27Z",
                    "modified_on": "2018-03-27T15:00:30Z",
                    "storage": {
                        "type": "VOLUME",
                        "volume": "rfranklin/input",
                        "location": "example_human_Illumina.pe_1.fastq"
                    },
                    "origin": {},
                    "tags": [],
                    "metadata": {}        
                },
                "finished_on": "2018-03-27T15:00:28Z"
            }
        },
        {
            "resource": {
                "href": "https://api.sbgenomics.com/v2/storage/exports/YFyyZ7rpCGtXjKTzjGGRJIIAmCd6Mh19",
                "id": "YFyyZ7rpCGtXjKTzjGGRJIIAmCd6Mh19",
                "state": "COMPLETED",
                "overwrite": true,
                "source": {
                    "volume": "rfranklin/input",
                    "location": "example_human_Illumina.pe_2.fastq"
                },
                "destination": {
                    "project": "rfranklin/my-project",
                    "name": "example_human_Illumina.pe_2.fastq"
                },
                "result": {
                    "href": "https://api.sbgenomics.com/v2/files/5aba5c8b1c94b662fa6c2ae4",
                    "id": "5aba5c8b1c94b662fa6c2ae4",
                    "name": "example_human_Illumina.pe_2.fastq",
                    "size": 36433,
                    "project": "rfranklin/my-project",
                    "created_on": "2018-03-27T15:00:27Z",
                    "modified_on": "2018-03-27T15:00:30Z",
                    "storage": {
                        "type": "VOLUME",
                        "volume": "rfranklin/input",
                        "location": "example_human_Illumina.pe_2.fastq"
                    },
                    "origin": {},
                    "tags": [],
                    "metadata": {}
                },
                "finished_on": "2018-03-27T15:00:31Z"
            }
        }
    ]
}