---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/nasJobs/{nasJobsId}:cancel"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/nasJobs/{nasJobsId}:cancel"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/nasJobs/{nasJobsId}:cancel

`POST /v1/projects/{projectsId}/locations/{locationsId}/nasJobs/{nasJobsId}:cancel`

## Request

- Base URL: `https://aiplatform.googleapis.com`
- URL: `https://aiplatform.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/nasJobs/{nasJobsId}:cancel`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/cloud-platform`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetNasJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a NasJob.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and NasJob.state is set to `CANCELLED`.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required
- `nasJobsId` string, required

## Request body

- GoogleCloudAiplatformV1CancelNasJobRequest: Request message for JobService.CancelNasJob.

## Response `200`

Successful response

- GoogleProtobufEmpty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

---

[API](https://skmtc.dev/google/apis/aiplatform.md) - [All operations](https://skmtc.dev/google/apis/aiplatform/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/aiplatform/revisions/3aca3b348f0c?raw)
