# Repair

Launch stage: GA

`POST /api/2.2/jobs/runs/repair`

Re-run one or more tasks. Tasks are re-run as part of the original job run.
 They use the current job and task settings, and can be viewed in the history for the
 original job run.

API scopes: jobs

## Request body

- `run_id` (int64, optional)
  The job run ID of the run to repair. The run must not be in progress.
  Example: `455644833`
- `latest_repair_id` (int64, optional)
  The ID of the latest repair. This parameter is not required when repairing a run for the first time, but must be provided on subsequent requests to repair the same run.
  Example: `734650698524280`
- `rerun_tasks` (array of string, optional)
  The task keys of the task runs to repair.
- `job_parameters` (object, optional)
  Job-level parameters used in the run. for example `"param": "overriding_val"`
- `rerun_all_failed_tasks` (boolean, optional)
  If true, repair all failed tasks. Only one of `rerun_tasks` or `rerun_all_failed_tasks` can be used.
  Default: `false`
- `rerun_dependent_tasks` (boolean, optional)
  If true, repair all tasks that depend on the tasks in `rerun_tasks`, even if they were previously successful. Can be also used in combination with `rerun_all_failed_tasks`.
  Default: `false`
- `performance_target` (string, optional)
  The performance mode on a serverless job. The performance target determines the level of compute performance or cost-efficiency for the run. This field overrides the performance target defined on the job level.
  
   * `STANDARD`: Enables cost-efficient execution of serverless workloads.
   * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times through rapid scaling and optimized cluster performance.
  Possible values: `PERFORMANCE_TARGET_UNSPECIFIED`, `PERFORMANCE_OPTIMIZED`, `STANDARD`
- `pipeline_params` (object, optional)
  Controls whether the pipeline should perform a full refresh
  - `full_refresh` (boolean, optional)
    If true, triggers a full refresh on the spark declarative pipeline.
    Default: `false`
  - `refresh_selection` (array of string, optional, Beta)
    A list of tables to update without fullRefresh.
  - `full_refresh_selection` (array of string, optional, Beta)
    A list of tables to update with fullRefresh.
  - `reset_checkpoint_selection` (array of string, optional, Beta)
    A list of streaming flows to reset checkpoints without clearing data.
  - `refresh_flow_selection` (array of string, optional, Beta)
    Flow names to selectively refresh. These are unioned with other selective refresh
     options (refresh_selection, full_refresh_selection) to determine the final set of flows to refresh.

## Returns

- `repair_id` (int64, optional)
  The ID of the repair. Must be provided in subsequent repairs using the `latest_repair_id` field to ensure sequential repairs.
  Example: `734650698524280`

## Response

```json
{
  "repair_id": 734650698524280
}
```

