---
title: "POST /v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease"
method: POST
path: "/v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease"
tags: ["projects"]
---

# POST /v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease

`POST /v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease`

Leases a dataflow WorkItem to run.

## Path parameters

- `projectId` string, required
- `jobId` string, required

## Request body

- LeaseWorkItemRequest — Request to lease WorkItems.
  - `workItemTypes` string[] — Filter for WorkItem type.
  - `location` string — The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the WorkItem's job.
  - `projectNumber` string, int64 — Optional. The project number of the project this worker belongs to.
  - `unifiedWorkerRequest` object — Untranslated bag-of-bytes WorkRequest from UnifiedWorker.
  - `currentWorkerTime` string, google-datetime — The current timestamp at the worker.
  - `workerId` string — Identifies the worker leasing work -- typically the ID of the virtual machine running the worker.
  - `workerCapabilities` string[] — Worker capabilities. WorkItems might be limited to workers with specific capabilities.
  - `requestedLeaseDuration` string, google-duration — The initial lease period.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/dataflow.md) · [All operations](https://skmtc.net/google/apis/dataflow/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/dataflow/versions/f065de7a0dba/schema)
