Method: jobs.cancel

Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs.

HTTP request

POST https://bigquery.googleapis.com/bigquery/v2/projects/{projectId}/jobs/{jobId}/cancel

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
projectId

string

Required. Project ID of the job to cancel

jobId

string

Required. Job ID of the job to cancel

Query parameters

Parameters
location

string

The geographic location of the job. You must specify the location to run the job for the following scenarios:

  • If the location to run a job is not in the us or the eu multi-regional location
  • If the job's location is in a single region (for example, us-central1)
For more information, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "kind": string,
  "job": {
    object (Job)
  }
}
Fields
kind

string

The resource type of the response.

job

object (Job)

The final state of the job.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/bigquery
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.