资源权重事件 API

  • Tier: 基础版, 专业版, 旗舰版
  • Offering: JihuLab.com, 私有化部署

资源权重事件用于跟踪极狐GitLab 议题 的变化情况。利用这些事件可以跟踪设置了哪个权重、由谁设置以及何时发生。

议题#

列出项目议题权重事件#

获取单个议题的所有权重事件的列表。

plaintext
GET /projects/:id/issues/:issue_iid/resource_weight_events
属性类型必需描述
idinteger/string项目的 ID 或 URL 编码路径
issue_iidinteger议题的 IID

示例请求:

shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/resource_weight_events"

示例响应:

json
1[ 2 { 3 "id": 142, 4 "user": { 5 "id": 1, 6 "name": "Administrator", 7 "username": "root", 8 "state": "active", 9 "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", 10 "web_url": "http://gitlab.example.com/root" 11 }, 12 "created_at": "2018-08-20T13:38:20.077Z", 13 "issue_id": 253, 14 "weight": 3 15 }, 16 { 17 "id": 143, 18 "user": { 19 "id": 1, 20 "name": "Administrator", 21 "username": "root", 22 "state": "active", 23 "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", 24 "web_url": "http://gitlab.example.com/root" 25 }, 26 "created_at": "2018-08-21T14:38:20.077Z", 27 "issue_id": 253, 28 "weight": 2 29 } 30]

获取单个议题权重事件#

返回特定项目议题的单个权重事件。

plaintext
GET /projects/:id/issues/:issue_iid/resource_weight_events/:resource_weight_event_id

参数:

属性类型必需描述
idinteger/string项目的 ID 或 URL 编码路径
issue_iidinteger议题的 IID
resource_weight_event_idinteger权重事件的 ID

示例请求:

shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/resource_weight_events/143"

示例响应:

json
1{ 2"id": 143, 3"user": { 4 "id": 1, 5 "name": "Administrator", 6 "username": "root", 7 "state": "active", 8 "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", 9 "web_url": "http://gitlab.example.com/root" 10}, 11"created_at": "2018-08-21T14:38:20.077Z", 12"issue_id": 253, 13"weight": 2 14}