Get details of an import job

This call will return the details of an import job.

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

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

https://cgc-api.sbgenomics.com/v2/storage/imports/{import_id}

Request

Example request

GET /v2/storage/imports/9G3EcQdEDNcfqTQN2TOLoy0pV0uHsDkR HTTP/1.1
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
Content-Type: application/json
curl -s -H "X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74" -H "Content-Type: application/json" -X GET "https://cgc-api.sbgenomics.com/v2/storage/imports/9G3EcQdEDNcfqTQN2TOLoy0pV0uHsDkR"

Header Fields

KeyDescription of value
X-SBG-Auth-Token
required
Your CGC authentication token.
Content-type
required
application/json

Path parameters

KeyDescription of value
import_idThe ID of the import job as returned by the call to start an import job.

Response

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

Response body

The response object contains information about the status of the import job. The information is structured using the following key-value pairs:

KeyData type of valueDescription of value
idStringID of this import job
stateStringThe 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.
sourceObjectImport source, as passed when this job was started by the call to start an import job .
destinationObjectImport destination, as passed when this job was started by the call to start an import job
resultObjectFile object that was imported.
errorObjectIn case of error in the import job, standard API error is returned here.

Example response body

{
    "href": "https://cgc-api.sbgenomics.com/v2/storage/imports/9G3EcQdEDNcfqTQN2TOLoy0pV0uHsDkR",
    "id": "9G3EcQdEDNcfqTQN2TOLoy0pV0uHsDkR",
    "state": "COMPLETED",
    "overwrite": true,
    "autorename": false,
    "source": {
        "volume": "rfrankin/input",
        "location": "57148576d176941a8355.bam"
    },
    "destination": {
        "project": "rfranklin/my-project",
        "name": "sample1.bam"
    },
    "result": {
        "href": "https://cgc-api.sbgenomics.com/v2/files/5bd30cf2e4c16ad8c940e89c",
        "id": "5bd30cf2e4c16ad8c940e89c",
        "name": "sample1.bam",
        "size": 10718145,
        "project": "rfranklin/my-project",
        "created_on": "2018-10-26T12:47:46Z",
        "modified_on": "2018-10-26T12:47:46Z",
        "storage": {
            "type": "VOLUME",
            "volume": "rfrankin/input",
            "location": "57148576d176941a8355.bam"
        },
        "origin": {},
        "tags": [],
        "metadata": {}
    },
    "started_on": "2018-10-26T12:47:46Z",
    "finished_on": "2018-10-26T12:47:46Z"
}
{
    "href": "https://cgc-api.sbgenomics.com/v2/storage/imports/9cepXABnkm0F5VLk4lUT6oiFCet860xg",
    "id": "9cepXABnkm0F5VLk4lUT6oiFCet860xg",
    "state": "FAILED",
    "overwrite": true,
    "autorename": false,
    "source": {
        "volume": "rfranklin/input",
        "location": "57148576d176941e8355.bam"
    },
    "destination": {
        "project": "rfranklin/my-project",
        "name": "sample1.bam"
    },
    "error": {
        "status": 404,
        "code": 9105,
        "message": "Location on volume not found.",
        "more_info": "http://docs.cancergenomicscloud.org/docs/api-status-codes#9105"
    },
    "started_on": "2018-10-26T13:10:24Z",
    "finished_on": "2018-10-26T13:10:25Z"
}
Language