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://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/storage/imports/{import_id}

Request

Example request

GET /v2/storage/imports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap HTTP/1.1
Host: api.sb.biodatacatalyst.nhlbi.nih.gov
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://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/storage/imports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap"

Header Fields

KeyDescription of value
X-SBG-Auth-Token
required
Your 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 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://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/storage/imports/Yrand0mERJY4F3grand0mzh5UuTdw2Ap",
  "id": "Yrand0mERJY4F3grand0mzh5UuTdw2Ap",
  "state": "COMPLETED",
  "overwrite": true,
  "source": {
    "volume": "rfranklin/input",
    "location": "12345678714857613d176941a835574167_w640.jpg"
  },
  "destination": {
    "project": "rfranklin/my_project",
    "name": "imported.jpg"
  },
  "result": {
    "href": "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/files/567890abc1e5339df0414123",
    "id": "567890abc1e5339df0414123",
    "name": "imported.jpg",
    "size": 46102,
    "project": "rfranklin/my_project",
    "created_on": "2016-06-22T13:30:23Z",
    "modified_on": "2016-06-22T13:30:24Z",
    "storage": {
      "type": "VOLUME",
      "volume": "rfranklin/input",
      "location": "12345678714857613d176941a835574167_w640.jpg"
    },
    "origin": {}
  },
  "started_on": "2016-06-22T13:30:23Z",
  "finished_on": "2016-06-22T13:30:24Z"
}
{
  "href": "https://f4c-api.sbgenomics.com/v2/storage/imports/5rand0mXYcDQ3xtSHrKuK2jXNDtJhMBN",
  "id": "5rand0mXYcDQ3xtSHrKuK2jXNDtJhMBN",
  "state": "FAILED",
  "overwrite": false,
  "source": {
    "volume": "rfranklin/input",
    "location": "giphy.gif"
  },
  "destination": {
    "project": "rfranklin/my_project",
    "name": "giphy.gif"
  },
  "error": {
    "status": 403,
    "code": 9103,
    "message": "Location on volume is not accessible as configured. See the documentation.",
    "more_info": "https://f4c.readme.io/v1.0/docs/api-status-codes#9103"
  },
  "started_on": "2016-06-14T14:57:18Z",
  "finished_on": "2016-06-14T14:57:19Z"
}