API 参考重试与死信
更新重试策略
PATCH /retries/policies/{id}
更新重试策略
调用 `PATCH /retries/policies/{id}`,更新重试策略。
https://api.edgecron.com/v1/retries/policies/{id}
需要认证
每个请求都需要携带 `X-Key-ID`、`X-Timestamp` 和 `X-Signature`。签名为 `timestamp + "\n" + payload` 的 HMAC-SHA256 小写十六进制结果。
参数
| 参数 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | integer | 是 | 资源 ID。 |
请求体
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
name | string | 否 | - |
max_attempts | integer (int32) | 否 | - |
backoff_type | fixed / exponential | 否 | 可选值:fixed, exponential。 |
initial_delay_sec | integer (int32) | 否 | - |
max_delay_sec | integer (int32) | 否 | - |
status | active / paused | 否 | 可选值:active, paused。 |
{
"name": "billing-webhook",
"max_attempts": 1,
"backoff_type": "fixed",
"initial_delay_sec": 1,
"max_delay_sec": 1,
"status": "active"
}响应
所有成功响应都使用 EdgeCron API 统一信封。
{
"code": 0,
"message": "success",
"request_id": "req_abc123",
"data": {
"id": 101,
"app_id": "app_123",
"name": "billing-webhook",
"max_attempts": 1,
"backoff_type": "fixed",
"initial_delay_sec": 1,
"max_delay_sec": 1,
"status": "string",
"created_at": "2026-07-01T12:00:00Z"
}
}结构
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | integer | 否 | 资源 ID。 |
app_id | string | 否 | 应用 ID。 |
name | string | 否 | - |
max_attempts | integer | 否 | - |
backoff_type | fixed / exponential / linear | 否 | 可选值:fixed, exponential, linear。 |
initial_delay_sec | integer | 否 | - |
max_delay_sec | integer | 否 | - |
status | string | 否 | 当前生命周期状态。 |
created_at | string (date-time) | 否 | 创建时间。 |