- [HTTP request](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs/list#body.request_body)
- [Response body](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs/list#body.ListJobsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs/list#body.aspect)
- [JobStateMatcher](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs/list#JobStateMatcher)
- [Try it!](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs/list#try-it)

Lists regions/{region}/jobs in a project.

### HTTP request

`GET https://dataproc.googleapis.com/v1/projects/{projectId}/regions/{region}/jobs`

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

### Path parameters

| Parameters ||
|---|---|
| `projectId` | `string` Required. The ID of the Google Cloud Platform project that the job belongs to. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `projectId`: - `dataproc.jobs.list` |
| `region` | `string` Required. The Dataproc region in which to handle the request. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. The number of results to return in each response. |
| `pageToken` | `string` Optional. The page token, returned by a previous call, to request the next page of results. |
| `clusterName` | `string` Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster. |
| `jobStateMatcher` | ``enum (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs/list#JobStateMatcher`)`` Optional. Specifies enumerated categories of jobs to list. (default = match ALL jobs). If `filter` is provided, `jobStateMatcher` will be ignored. |
| `filter` | `string` Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax: \[field = value\] AND \[field \[= value\]\] ... where **field** is `status.state` or `insertTime`, or `labels.[KEY]`, and `[KEY]` is a label key. **value** can be `*` to match all values. `status.state` can be either `ACTIVE` or `NON_ACTIVE`. Allows `insertTime` to be a timestamp in RFC 3339 format in double quotes, such as `2025-01-01T00:00:00Z`. Only the logical `AND` operator is supported; space-separated items are treated as having an implicit `AND` operator. Example filter: status.state = ACTIVE AND labels.env = staging AND labels.starred = \* AND insertTime \<= "2025-01-01T00:00:00Z" |

### Request body

The request body must be empty.

### Response body

A list of jobs in a project.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "jobs": [ { object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs#Job`) } ], "nextPageToken": string, "unreachable": [ string ] } ``` |

| Fields ||
|---|---|
| `jobs[]` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.jobs#Job`)`` Output only. Jobs list. |
| `nextPageToken` | `string` Optional. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the `pageToken` in a subsequent `ListJobsRequest`. |
| `unreachable[]` | `string` Output only. List of jobs with `https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/ClusterConfig#EncryptionConfig.FIELDS.kms_key`-encrypted parameters that could not be decrypted. A response to a `jobs.get` request may indicate the reason for the decryption failure for a specific job. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/dataproc`
- `
  https://www.googleapis.com/auth/dataproc.read-only`

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

## JobStateMatcher

A matcher that specifies categories of job states.

| Enums ||
|---|---|
| `ALL` | Match all jobs, regardless of state. |
| `ACTIVE` | Only match jobs in non-terminal states: PENDING, RUNNING, or CANCEL_PENDING. |
| `NON_ACTIVE` | Only match jobs in terminal states: CANCELLED, DONE, or ERROR. |