Jobs

Jobs list

Jobs are objects that manage asynchronous tasks, these are all potentially long-running actions such as loading table data, snapshotting, table structure modifications. Jobs are created by actions on target resources, e.g., an asynchronous import request creates a table import job. For each new job, the Id and URL of the job is returned.

When working with jobs, follow these steps:

  1. Start the job - Job resource is created and a URL for polling is returned.
  2. Poll job status - Poll the job URL in a loop until the job status is set to success or error.
  3. Check the results - When the job is finished, the results field will contain the actual result of the original request.

Available Statuses:

  • waiting - The job is in the queue and is waiting for execution.
  • processing - The job is being processed by a worker.
  • success - The job is done with a success.
  • error - The job is done with an error.

Lists jobs of the project. Query parameters filter the list; limit defaults to 100 and offset to 0. The *_from / *_to filters are not applied when the corresponding exact-time filter is used, and excluded_storage_job_status is not applied when storage_job_status is used. Time values use the Y-m-d H:i:s format.

get/v2/storage/jobs

Request

Query parameters

limitinteger nullable

Maximum number of jobs to return (pagination).

offsetinteger nullable

Offset for pagination.

storage_job_status[]string[] nullable

Filter by job status.

excluded_storage_job_status[]string[] nullable

Exclude jobs with these statuses.

created_timestring date-time nullable

Filter by exact created time.

created_time_fromstring date-time nullable

Filter jobs created after this time.

created_time_tostring date-time nullable

Filter jobs created before this time.

start_timestring date-time nullable

Filter by exact start time.

start_time_fromstring date-time nullable

Filter jobs started after this time.

start_time_tostring date-time nullable

Filter jobs started before this time.

end_timestring date-time nullable

Filter by exact end time.

end_time_fromstring date-time nullable

Filter jobs ended after this time.

end_time_tostring date-time nullable

Filter jobs ended before this time.

Response

List of storage jobs.

idstring required

Job ID.

statusstring required

Current status of the job.

urlstring required

API detail URL for the job.

tableIdstring nullable required

ID of the table affected by the job.

operationNamestring required

Type of operation performed.

operationParamsobject required

Parameters for the operation.

createdTimestring date-time required

Job creation timestamp.

startTimestring date-time nullable required

Job start timestamp.

endTimestring date-time nullable required

Job end timestamp.

runIdstring nullable required

Run ID for the job.

Example response

[
  {
    "id": "22077337",
    "status": "waiting",
    "url": "https://connection.keboola.com/v2/storage/jobs/22077337",
    "tableId": null,
    "operationName": "workspaceLoad",
    "operationParams": {
      "workspaceId": "78423",
      "preserve": false,
      "input": [
        {
          "source": "in.c-application-testing.cashier-data",
          "destination": "my-table"
        }
      ],
      "queue": "main_fast"
    },
    "createdTime": "2017-02-13T16:41:18+0100",
    "startTime": null,
    "endTime": null,
    "runId": null,
    "results": null,
    "creatorToken": {
      "id": "27978",
      "description": "john.doe@keboola.com"
    },
    "actor": {
      "type": "token",
      "id": "27978",
      "name": "john.doe@keboola.com",
      "adminId": 1234
    },
    "metrics": {
      "inCompressed": false,
      "inBytes": 0,
      "inBytesUncompressed": 0,
      "outCompressed": false,
      "outBytes": 0,
      "outBytesUncompressed": 0
    }
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.