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://cavatica-api.sbgenomics.com/v2/storage/imports/{import_id}

Request

Example request

GET /v2/storage/imports/prand0mBrcK8tVRZJeQXs87mh6sH43tM HTTP/1.1
Host: cavatica-api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
Content-Type: application/json
curl -s -H "X-SBG-Auth-Token: 7942f56901534434a054dafc3813bc96" -H "Content-Type: application/json" -X GET "https://cavatica-api.sbgenomics.com/v2/storage/imports/prand0mBrcK8tVRZJeQXs87mh6sH43tM"

Header Fields

KeyDescription of value
X-SBG-Auth-Token
required
Your CAVATICA 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 CAVATICA-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://cavatica-api.sbgenomics.com/v2/storage/imports/prand0mBrcK8tVRZJeQXs87mh6sH43tM",
    "id": "prand0mBrcK8tVRZJeQXs87mh6sH43tM",
    "state": "COMPLETED",
    "overwrite": true,
    "autorename": false,
    "source": {
        "volume": "rfrankin/input",
        "location": "57abcd7613d176941a8355.bam"
    },
    "destination": {
        "project": "rfranklin/my-project",
        "name": "sample1.bam"
    },
    "result": {
        "href": "https://cavatica-api.sbgenomics.com/v2/files/567890abce4b05ad8c940e89c",
        "id": "567890abce4b05ad8c940e89c",
        "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": "57abcd7613d176941a8355.bam"
        },
        "origin": {},
        "tags": [],
        "metadata": {}
    },
    "started_on": "2018-10-26T12:47:46Z",
    "finished_on": "2018-10-26T12:47:46Z"
}
{
    "href": "https://cavatica-api.sbgenomics.com/v2/storage/imports/yrand0mqLcnVaDEFYyM75zZ7M6rvTeZm",
    "id": "yrand0mqLcnVaDEFYyM75zZ7M6rvTeZm",
    "state": "FAILED",
    "overwrite": true,
    "autorename": false,
    "source": {
        "volume": "rfranklin/input",
        "location": "57abcd7613d176941a8355.bam"
    },
    "destination": {
        "project": "rfranklin/my-project",
        "name": "sample1.bam"
    },
    "error": {
        "status": 404,
        "code": 9105,
        "message": "Location on volume not found.",
        "more_info": "http://docs.cavatica.org/docs/api-status-codes#9105"
    },
    "started_on": "2018-10-26T13:10:24Z",
    "finished_on": "2018-10-26T13:10:25Z"
}
Language