POST管理接口

重新生成 GitHub Release Webhook Secret

生成一个新的随机 secret 并覆盖原值,完整 secret 仅在本次响应中返回一次。 旧 secret 立即失效,需要同步更新 GitHub 仓库上的 webhook 配置。

URL

/api/v1/admin/projects/{projectKey}/github-webhook/regenerate

鉴权方式

需要管理员 JWT 或 API Key,二者等价(Authorization: Bearer <token>)

请求参数

Path 参数

名称类型必填说明
projectKeystring项目主键 project_key(大小写不敏感)

Header 参数

名称类型必填说明
AuthorizationstringBearer <管理员 JWT 或 API Key>

该接口无需请求体。

响应示例

200 响应

{
  "enabled": true,
  "payload_path": "/api/v1/webhooks/github/verhub",
  "content_type": "application/json",
  "secret_hint": "7ba3f9",
  "secret_length": 54,
  "secret_updated_at": 1760000000,
  "secret": "whsec_5b1c9e0f8d2a47b6c3e18f04a7d95c2be6134af80d5e7cb9"
}
POST

Try It Out

请求 URL 预览

/api/v1/admin/projects/verhub/github-webhook/regenerate