Help us learn about your current experience with the documentation. Take the survey.
群组发布 API
- 版本:Free, Premium, Ultimate
- 产品:GitLab.com, GitLab Self-Managed, GitLab Dedicated
使用此 API 与群组中的项目发布进行交互。
要直接与项目发布交互,请参阅项目发布 API。
列出群组中的所有发布
列出指定群组中所有项目的发布。
GET /groups/:id/releases
GET /groups/:id/releases?simple=true参数:
| 属性 | 类型 | 必需 | 描述 |
|---|---|---|---|
id |
integer/string | 是 | 群组的 ID 或 URL 编码路径。 |
sort |
string | 否 | 排序方向。可选值:desc 或 asc。 |
simple |
boolean | 否 | 如果为 true,则只返回每个发布的有限字段。 |
curl --header "PRIVATE-TOKEN: <your_access_token>"
--url "https://gitlab.example.com/api/v4/groups/5/releases"示例响应:
[
{
"name": "标准发布",
"tag_name": "发布标签",
"description": "",
"created_at": "2022-01-10T15:23:15.529Z",
"released_at": "2022-01-10T15:23:15.529Z",
"author": {
"id": 1,
"username": "root",
"name": "管理员",
"state": "活跃",
"avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
"web_url": "https://gitlab.com/root"
},
"commit": {
"id": "e8cbb845ae5a53a2fef2938cf63cf82efc10d993",
"short_id": "e8cbb845",
"created_at": "2022-01-10T15:20:29.000+00:00",
"parent_ids": [],
"title": "更新测试",
"message": "更新测试",
"author_name": "管理员",
"author_email": "admin@example.com",
"authored_date": "2022-01-10T15:20:29.000+00:00",
"committer_name": "管理员",
"committer_email": "admin@example.com",
"committed_date": "2022-01-10T15:20:29.000+00:00",
"trailers": {},
"web_url": "https://gitlab.com/groups/gitlab-org/-/commit/e8cbb845ae5a53a2fef2938cf63cf82efc10d993"
},
"upcoming_release": false,
"commit_path": "/testgroup/test/-/commit/e8cbb845ae5a53a2fef2938cf63cf82efc10d993",
"tag_path": "/testgroup/test/-/tags/testtag"
}
]