Get details of all async jobs

v2/async/files

This call gets the details for all asynchronous bulk jobs you have started. This information will be available for up to a month after the job has been completed.

Request

https://cgc-api.sbgenomics.com/v2/async/files

Example request

GET /v2/async/files
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
curl -X GET \
  https://cgc-api.sbgenomics.com/v2/async/files
  -H 'Content-Type: application/json' \
  -H 'X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74' \

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your CGC authentication token.
Content-Type
required
application/json

Query parameters

KeyData typeDescription
offsetintegerThe zero-based starting index in the entire collection of the first item to return. The default value is 0. This is a pagination-specific attribute.
limitintegerThe maximum number of collection items to return for a single request. Minimum value is 1. The maximum value is 100 and the default value is 25. This is a pagination-specific attribute.

Response

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

Response body

The response body will contain information for each of the jobs.

KeyData typeDescription
idstringID of the job.
resultstringThe result of the job.
typestringThe type of job.
statestringThe following states are available:

SUBMITTED
RESOLVING
RUNNING
FINISHED
failed_filesstringThe number of files that failed.
completed_filesstringThe number of files that were successfully completed.
total_filesstringThe total number of files that were processed for the job.

Example response body

{
    "href": "https://cgc-api.sbgenomics.com/v2/async/files?offset=0&limit=13",
    "items": [
        {
            "href": "https://cgc-api.sbgenomics.com/v2/async/files/copy/71711174376365120",
            "id": "71711174376365120",
            "result": [
                {
                    "resource": {
                        "href": "https://cgc-api.sbgenomics.com/v2/files/568e69abe9b0307bc0412345",
                        "id": "568e69abe9b0307bc0412345"
                    }
                }
            ],
            "type": "COPY",
            "state": "FINISHED",
            "failed_files": 0,
            "completed_files": 1,
            "total_files": 1,
            "started_on": "2019-02-20T12:03:50Z",
            "finished_on": "2019-02-20T12:03:51Z"
        },
        {
            "href": "https://cgc-api.sbgenomics.com/v2/async/files/copy/71714896452560426",
            "id": "71714896452560426",
            "result": [
                {
                    "resource": {
                        "href": "https://cgc-api.sbgenomics.com/v2/files/568e69abe9b0307bc0414164",
                        "id": "568e69abe9b0307bc0414164"
                    }
                },
                {
                    "resource": {
                        "href": "https://cgc-api.sbgenomics.com/v2/files/568e69abe9a5219bc0414164",
                        "id": "568e69abe9a5219bc0414164"
                    }
                },
                {
                    "resource": {
                        "href": "https://cgc-api.sbgenomics.com/v2/files/568e69abe9e9876bc0414164",
                        "id": "568e69abe9e9876bc0414164"
                    }
                }
            ],
            "type": "COPY",
            "state": "FINISHED",
            "failed_files": 0,
            "completed_files": 3,
            "total_files": 3,
            "started_on": "2019-02-20T13:03:00Z",
            "finished_on": "2019-02-20T13:03:00Z"
        },
        {
            "href": "https://cgc-api.sbgenomics.com/v2/async/files/copy/71714077612345678",
            "id": "71714077612345678",
            "result": [
                {
                    "resource": {
                        "href": "https://api.sbgenomics.com/v2/files/5f6d4cf7e4b0385017542766",
                        "id": "5f6d4cf7e4b0385017542766"
                    }
                },
                {
                    "resource": {
                        "href": "https://cgc-api.sbgenomics.com/v2/files/5f6d4cf7e4b038583e85c1a9",
                        "id": "5f6d4cf7e4b038583e85c1a9"
                    }
                }
            ],
            "type": "COPY",
            "state": "FINISHED",
            "failed_files": 0,
            "completed_files": 3,
            "total_files": 3,
            "started_on": "2019-02-20T12:49:59Z",
            "finished_on": "2019-02-20T12:49:59Z"
       }
    ],
    "links": []
}