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

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

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

## Request

- Base URL: `https://dataflow.googleapis.com`
- URL: `https://dataflow.googleapis.com/v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease`
- 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/compute`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/compute`
- TypeScript: <https://skmtc.dev/google/apis/dataflow/docs/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease/post.ts> (a function with typed inputs; its response is checked against the schema)

Leases a dataflow WorkItem to run.

## Path parameters

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

## Request body

- LeaseWorkItemRequest: Request to lease WorkItems.
  - `currentWorkerTime` string, google-datetime: The current timestamp at the worker.
  - `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.
  - `requestedLeaseDuration` string, google-duration: The initial lease period.
  - `unifiedWorkerRequest` object: Untranslated bag-of-bytes WorkRequest from UnifiedWorker.
  - `workItemTypes` string[]: Filter for WorkItem type.
  - `workerCapabilities` string[]: Worker capabilities. WorkItems might be limited to workers with specific capabilities.
  - `workerId` string: Identifies the worker leasing work -- typically the ID of the virtual machine running the worker.

## Response `200`

Successful response

- LeaseWorkItemResponse: Response to a request to lease WorkItems.
  - `unifiedWorkerResponse` object: Untranslated bag-of-bytes WorkResponse for UnifiedWorker.
  - `workItems` WorkItem[]: A list of the leased WorkItems.
    - `configuration` string: Work item-specific configuration as an opaque blob.
    - `id` string, int64: Identifies this WorkItem.
    - `initialReportIndex` string, int64: The initial index to use when reporting the status of the WorkItem.
    - `jobId` string: Identifies the workflow job this WorkItem belongs to.
    - `leaseExpireTime` string, google-datetime: Time when the lease on this Work will expire.
    - `mapTask` MapTask: MapTask consists of an ordered set of instructions, each of which describes one particular low-level operation for the worker to perform in order to accomplish the MapTask's WorkItem. Each instruction must appear in the list before any instructions which depends on its output.
      - `counterPrefix` string: Counter prefix that can be used to prefix counters. Not currently used in Dataflow.
      - `instructions` ParallelInstruction[]: The instructions in the MapTask.
        - `flatten` FlattenInstruction: An instruction that copies its inputs (zero or more) to its (single) output.
          - `inputs` InstructionInput[]: Describes the inputs to the flatten instruction.
            - `outputNum` integer: The output index (origin zero) within the producer.
            - `producerInstructionIndex` integer: The index (origin zero) of the parallel instruction that produces the output to be consumed by this input. This index is relative to the list of instructions in this input's instruction's containing MapTask.
        - `name` string: User-provided name of this operation.
        - `originalName` string: System-defined name for the operation in the original workflow graph.
        - `outputs` InstructionOutput[]: Describes the outputs of the instruction.
          - `codec` object: The codec to use to encode data being written via this output.
          - `name` string: The user-provided name of this output.
          - `onlyCountKeyBytes` boolean: For system-generated byte and mean byte metrics, certain instructions should only report the key size.
          - `onlyCountValueBytes` boolean: For system-generated byte and mean byte metrics, certain instructions should only report the value size.
          - `originalName` string: System-defined name for this output in the original workflow graph. Outputs that do not contribute to an original instruction do not set this.
          - `systemName` string: System-defined name of this output. Unique across the workflow.
        - `parDo` ParDoInstruction: An instruction that does a ParDo operation. Takes one main input and zero or more side inputs, and produces zero or more outputs. Runs user code.
          - `input` InstructionInput: An input of an instruction, as a reference to an output of a producer instruction.
            - `outputNum` integer: The output index (origin zero) within the producer.
            - `producerInstructionIndex` integer: The index (origin zero) of the parallel instruction that produces the output to be consumed by this input. This index is relative to the list of instructions in this input's instruction's containing MapTask.
          - `multiOutputInfos` MultiOutputInfo[]: Information about each of the outputs, if user_fn is a MultiDoFn.
            - `tag` string: The id of the tag the user code will emit to this output by; this should correspond to the tag of some SideInputInfo.
          - `numOutputs` integer: The number of outputs.
          - `sideInputs` SideInputInfo[]: Zero or more side inputs.
            - `kind` object: How to interpret the source element(s) as a side input value.
            - `sources` Source[]: The source(s) to read element(s) from to get the value of this side input. If more than one source, then the elements are taken from the sources, in the specified order if order matters. At least one source is required.
              - …
            - `tag` string: The id of the tag the user code will access this side input by; this should correspond to the tag of some MultiOutputInfo.
          - `userFn` object: The user function to invoke.
        - `partialGroupByKey` PartialGroupByKeyInstruction: An instruction that does a partial group-by-key. One input and one output.
          - `input` InstructionInput: An input of an instruction, as a reference to an output of a producer instruction.
            - `outputNum` integer: The output index (origin zero) within the producer.
            - `producerInstructionIndex` integer: The index (origin zero) of the parallel instruction that produces the output to be consumed by this input. This index is relative to the list of instructions in this input's instruction's containing MapTask.
          - `inputElementCodec` object: The codec to use for interpreting an element in the input PTable.
          - `originalCombineValuesInputStoreName` string: If this instruction includes a combining function this is the name of the intermediate store between the GBK and the CombineValues.
          - `originalCombineValuesStepName` string: If this instruction includes a combining function, this is the name of the CombineValues instruction lifted into this instruction.
          - `sideInputs` SideInputInfo[]: Zero or more side inputs.
            - `kind` object: How to interpret the source element(s) as a side input value.
            - `sources` Source[]: The source(s) to read element(s) from to get the value of this side input. If more than one source, then the elements are taken from the sources, in the specified order if order matters. At least one source is required.
              - …
            - `tag` string: The id of the tag the user code will access this side input by; this should correspond to the tag of some MultiOutputInfo.
          - `valueCombiningFn` object: The value combining function to invoke.
        - `read` ReadInstruction: An instruction that reads records. Takes no inputs, produces one output.
          - `source` Source: A source that records can be read and decoded from.
            - `baseSpecs` object[]: While splitting, sources may specify the produced bundles as differences against another source, in order to save backend-side memory and allow bigger jobs. For details, see SourceSplitRequest. To support this use case, the full set of parameters of the source is logically obtained by taking the latest explicitly specified value of each parameter in the order: base_specs (later items win), spec (overrides anything in base_specs).
              - …
            - `codec` object: The codec to use to decode data read from the source.
            - `doesNotNeedSplitting` boolean: Setting this value to true hints to the framework that the source doesn't need splitting, and using SourceSplitRequest on it would yield SOURCE_SPLIT_OUTCOME_USE_CURRENT. E.g. a file splitter may set this to true when splitting a single file into a set of byte ranges of appropriate size, and set this to false when splitting a filepattern into individual files. However, for efficiency, a file splitter may decide to produce file subranges directly from the filepattern to avoid a splitting round-trip. See SourceSplitRequest for an overview of the splitting process. This field is meaningful only in the Source objects populated by the user (e.g. when filling in a DerivedSource). Source objects supplied by the framework to the user don't have this field populated.
            - `metadata` SourceMetadata: Metadata about a Source useful for automatically optimizing and tuning the pipeline, etc.
              - …
            - `spec` object: The source to read from, plus its parameters.
        - `systemName` string: System-defined name of this operation. Unique across the workflow.
        - `write` WriteInstruction: An instruction that writes records. Takes one input, produces no outputs.
          - `input` InstructionInput: An input of an instruction, as a reference to an output of a producer instruction.
            - `outputNum` integer: The output index (origin zero) within the producer.
            - `producerInstructionIndex` integer: The index (origin zero) of the parallel instruction that produces the output to be consumed by this input. This index is relative to the list of instructions in this input's instruction's containing MapTask.
          - `sink` Sink: A sink that records can be encoded and written to.
            - `codec` object: The codec to use to encode data written to the sink.
            - `spec` object: The sink to write to, plus its parameters.
      - `stageName` string: System-defined name of the stage containing this MapTask. Unique across the workflow.
      - `systemName` string: System-defined name of this MapTask. Unique across the workflow.
    - `packages` Package[]: Any required packages that need to be fetched in order to execute this WorkItem.
      - `location` string: The resource to read the package from. The supported resource type is: Google Cloud Storage: storage.googleapis.com/{bucket} bucket.storage.googleapis.com/
      - `name` string: The name of the package.
      - `sha256` string: Optional. The hex-encoded SHA256 checksum of the package. If the checksum is provided, the worker will verify the checksum of the package before using it. If the checksum does not match, the worker will fail to start.
    - `projectId` string: Identifies the cloud project this WorkItem belongs to.
    - `reportStatusInterval` string, google-duration: Recommended reporting interval.
    - `seqMapTask` SeqMapTask: Describes a particular function to invoke.
      - `inputs` SideInputInfo[]: Information about each of the inputs.
        - `kind` object: How to interpret the source element(s) as a side input value.
        - `sources` Source[]: The source(s) to read element(s) from to get the value of this side input. If more than one source, then the elements are taken from the sources, in the specified order if order matters. At least one source is required.
          - `baseSpecs` object[]: While splitting, sources may specify the produced bundles as differences against another source, in order to save backend-side memory and allow bigger jobs. For details, see SourceSplitRequest. To support this use case, the full set of parameters of the source is logically obtained by taking the latest explicitly specified value of each parameter in the order: base_specs (later items win), spec (overrides anything in base_specs).
          - `codec` object: The codec to use to decode data read from the source.
          - `doesNotNeedSplitting` boolean: Setting this value to true hints to the framework that the source doesn't need splitting, and using SourceSplitRequest on it would yield SOURCE_SPLIT_OUTCOME_USE_CURRENT. E.g. a file splitter may set this to true when splitting a single file into a set of byte ranges of appropriate size, and set this to false when splitting a filepattern into individual files. However, for efficiency, a file splitter may decide to produce file subranges directly from the filepattern to avoid a splitting round-trip. See SourceSplitRequest for an overview of the splitting process. This field is meaningful only in the Source objects populated by the user (e.g. when filling in a DerivedSource). Source objects supplied by the framework to the user don't have this field populated.
          - `metadata` SourceMetadata: Metadata about a Source useful for automatically optimizing and tuning the pipeline, etc.
            - `estimatedSizeBytes` string, int64: An estimate of the total size (in bytes) of the data that would be read from this source. This estimate is in terms of external storage size, before any decompression or other processing done by the reader.
            - `infinite` boolean: Specifies that the size of this source is known to be infinite (this is a streaming source).
            - `producesSortedKeys` boolean: Whether this source is known to produce key/value pairs with the (encoded) keys in lexicographically sorted order.
          - `spec` object: The source to read from, plus its parameters.
        - `tag` string: The id of the tag the user code will access this side input by; this should correspond to the tag of some MultiOutputInfo.
      - `name` string: The user-provided name of the SeqDo operation.
      - `outputInfos` SeqMapTaskOutputInfo[]: Information about each of the outputs.
        - `sink` Sink: A sink that records can be encoded and written to.
          - `codec` object: The codec to use to encode data written to the sink.
          - `spec` object: The sink to write to, plus its parameters.
        - `tag` string: The id of the TupleTag the user code will tag the output value by.
      - `stageName` string: System-defined name of the stage containing the SeqDo operation. Unique across the workflow.
      - `systemName` string: System-defined name of the SeqDo operation. Unique across the workflow.
      - `userFn` object: The user function to invoke.
    - `shellTask` ShellTask: A task which consists of a shell command for the worker to execute.
      - `command` string: The shell command to run.
      - `exitCode` integer: Exit code for the task.
    - `sourceOperationTask` SourceOperationRequest: A work item that represents the different operations that can be performed on a user-defined Source specification.
      - `getMetadata` SourceGetMetadataRequest: A request to compute the SourceMetadata of a Source.
        - `source` Source: A source that records can be read and decoded from.
          - `baseSpecs` object[]: While splitting, sources may specify the produced bundles as differences against another source, in order to save backend-side memory and allow bigger jobs. For details, see SourceSplitRequest. To support this use case, the full set of parameters of the source is logically obtained by taking the latest explicitly specified value of each parameter in the order: base_specs (later items win), spec (overrides anything in base_specs).
          - `codec` object: The codec to use to decode data read from the source.
          - `doesNotNeedSplitting` boolean: Setting this value to true hints to the framework that the source doesn't need splitting, and using SourceSplitRequest on it would yield SOURCE_SPLIT_OUTCOME_USE_CURRENT. E.g. a file splitter may set this to true when splitting a single file into a set of byte ranges of appropriate size, and set this to false when splitting a filepattern into individual files. However, for efficiency, a file splitter may decide to produce file subranges directly from the filepattern to avoid a splitting round-trip. See SourceSplitRequest for an overview of the splitting process. This field is meaningful only in the Source objects populated by the user (e.g. when filling in a DerivedSource). Source objects supplied by the framework to the user don't have this field populated.
          - `metadata` SourceMetadata: Metadata about a Source useful for automatically optimizing and tuning the pipeline, etc.
            - `estimatedSizeBytes` string, int64: An estimate of the total size (in bytes) of the data that would be read from this source. This estimate is in terms of external storage size, before any decompression or other processing done by the reader.
            - `infinite` boolean: Specifies that the size of this source is known to be infinite (this is a streaming source).
            - `producesSortedKeys` boolean: Whether this source is known to produce key/value pairs with the (encoded) keys in lexicographically sorted order.
          - `spec` object: The source to read from, plus its parameters.
      - `name` string: User-provided name of the Read instruction for this source.
      - `originalName` string: System-defined name for the Read instruction for this source in the original workflow graph.
      - `split` SourceSplitRequest: Represents the operation to split a high-level Source specification into bundles (parts for parallel processing). At a high level, splitting of a source into bundles happens as follows: SourceSplitRequest is applied to the source. If it returns SOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and the source is used "as is". Otherwise, splitting is applied recursively to each produced DerivedSource. As an optimization, for any Source, if its does_not_need_splitting is true, the framework assumes that splitting this source would return SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a SourceSplitRequest. This applies both to the initial source being split and to bundles produced from it.
        - `options` SourceSplitOptions: Hints for splitting a Source into bundles (parts for parallel processing) using SourceSplitRequest.
          - `desiredBundleSizeBytes` string, int64: The source should be split into a set of bundles where the estimated size of each is approximately this many bytes.
          - `desiredShardSizeBytes` string, int64: DEPRECATED in favor of desired_bundle_size_bytes.
        - `source` Source: A source that records can be read and decoded from.
          - `baseSpecs` object[]: While splitting, sources may specify the produced bundles as differences against another source, in order to save backend-side memory and allow bigger jobs. For details, see SourceSplitRequest. To support this use case, the full set of parameters of the source is logically obtained by taking the latest explicitly specified value of each parameter in the order: base_specs (later items win), spec (overrides anything in base_specs).
          - `codec` object: The codec to use to decode data read from the source.
          - `doesNotNeedSplitting` boolean: Setting this value to true hints to the framework that the source doesn't need splitting, and using SourceSplitRequest on it would yield SOURCE_SPLIT_OUTCOME_USE_CURRENT. E.g. a file splitter may set this to true when splitting a single file into a set of byte ranges of appropriate size, and set this to false when splitting a filepattern into individual files. However, for efficiency, a file splitter may decide to produce file subranges directly from the filepattern to avoid a splitting round-trip. See SourceSplitRequest for an overview of the splitting process. This field is meaningful only in the Source objects populated by the user (e.g. when filling in a DerivedSource). Source objects supplied by the framework to the user don't have this field populated.
          - `metadata` SourceMetadata: Metadata about a Source useful for automatically optimizing and tuning the pipeline, etc.
            - `estimatedSizeBytes` string, int64: An estimate of the total size (in bytes) of the data that would be read from this source. This estimate is in terms of external storage size, before any decompression or other processing done by the reader.
            - `infinite` boolean: Specifies that the size of this source is known to be infinite (this is a streaming source).
            - `producesSortedKeys` boolean: Whether this source is known to produce key/value pairs with the (encoded) keys in lexicographically sorted order.
          - `spec` object: The source to read from, plus its parameters.
      - `stageName` string: System-defined name of the stage containing the source operation. Unique across the workflow.
      - `systemName` string: System-defined name of the Read instruction for this source. Unique across the workflow.
    - `streamingComputationTask` StreamingComputationTask: A task which describes what action should be performed for the specified streaming computation ranges.
      - `computationRanges` StreamingComputationRanges[]: Contains ranges of a streaming computation this task should apply to.
        - `computationId` string: The ID of the computation.
        - `rangeAssignments` KeyRangeDataDiskAssignment[]: Data disk assignments for ranges from this computation.
          - `dataDisk` string: The name of the data disk where data for this range is stored. This name is local to the Google Cloud Platform project and uniquely identifies the disk within that project, for example "myproject-1014-104817-4c2-harness-0-disk-1".
          - `end` string: The end (exclusive) of the key range.
          - `start` string: The start (inclusive) of the key range.
      - `dataDisks` MountedDataDisk[]: Describes the set of data disks this task should apply to.
        - `dataDisk` string: The name of the data disk. This name is local to the Google Cloud Platform project and uniquely identifies the disk within that project, for example "myproject-1014-104817-4c2-harness-0-disk-1".
      - `taskType` 'STREAMING_COMPUTATION_TASK_UNKNOWN' | 'STREAMING_COMPUTATION_TASK_STOP' | 'STREAMING_COMPUTATION_TASK_START': A type of streaming computation task.
    - `streamingConfigTask` StreamingConfigTask: A task that carries configuration information for streaming computations.
      - `commitStreamChunkSizeBytes` string, int64: Chunk size for commit streams from the harness to windmill.
      - `getDataStreamChunkSizeBytes` string, int64: Chunk size for get data streams from the harness to windmill.
      - `maxWorkItemCommitBytes` string, int64: Maximum size for work item commit supported windmill storage layer.
      - `operationalLimits` StreamingOperationalLimits: Operational limits imposed on streaming jobs by the backend.
        - `maxBagElementBytes` string, int64: The maximum size for an element in bag state.
        - `maxGlobalDataBytes` string, int64: The maximum size for an element in global data.
        - `maxKeyBytes` string, int64: The maximum size allowed for a key.
        - `maxProductionOutputBytes` string, int64: The maximum size for a single output element.
        - `maxSortedListElementBytes` string, int64: The maximum size for an element in sorted list state.
        - `maxSourceStateBytes` string, int64: The maximum size for a source state update.
        - `maxTagBytes` string, int64: The maximum size for a state tag.
        - `maxValueBytes` string, int64: The maximum size for a value state field.
      - `streamingComputationConfigs` StreamingComputationConfig[]: Set of computation configuration information.
        - `computationId` string: Unique identifier for this computation.
        - `instructions` ParallelInstruction[]: Instructions that comprise the computation.
          - `flatten` FlattenInstruction: An instruction that copies its inputs (zero or more) to its (single) output.
            - `inputs` InstructionInput[]: Describes the inputs to the flatten instruction.
              - …
          - `name` string: User-provided name of this operation.
          - `originalName` string: System-defined name for the operation in the original workflow graph.
          - `outputs` InstructionOutput[]: Describes the outputs of the instruction.
            - `codec` object: The codec to use to encode data being written via this output.
            - `name` string: The user-provided name of this output.
            - `onlyCountKeyBytes` boolean: For system-generated byte and mean byte metrics, certain instructions should only report the key size.
            - `onlyCountValueBytes` boolean: For system-generated byte and mean byte metrics, certain instructions should only report the value size.
            - `originalName` string: System-defined name for this output in the original workflow graph. Outputs that do not contribute to an original instruction do not set this.
            - `systemName` string: System-defined name of this output. Unique across the workflow.
          - `parDo` ParDoInstruction: An instruction that does a ParDo operation. Takes one main input and zero or more side inputs, and produces zero or more outputs. Runs user code.
            - `input` InstructionInput: An input of an instruction, as a reference to an output of a producer instruction.
              - …
            - `multiOutputInfos` MultiOutputInfo[]: Information about each of the outputs, if user_fn is a MultiDoFn.
              - …
            - `numOutputs` integer: The number of outputs.
            - `sideInputs` SideInputInfo[]: Zero or more side inputs.
              - …
            - `userFn` object: The user function to invoke.
          - `partialGroupByKey` PartialGroupByKeyInstruction: An instruction that does a partial group-by-key. One input and one output.
            - `input` InstructionInput: An input of an instruction, as a reference to an output of a producer instruction.
              - …
            - `inputElementCodec` object: The codec to use for interpreting an element in the input PTable.
            - `originalCombineValuesInputStoreName` string: If this instruction includes a combining function this is the name of the intermediate store between the GBK and the CombineValues.
            - `originalCombineValuesStepName` string: If this instruction includes a combining function, this is the name of the CombineValues instruction lifted into this instruction.
            - `sideInputs` SideInputInfo[]: Zero or more side inputs.
              - …
            - `valueCombiningFn` object: The value combining function to invoke.
          - `read` ReadInstruction: An instruction that reads records. Takes no inputs, produces one output.
            - `source` Source: A source that records can be read and decoded from.
              - …
          - `systemName` string: System-defined name of this operation. Unique across the workflow.
          - `write` WriteInstruction: An instruction that writes records. Takes one input, produces no outputs.
            - `input` InstructionInput: An input of an instruction, as a reference to an output of a producer instruction.
              - …
            - `sink` Sink: A sink that records can be encoded and written to.
              - …
        - `stageName` string: Stage name of this computation.
        - `systemName` string: System defined name for this computation.
        - `transformUserNameToStateFamily` object: Map from user name of stateful transforms in this stage to their state family.
      - `streamingEngineStateTagEncodingVersion` integer: Optional. The state tag encoding format version for streaming engine jobs.
      - `userStepToStateFamilyNameMap` object: Map from user step names to state families.
      - `userWorkerRunnerV1Settings` string, byte: Binary encoded proto to control runtime behavior of the java runner v1 user worker.
      - `userWorkerRunnerV2Settings` string, byte: Binary encoded proto to control runtime behavior of the runner v2 user worker.
      - `windmillServiceEndpoint` string: If present, the worker must use this endpoint to communicate with Windmill Service dispatchers, otherwise the worker must continue to use whatever endpoint it had been using.
      - `windmillServicePort` string, int64: If present, the worker must use this port to communicate with Windmill Service dispatchers. Only applicable when windmill_service_endpoint is specified.
    - `streamingSetupTask` StreamingSetupTask: A task which initializes part of a streaming Dataflow job.
      - `drain` boolean: The user has requested drain.
      - `receiveWorkPort` integer: The TCP port on which the worker should listen for messages from other streaming computation workers.
      - `snapshotConfig` StreamingApplianceSnapshotConfig: Streaming appliance snapshot configuration.
        - `importStateEndpoint` string: Indicates which endpoint is used to import appliance state.
        - `snapshotId` string: If set, indicates the snapshot id for the snapshot being performed.
      - `streamingComputationTopology` TopologyConfig: Global topology of the streaming Dataflow job, including all computations and their sharded locations.
        - `computations` ComputationTopology[]: The computations associated with a streaming Dataflow job.
          - `computationId` string: The ID of the computation.
          - `inputs` StreamLocation[]: The inputs to the computation.
            - `customSourceLocation` CustomSourceLocation: Identifies the location of a custom souce.
              - …
            - `pubsubLocation` PubsubLocation: Identifies a pubsub location to use for transferring data into or out of a streaming Dataflow job.
              - …
            - `sideInputLocation` StreamingSideInputLocation: Identifies the location of a streaming side input.
              - …
            - `streamingStageLocation` StreamingStageLocation: Identifies the location of a streaming computation stage, for stage-to-stage communication.
              - …
          - `keyRanges` KeyRangeLocation[]: The key ranges processed by the computation.
            - `dataDisk` string: The name of the data disk where data for this range is stored. This name is local to the Google Cloud Platform project and uniquely identifies the disk within that project, for example "myproject-1014-104817-4c2-harness-0-disk-1".
            - `deliveryEndpoint` string: The physical location of this range assignment to be used for streaming computation cross-worker message delivery.
            - `deprecatedPersistentDirectory` string: DEPRECATED. The location of the persistent state for this range, as a persistent directory in the worker local filesystem.
            - `end` string: The end (exclusive) of the key range.
            - `start` string: The start (inclusive) of the key range.
          - `outputs` StreamLocation[]: The outputs from the computation.
            - `customSourceLocation` CustomSourceLocation: Identifies the location of a custom souce.
              - …
            - `pubsubLocation` PubsubLocation: Identifies a pubsub location to use for transferring data into or out of a streaming Dataflow job.
              - …
            - `sideInputLocation` StreamingSideInputLocation: Identifies the location of a streaming side input.
              - …
            - `streamingStageLocation` StreamingStageLocation: Identifies the location of a streaming computation stage, for stage-to-stage communication.
              - …
          - `stateFamilies` StateFamilyConfig[]: The state family values.
            - `isRead` boolean: If true, this family corresponds to a read operation.
            - `stateFamily` string: The state family value.
          - `systemStageName` string: The system stage name.
        - `dataDiskAssignments` DataDiskAssignment[]: The disks assigned to a streaming Dataflow job.
          - `dataDisks` string[]: Mounted data disks. The order is important a data disk's 0-based index in this list defines which persistent directory the disk is mounted to, for example the list of { "myproject-1014-104817-4c2-harness-0-disk-0" }, { "myproject-1014-104817-4c2-harness-0-disk-1" }.
          - `vmInstance` string: VM instance name the data disks mounted to, for example "myproject-1014-104817-4c2-harness-0".
        - `forwardingKeyBits` integer: The size (in bits) of keys that will be assigned to source messages.
        - `persistentStateVersion` integer: Version number for persistent state.
        - `userStageToComputationNameMap` object: Maps user stage names to stable computation names.
      - `workerHarnessPort` integer: The TCP port used by the worker to communicate with the Dataflow worker harness.

## Changes

- **2026-10-21** `69a3fb1fef85`: 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/compute` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/compute` was removed from the endpoint's security scheme `Oauth2c`
- **2026-10-15** `e94d44227b2e`: 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/compute` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/compute` was removed from the endpoint's security scheme `Oauth2c`
- **2026-10-10** `9f491d01229e`: 2 breaking, 4 info
  - removed the request body
  - removed the media type `*/*` for the response with the status `200`
  - 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`
  - …2 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/google/apis/dataflow/changes/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease/post.md)

---

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