---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:run"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:run"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:run

`POST /v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:run`

## Request

- Base URL: `https://dataplex.googleapis.com`
- URL: `https://dataplex.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:run`
- Auth: one of:
  - 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`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/dataplex.read-write`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/dataplex.read-write`

Run an on demand execution of a Task.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required
- `lakesId` string, required
- `tasksId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string

## Request body

- GoogleCloudDataplexV1RunTaskRequest
  - `args` object: Optional. Execution spec arguments. If the map is left empty, the task will run with existing execution spec args from task definition. If the map contains an entry with a new key, the same will be added to existing set of args. If the map contains an entry with an existing arg key in task definition, the task will run with new arg value for that entry. Clearing an existing arg will require arg value to be explicitly set to a hyphen "-". The arg value cannot be empty.
  - `labels` object: Optional. User-defined labels for the task. If the map is left empty, the task will run with existing labels from task definition. If the map contains an entry with a new key, the same will be added to existing set of labels. If the map contains an entry with an existing label key in task definition, the task will run with new label value for that entry. Clearing an existing label will require label value to be explicitly set to a hyphen "-". The label value cannot be empty.

## Response `200`

Successful response

- GoogleCloudDataplexV1RunTaskResponse
  - `job` GoogleCloudDataplexV1Job: A job represents an instance of a task.
    - `endTime` string, google-datetime: Output only. The time when the job ended.
    - `executionSpec` GoogleCloudDataplexV1TaskExecutionSpec: Execution related settings, like retry and service_account.
      - `args` object: Optional. The arguments to pass to the task. The args can use placeholders of the format ${placeholder} as part of key/value string. These will be interpolated before passing the args to the driver. Currently supported placeholders: - ${task_id} - ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument.
      - `kmsKey` string: Optional. The Cloud KMS key to use for encryption, of the form: projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}.
      - `maxJobExecutionLifetime` string, google-duration: Optional. The maximum duration after which the job execution is expired.
      - `project` string: Optional. The project in which jobs are run. By default, the project containing the Lake is used. If a project is provided, the ExecutionSpec.service_account must belong to this project.
      - `serviceAccount` string: Required. Service account to use to execute a task. If not provided, the default Compute service account for the project is used.
    - `labels` object: Output only. User-defined labels for the task.
    - `message` string: Output only. Additional information about the current state.
    - `name` string: Output only. The relative resource name of the job, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}.
    - `retryCount` integer: Output only. The number of times the job has been retried (excluding the initial attempt).
    - `service` 'SERVICE_UNSPECIFIED' | 'DATAPROC': Output only. The underlying service running a job.
    - `serviceJob` string: Output only. The full resource name for the job run under a particular service.
    - `startTime` string, google-datetime: Output only. The time when the job was started.
    - `state` 'STATE_UNSPECIFIED' | 'RUNNING' | 'CANCELLING' | 'CANCELLED' | 'SUCCEEDED' | 'FAILED' | 'ABORTED': Output only. Execution state for the job.
    - `trigger` 'TRIGGER_UNSPECIFIED' | 'TASK_CONFIG' | 'RUN_REQUEST': Output only. Job execution trigger.
    - `uid` string: Output only. System generated globally unique ID for the job.

## Changes

- **2026-12-05** `5d0894669d35`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/dataplex.read-write` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/dataplex.read-write` was removed from the endpoint's security scheme `Oauth2c`
- **2026-11-09** `a87e571d134a`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/dataplex.read-write` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/dataplex.read-write` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/dataplex/changes/v1/projects/:projectsId/locations/:locationsId/lakes/:lakesId/tasks/:tasksId:run/post.md)

---

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