Help us learn about your current experience with the documentation. Take the survey.
Debian 组分发 API
- 版本:Free, Premium, Ultimate
- 产品:GitLab Self-Managed
本文档是 Debian 组分发 API 的参考文档。此 API 默认处于禁用状态,受功能标志控制。要使用此 API,您必须先启用它。
此 API 正在开发中,不建议用于生产环境。
有关使用 Debian 包的更多信息,请参阅 Debian 包注册表文档。
启用 Debian 组 API
Debian 组仓库支持仍在开发中。它受一个默认禁用的功能标志控制。 有权访问 GitLab Rails 控制台的 GitLab 管理员 可以选择启用它。要启用它,请按照 启用 Debian 组 API 中的说明操作。
向 Debian 分发 API 进行身份验证
列出组中的所有 Debian 分发
列出指定组中的 Debian 分发。
GET /groups/:id/-/debian_distributions| 属性 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
id |
integer/string | 是 | 组的 ID 或 URL 编码路径。 |
codename |
string | 否 | 使用特定的 codename 进行筛选。 |
suite |
string | 否 | 使用特定的 suite 进行筛选。 |
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/-/debian_distributions"示例响应:
[
{
"id": 1,
"codename": "sid",
"suite": null,
"origin": null,
"label": null,
"version": null,
"description": null,
"valid_time_duration_seconds": null,
"components": [
"main"
],
"architectures": [
"all",
"amd64"
]
}
]单个 Debian 组分发
获取单个 Debian 组分发。
GET /groups/:id/-/debian_distributions/:codename| 属性 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
id |
integer/string | 是 | 组的 ID 或 URL 编码路径。 |
codename |
string | 是 | 分发的 codename。 |
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/-/debian_distributions/unstable"示例响应:
{
"id": 1,
"codename": "sid",
"suite": null,
"origin": null,
"label": null,
"version": null,
"description": null,
"valid_time_duration_seconds": null,
"components": [
"main"
],
"architectures": [
"all",
"amd64"
]
}单个 Debian 组分发密钥
获取单个 Debian 组分发密钥。
GET /groups/:id/-/debian_distributions/:codename/key.asc| 属性 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
id |
integer/string | 是 | 组的 ID 或 URL 编码路径。 |
codename |
string | 是 | 分发的 codename。 |
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/-/debian_distributions/unstable/key.asc"示例响应:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: Alice's OpenPGP certificate
Comment: https://www.ietf.org/id/draft-bre-openpgp-samples-01.html
mDMEXEcE6RYJKwYBBAHaRw8BAQdArjWwk3FAqyiFbFBKT4TzXcVBqPTB3gmzlC/U
b7O1u120JkFsaWNlIExvdmVsYWNlIDxhbGljZUBvcGVucGdwLmV4YW1wbGU+iJAE
ExYIADgCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQTrhbtfozp14V6UTmPy
MVUMT0fjjgUCXaWfOgAKCRDyMVUMT0fjjukrAPoDnHBSogOmsHOsd9qGsiZpgRnO
dypvbm+QtXZqth9rvwD9HcDC0tC+PHAsO7OTh1S1TC9RiJsvawAfCPaQZoed8gK4
OARcRwTpEgorBgEEAZdVAQUBAQdAQv8GIa2rSTzgqbXCpDDYMiKRVitCsy203x3s
E9+eviIDAQgHiHgEGBYIACAWIQTrhbtfozp14V6UTmPyMVUMT0fjjgUCXEcE6QIb
DAAKCRDyMVUMT0fjjlnQAQDFHUs6TIcxrNTtEZFjUFm1M0PJ1Dng/cDW4xN80fsn
0QEA22Kr7VkCjeAEC08VSTeV+QFsmz55/lntWkwYWhmvOgE=
=iIGO
-----END PGP PUBLIC KEY BLOCK-----创建 Debian 组分发
创建一个 Debian 组分发。
POST /groups/:id/-/debian_distributions| 属性 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
id |
integer/string | 是 | 组的 ID 或 URL 编码路径。 |
codename |
string | 是 | Debian 分发的 codename。 |
suite |
string | 否 | 新 Debian 分发的 suite。 |
origin |
string | 否 | 新 Debian 分发的 origin。 |
label |
string | 否 | 新 Debian 分发的 label。 |
version |
string | 否 | 新 Debian 分发的 version。 |
description |
string | 否 | 新 Debian 分发的描述。 |
valid_time_duration_seconds |
integer | 否 | 新 Debian 分发的有效时长(以秒为单位)。 |
components |
string array | 否 | 新 Debian 分发的组件列表。 |
architectures |
string array | 否 | 新 Debian 分发的架构列表。 |
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/-/debian_distributions?codename=sid"示例响应:
{
"id": 1,
"codename": "sid",
"suite": null,
"origin": null,
"label": null,
"version": null,
"description": null,
"valid_time_duration_seconds": null,
"components": [
"main"
],
"architectures": [
"all",
"amd64"
]
}更新 Debian 组分发
更新一个 Debian 组分发。
PUT /groups/:id/-/debian_distributions/:codename| 属性 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
id |
integer/string | 是 | 组的 ID 或 URL 编码路径。 |
codename |
string | 是 | Debian 分发的新 codename。 |
suite |
string | 否 | Debian 分发的新 suite。 |
origin |
string | 否 | Debian 分发的新 origin。 |
label |
string | 否 | Debian 分发的新 label。 |
version |
string | 否 | Debian 分发的新 version。 |
description |
string | 否 | Debian 分发的新描述。 |
valid_time_duration_seconds |
integer | 否 | Debian 分发的新有效时长(以秒为单位)。 |
components |
string array | 否 | Debian 分发的新组件列表。 |
architectures |
string array | 否 | Debian 分发的新架构列表。 |
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/-/debian_distributions/unstable?suite=new-suite&valid_time_duration_seconds=604800"示例响应:
{
"id": 1,
"codename": "sid",
"suite": "new-suite",
"origin": null,
"label": null,
"version": null,
"description": null,
"valid_time_duration_seconds": 604800,
"components": [
"main"
],
"architectures": [
"all",
"amd64"
]
}删除 Debian 组分发
删除一个 Debian 组分发。
DELETE /groups/:id/-/debian_distributions/:codename| 属性 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
id |
integer/string | 是 | 组的 ID 或 URL 编码路径。 |
codename |
string | 是 | Debian 分发的 codename。 |
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/-/debian_distributions/unstable"