Jobs API - Getting information about jobs

GET /v0/jobs/(.+)

There’re some operations that can start a job in Tinybird:

  • Import data via URL

  • Run a query

  • Populate data to a data source

When any of these operations start, the response contains a job_id field. We can get the information of this job as follows:

Getting information about a job
curl \
-H "Authorization: Bearer <token>" \
"https://api.tinybird.co/v0/jobs/job_id" \

Depending on the job kind (import, query, or populate), it will return certain information related with the specific job, along with the status of the job.

Job status can be one of the following:

  • waiting: The initial status of a job. When creating a job, it has to wait if there’re other jobs running

  • working: Once the job operation has started

  • done: The job has finished successfully

  • error: The job has finished with an error

Import job has finished successfully
{
    "id": "c8ae13ef-e739-40b6-8bd5-b1e07c8671c2",
    "job_id": "c8ae13ef-e739-40b6-8bd5-b1e07c8671c2",
    "kind": "import",
    "status": "done",
    "statistics": {
        "bytes": 1913,
        "row_count": 2
    },
    "datasource": {
        "id": "t_0ab7a11969fa4f67985cec481f71a5c2",
        "name": "your_datasource_name",
        "cluster": null,
        "tags": {},
        "created_at": "2020-07-15 10:52:21.900886",
        "updated_at": "2020-07-15 10:52:22.335639",
        "statistics": {
            "bytes": 1913,
            "row_count": 2
        },
        "replicated": false,
        "version": 0,
        "project": null,
        "used_by": []
    }
}

If there’s been an error in the import operation, the job response will also include a detailed error:

Job has finished with errors
{
    "id": "1f6a5a3d-cfcb-4244-ba0b-0bfa1d1752fb",
    "job_id": "1f6a5a3d-cfcb-4244-ba0b-0bfa1d1752fb",
    "kind": "import",
    "status": "error",
    "statistics": null,
    "datasource": {
        "id": "t_02043945875b4070ae975f3812444b76",
        "name": "your_datasource_name",
        "cluster": null,
        "tags": {},
        "created_at": "2020-07-15 10:55:12.427269",
        "updated_at": "2020-07-15 10:55:12.427270",
        "statistics": null,
        "replicated": false,
        "version": 0,
        "project": null,
        "used_by": []
    },
    "quarantine_rows": 0,
    "invalid_lines": 0,
    "error": "There was an error with file contents",
    "errors": [
        "There are blocks with errors",
        "failed to normalize the CSV chunk: [DB error] Cannot read DateTime: unexpected number of decimal digits for time zone offset: 6"
    ]
}