- [HTTP request](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#body.request_body)
- [Response body](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#body.SearchBackgroundJobsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#body.aspect_1)
- [BackgroundJobLogEntry](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#BackgroundJobLogEntry)
  - [JSON representation](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#BackgroundJobLogEntry.SCHEMA_REPRESENTATION)
- [BackgroundJobType](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#BackgroundJobType)
- [JobCompletionState](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#JobCompletionState)
- [SeedJobDetails](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#SeedJobDetails)
  - [JSON representation](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#SeedJobDetails.SCHEMA_REPRESENTATION)
- [ImportRulesJobDetails](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ImportRulesJobDetails)
  - [JSON representation](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ImportRulesJobDetails.SCHEMA_REPRESENTATION)
- [ConvertJobDetails](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ConvertJobDetails)
  - [JSON representation](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ConvertJobDetails.SCHEMA_REPRESENTATION)
- [ApplyJobDetails](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ApplyJobDetails)
  - [JSON representation](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ApplyJobDetails.SCHEMA_REPRESENTATION)
- [Examples](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#examples)
- [Try it!](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#try-it)

Searches/lists the background jobs for a specific conversion workspace.

The background jobs are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are a way to expose the data plane jobs log.

### HTTP request

Choose a location:
<button value="global" default="">global</button> <button value="africa-south1">africa-south1</button> <button value="asia-east1">asia-east1</button> <button value="asia-east2">asia-east2</button> <button value="asia-northeast1">asia-northeast1</button> <button value="asia-northeast2">asia-northeast2</button> <button value="asia-northeast3">asia-northeast3</button> <button value="asia-south1">asia-south1</button> <button value="asia-south2">asia-south2</button> <button value="asia-southeast1">asia-southeast1</button> <button value="asia-southeast2">asia-southeast2</button> <button value="asia-southeast3">asia-southeast3</button> <button value="australia-southeast1">australia-southeast1</button> <button value="australia-southeast2">australia-southeast2</button> <button value="europe-central2">europe-central2</button> <button value="europe-north1">europe-north1</button> <button value="europe-north2">europe-north2</button> <button value="europe-southwest1">europe-southwest1</button> <button value="europe-west1">europe-west1</button> <button value="europe-west10">europe-west10</button> <button value="europe-west12">europe-west12</button> <button value="europe-west15">europe-west15</button> <button value="europe-west2">europe-west2</button> <button value="europe-west3">europe-west3</button> <button value="europe-west4">europe-west4</button> <button value="europe-west6">europe-west6</button> <button value="europe-west8">europe-west8</button> <button value="europe-west9">europe-west9</button> <button value="me-central1">me-central1</button> <button value="me-central2">me-central2</button> <button value="me-west1">me-west1</button> <button value="northamerica-northeast1">northamerica-northeast1</button> <button value="northamerica-northeast2">northamerica-northeast2</button> <button value="northamerica-south1">northamerica-south1</button> <button value="southamerica-east1">southamerica-east1</button> <button value="southamerica-west1">southamerica-west1</button> <button value="us-central1">us-central1</button> <button value="us-central2">us-central2</button> <button value="us-east1">us-east1</button> <button value="us-east4">us-east4</button> <button value="us-east5">us-east5</button> <button value="us-east7">us-east7</button> <button value="us-south1">us-south1</button> <button value="us-west1">us-west1</button> <button value="us-west2">us-west2</button> <button value="us-west3">us-west3</button> <button value="us-west4">us-west4</button> <button value="us-west8">us-west8</button>   
`GET https://datamigration.googleapis.com/v1/{conversionWorkspace}:searchBackgroundJobs`

<br />

### Path parameters

| Parameters ||
|---|---|
| `conversionWorkspace` | `string` Required. Name of the conversion workspace resource whose jobs are listed, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversionWorkspace}. |

### Query parameters

| Parameters ||
|---|---|
| `returnMostRecentPerJobType` | `boolean` Optional. Whether or not to return just the most recent job per job type, |
| `maxSize` | `integer` Optional. The maximum number of jobs to return. The service may return fewer than this value. If unspecified, at most 100 jobs are returned. The maximum value is 100; values above 100 are coerced to 100. |
| `completedUntilTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. If provided, only returns jobs that completed until (not including) the given timestamp. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

### Request body

The request body must be empty.

### Response body

Response message for 'conversionWorkspaces.searchBackgroundJobs' request.

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

| JSON representation |
|---|
| ``` { "jobs": [ { object (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#BackgroundJobLogEntry`) } ] } ``` |

| Fields ||
|---|---|
| `jobs[]` | ``object (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#BackgroundJobLogEntry`)`` The list of conversion workspace mapping rules. |

### Authorization scopes

Requires one of the following OAuth scopes:

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

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

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `conversionWorkspace` resource:

- `datamigration.conversionworkspaces.get`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## BackgroundJobLogEntry

Execution log of a background job.

| JSON representation |
|---|
| ``` { "id": string, "jobType": enum (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#BackgroundJobType`), "startTime": string, "finishTime": string, "completionState": enum (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#JobCompletionState`), "completionComment": string, "requestAutocommit": boolean, // Union field `job_details` can be only one of the following: "seedJobDetails": { object (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#SeedJobDetails`) }, "importRulesJobDetails": { object (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ImportRulesJobDetails`) }, "convertJobDetails": { object (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ConvertJobDetails`) }, "applyJobDetails": { object (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ApplyJobDetails`) } // End of list of possible types for union field `job_details`. } ``` |

| Fields ||
|---|---|
| `id` | `string` The background job log entry ID. |
| `jobType` | ``enum (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#BackgroundJobType`)`` The type of job that was executed. |
| `startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` The timestamp when the background job was started. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `finishTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` The timestamp when the background job was finished. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `completionState` | ``enum (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#JobCompletionState`)`` Output only. Job completion state, i.e. the final state after the job completed. |
| `completionComment` | `string` Output only. Job completion comment, such as how many entities were seeded, how many warnings were found during conversion, and similar information. |
| `requestAutocommit` | `boolean` Output only. Whether the client requested the conversion workspace to be committed after a successful completion of the job. |
| Union field `job_details`. `job_details` can be only one of the following: ||
| `seedJobDetails` | ``object (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#SeedJobDetails`)`` Output only. Seed job details. |
| `importRulesJobDetails` | ``object (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ImportRulesJobDetails`)`` Output only. Import rules job details. |
| `convertJobDetails` | ``object (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ConvertJobDetails`)`` Output only. Convert job details. |
| `applyJobDetails` | ``object (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.conversionWorkspaces/searchBackgroundJobs#ApplyJobDetails`)`` Output only. Apply job details. |

## BackgroundJobType

The types of jobs that can be executed in the background.

| Enums ||
|---|---|
| `BACKGROUND_JOB_TYPE_UNSPECIFIED` | Unspecified background job type. |
| `BACKGROUND_JOB_TYPE_SOURCE_SEED` | Job to seed from the source database. |
| `BACKGROUND_JOB_TYPE_CONVERT` | Job to convert the source database into a draft of the destination database. |
| `BACKGROUND_JOB_TYPE_APPLY_DESTINATION` | Job to apply the draft tree onto the destination. |
| `BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE` | Job to import and convert mapping rules from an external source such as an ora2pg config file. |

## JobCompletionState

Final state after a job completes.

| Enums ||
|---|---|
| `JOB_COMPLETION_STATE_UNSPECIFIED` | The status is not specified. This state is used when job is not yet finished. |
| `SUCCEEDED` | Success. |
| `FAILED` | Error. |

## SeedJobDetails

Details regarding a Seed background job.

| JSON representation |
|---|
| ``` { "connectionProfile": string } ``` |

| Fields ||
|---|---|
| `connectionProfile` | `string` Output only. The connection profile which was used for the seed job. |

## ImportRulesJobDetails

Details regarding an Import Rules background job.

| JSON representation |
|---|
| ``` { "files": [ string ], "fileFormat": enum (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/ImportRulesFileFormat`) } ``` |

| Fields ||
|---|---|
| `files[]` | `string` Output only. File names used for the import rules job. |
| `fileFormat` | ``enum (`https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/ImportRulesFileFormat`)`` Output only. The requested file format. |

## ConvertJobDetails

Details regarding a Convert background job.

| JSON representation |
|---|
| ``` { "filter": string } ``` |

| Fields ||
|---|---|
| `filter` | `string` Output only. AIP-160 based filter used to specify the entities to convert |

## ApplyJobDetails

Details regarding an Apply background job.

| JSON representation |
|---|
| ``` { "connectionProfile": string, "filter": string } ``` |

| Fields ||
|---|---|
| `connectionProfile` | `string` Output only. The connection profile which was used for the apply job. |
| `filter` | `string` Output only. AIP-160 based filter used to specify the entities to apply |