Get details of a bulk import job

This call returns the details of a bulk import job.

Note that when you import files from your volume on a cloud storage provider (Amazon Web Services or Google Cloud Storage), you create an alias on the Platform which points to the files in your cloud storage bucket. Aliases appear as files on the Platform and can be copied, executed, and modified.

Learn more about using the Volumes API for for Amazon S3 and for Google Cloud Storage.

Request

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

Example request

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

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

# send POST request to SB API
imports_bulk = api.imports.bulk_get(
    imports=[
        'wMtBbkNxJ7ldKtkZ3hC3eisVr3DtQcT3',
        '0vXu4HQe7WqdTZg9iRcetk0UePQZ2I9I'
    ]
)

for import_record in imports_bulk:
    if import_record.valid:
        import_ = import_record.resource
        print(import_.id, import_.state)
    else:
        print(import_record.error)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Content-Type
required

application/json

Request body

Name

Description

import_ids

The IDs of the import jobs as returned by the call to start a bulk import 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

ID of this import job.

state

string

The state of this import job. Possible values are:

  • PENDING: the import is queued;
  • RUNNING: the import is running;
  • COMPLETED: the import has completed successfully;
  • FAILED: the import has failed.

source

object

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

destination

object

Import destination, as passed when this job was start an import job.

result

object

File object that was imported.

error

object

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

Example response body

{
    "items": [
        {
            "resource": {
                "href": "https://api.sbgenomics.com/v2/storage/imports/wMtBbkNxJ7ldKtkZ3hC3eisVr3DtQcT3",
                "id": "wMtBbkNxJ7ldKtkZ3hC3eisVr3DtQcT3",
                "state": "PENDING",
                "overwrite": true,
                "source": {
                    "volume": "rfranklin/input",
                    "location": "example_human_Illumina.pe_1.fastq"
                },
                "destination": {
                    "project": "rfranklin/my_project",
                    "name": "example_human_Illumina.pe_1.fastq"
                }
            }
        },
        {
            "resource": {
                "href": "https://api.sbgenomics.com/v2/storage/imports/0vXu4HQe7WqdTZg9iRcetk0UePQZ2I9I",
                "id": "0vXu4HQe7WqdTZg9iRcetk0UePQZ2I9I",
                "state": "PENDING",
                "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"
                }
            }
        }
    ]
}