- [HTTP request](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.jobs/snapshot#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.jobs/snapshot#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.jobs/snapshot#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.jobs/snapshot#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.jobs/snapshot#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.jobs/snapshot#body.aspect)
- [Try it!](https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.jobs/snapshot#try-it)

Snapshot the state of a streaming job.

### IAM Permissions

Requires the `dataflow.jobs.snapshot` permission on the job.

### HTTP request

Choose an endpoint:
global   
`POST https://dataflow.googleapis.com/v1b3/projects/{projectId}/jobs/{jobId}:snapshot`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `projectId` | `string` The project which owns the job to be snapshotted. |
| `jobId` | `string` The job to be snapshotted. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "ttl": string, "location": string, "snapshotSources": boolean, "description": string } ``` |

| Fields ||
|---|---|
| `ttl` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` TTL for the snapshot. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `location` | `string` The location that contains this job. |
| `snapshotSources` | `boolean` If true, perform snapshots for sources which support this. |
| `description` | `string` User specified description of the snapshot. Maybe empty. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/dataflow/docs/reference/rest/v1b3/Snapshot`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/compute`
- `
  https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).