PATCH管理接口

更新公告

编辑指定公告的标题、内容、置顶状态与发布时间。

URL

/api/v1/admin/projects/{projectKey}/announcements/{id}

鉴权方式

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

请求参数

Path 参数

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

Header 参数

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

请求体

{
  "title": "系统维护通知(延期)",
  "content": "维护时间调整为下周六 02:00-04:00。",
  "is_pinned": false
}

响应示例

200 响应

{
  "id": "ann-001",
  "title": "系统维护通知",
  "content": "平台将于本周六 02:00-04:00 停机维护。",
  "is_pinned": true,
  "is_hidden": false,
  "platforms": [
    "windows",
    "web"
  ],
  "author": "运维团队",
  "min_comparable_version": "2.0.0",
  "max_comparable_version": null,
  "locale": null,
  "published_at": 1760000000,
  "created_at": 1760000000,
  "updated_at": 1760000000
}
PATCH

Try It Out

请求 URL 预览

/api/v1/admin/projects/verhub/announcements/ver-001