---
title: "Get a job"
method: GET
path: "/v3/sql/{connectionName}/job/{jobId}"
tags: ["SQL"]
---

# Get a job

`GET /v3/sql/{connectionName}/job/{jobId}`

Returns the current state of an asynchronous job.

## Path parameters

- `connectionName` string, required
- `jobId` string, required

## Response `200`

The job.

- Job — The state of an asynchronous SQL job.
  - `jobId` string
  - `connectionName` string
  - `providerId` string
  - `query` string, nullable
  - `status` 'pending' | 'running' | 'success' | 'failure' | 'cancelled' | 'blocked' | 'resuming_warehouse' — `success`, `failure` and `cancelled` are final states.
  - `error` object, nullable
    - `msg` string
    - `code` string, nullable
  - `createdAt` string, date-time
  - `provider` object — Provider-specific execution detail. Omitted for jobs created from a named source.
  - `jobMetadata` object
  - `metadata` object
  - `token` string, nullable

## Other responses

- `401` — The token is missing, malformed or expired.
- `403` — The token doesn't grant access to this resource.
- `404` — The resource doesn't exist.
- `429` — You went over the [rate limit](#rate-limits) for this API.

---

[API](https://skmtc.net/gitbookio/apis/carto-api.md) · [All operations](https://skmtc.net/gitbookio/apis/carto-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitbookio/carto-api/revisions/019f79ecdd6c/schema)
