> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 列出任务的干预记录

> 返回某训练任务的干预审计历史，包含手动与自动触发记录。

列出你拥有的某任务上记录的全部干预。每条记录包含动作、触发来源（`manual` / `auto`）、可选规则 ID、状态（`pending` / `applied` / `failed`）以及参数快照。

## 方法与路径

```http theme={null}
GET /v1/jobs/:id/interventions
```

## 认证

```http theme={null}
Authorization: Bearer <jwt-or-api-key>
```

## 路径参数

<ParamField path="id" type="string" required>
  任务标识符。
</ParamField>

## 响应

标准 PIN 信封，`data.items` 为干预对象数组：

<ResponseField name="intervention_id" type="string">
  干预标识符。
</ResponseField>

<ResponseField name="job_id" type="string">
  所属任务。
</ResponseField>

<ResponseField name="action" type="string">
  `stop` 或 `update_hyperparams`。
</ResponseField>

<ResponseField name="trigger" type="string">
  `manual` 或 `auto`。
</ResponseField>

<ResponseField name="rule_id" type="string">
  自动触发时对应的自动干预规则 ID。
</ResponseField>

<ResponseField name="reason" type="string">
  人类可读原因。
</ResponseField>

<ResponseField name="params_before" type="object">
  干预前的超参数。
</ResponseField>

<ResponseField name="params_after" type="object">
  干预后的超参数。
</ResponseField>

<ResponseField name="status" type="string">
  `pending`、`applied` 或 `failed`。
</ResponseField>

<ResponseField name="error" type="string">
  状态为 `failed` 时的错误详情。
</ResponseField>

<ResponseField name="created_at" type="string">
  创建时间戳。
</ResponseField>

## 示例

```bash theme={null}
curl -s http://localhost:8001/v1/jobs/jb_abc123def456/interventions \
  -H "Authorization: Bearer $PIN_API_TOKEN"
```

```json theme={null}
{
  "code": 0,
  "data": {
    "items": [
      {
        "intervention_id": "iv_01",
        "job_id": "jb_abc123def456",
        "action": "stop",
        "trigger": "manual",
        "status": "pending",
        "created_at": "2025-01-15T10:00:00Z"
      }
    ]
  },
  "message": ""
}
```
