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

# 列出護欄執行記錄

> 追蹤護欄評估的只可追加審計日誌。

返回調用方有權查看的護欄評估只可追加審計日誌，按最新記錄優先排序。記錄會保留 90 天（由 BullMQ 保留任務強制執行）。

## 認證

需要攜帶具備 `billing` API 密鑰權限範圍的 Bearer 令牌。

## 查詢參數

<ParamField query="limit" type="integer">
  返回的行數。範圍 1–200，默認 50。
</ParamField>

<ParamField query="key_id" type="string">
  按單個 API 密鑰（UUID）篩選。
</ParamField>

<ParamField query="policy_id" type="string">
  按單個策略（UUID）篩選。
</ParamField>

<ParamField query="since" type="string">
  ISO 時間戳。僅返回嚴格晚於該時間創建的記錄。可用於追蹤日誌。
</ParamField>

## 請求示例

<CodeGroup>
  ```bash curl theme={null}
  # 單個策略最近 20 條評估記錄
  curl "https://www.hitheo.ai/api/v1/guardrail-executions?limit=20&policy_id=$POLICY_ID" \
    -H "Authorization: Bearer $THEO_API_KEY"

  # 追蹤某個時間點之後的所有評估記錄
  curl "https://www.hitheo.ai/api/v1/guardrail-executions?since=2026-01-15T18:00:00.000Z" \
    -H "Authorization: Bearer $THEO_API_KEY"
  ```

  ```typescript SDK theme={null}
  const recent = await theo.guardrails.executions.list({
    policyId,
    limit: 20,
  });

  // 長輪詢獲取新記錄
  const since = new Date(Date.now() - 60_000).toISOString();
  const newRows = await theo.guardrails.executions.list({ since });
  ```
</CodeGroup>

## 可見性

* **個人調用方**（無激活的組織）：僅能查看自己在個人策略下創建的記錄。
* **團隊調用方**：可查看激活組織所擁有策略下所有成員的記錄。可見性遵循的是*策略*，而非觸發該記錄的用戶。

## 響應

```json theme={null}
{
  "executions": [
    {
      "id": "exec_abc123",
      "user_id": "user_xyz",
      "key_id": "key_abc",
      "policy_id": "1f4f2c1a-...",
      "policy_name": "Compliance-strict",
      "guardrail_id": "pii_redactor",
      "phase": "input",
      "verdict": "redact",
      "matched_pattern": "email,phone",
      "redacted_count": 2,
      "latency_ms": 1,
      "created_at": "2026-01-15T18:24:11.123Z"
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.