Debian 群组分发 API

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

这是 Debian 群组发行版 API 的参考文档。此 API 在默认情况下被禁用的特性标志后面。要使用此 API,您必须启用它

此 API 正在开发中,不适用于生产环境。

有关使用 Debian 软件包的更多信息,请参阅Debian 软件包注册表文档

启用 Debian 群组 API#

Debian 群组存储库支持仍在进行中。它被默认禁用的特性标志所限制。拥有极狐GitLab Rails 控制台访问权限的管理员可以选择启用它。要启用它,请按照启用 Debian 群组 API中的说明进行操作。

验证到 Debian 发行版 API#

请参阅验证到 Debian 发行版 API

列出群组中的所有 Debian 发行版#

列出给定群组中的 Debian 发行版。

plaintext
GET /groups/:id/-/debian_distributions
属性类型必需描述
idinteger/string群组的 ID 或 URL 编码路径
codenamestring使用特定 codename 进行过滤。
suitestring使用特定 suite 进行过滤。
shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/-/debian_distributions"

示例响应:

json
1[ 2 { 3 "id": 1, 4 "codename": "sid", 5 "suite": null, 6 "origin": null, 7 "label": null, 8 "version": null, 9 "description": null, 10 "valid_time_duration_seconds": null, 11 "components": [ 12 "main" 13 ], 14 "architectures": [ 15 "all", 16 "amd64" 17 ] 18 } 19]

单个 Debian 群组发行版#

获取单个 Debian 群组发行版。

plaintext
GET /groups/:id/-/debian_distributions/:codename
属性类型必需描述
idinteger/string群组的 ID 或 URL 编码路径
codenamestring发行版的 codename
shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/-/debian_distributions/unstable"

示例响应:

json
1{ 2 "id": 1, 3 "codename": "sid", 4 "suite": null, 5 "origin": null, 6 "label": null, 7 "version": null, 8 "description": null, 9 "valid_time_duration_seconds": null, 10 "components": [ 11 "main" 12 ], 13 "architectures": [ 14 "all", 15 "amd64" 16 ] 17}

单个 Debian 群组发行版密钥#

获取单个 Debian 群组发行版密钥。

plaintext
GET /groups/:id/-/debian_distributions/:codename/key.asc
属性类型必需描述
idinteger/string群组的 ID 或 URL 编码路径
codenamestring发行版的 codename
shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/-/debian_distributions/unstable/key.asc"

示例响应:

plaintext
1-----BEGIN PGP PUBLIC KEY BLOCK----- 2Comment: Alice's OpenPGP certificate 3Comment: https://www.ietf.org/id/draft-bre-openpgp-samples-01.html 4 5mDMEXEcE6RYJKwYBBAHaRw8BAQdArjWwk3FAqyiFbFBKT4TzXcVBqPTB3gmzlC/U 6b7O1u120JkFsaWNlIExvdmVsYWNlIDxhbGljZUBvcGVucGdwLmV4YW1wbGU+iJAE 7ExYIADgCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQTrhbtfozp14V6UTmPy 8MVUMT0fjjgUCXaWfOgAKCRDyMVUMT0fjjukrAPoDnHBSogOmsHOsd9qGsiZpgRnO 9dypvbm+QtXZqth9rvwD9HcDC0tC+PHAsO7OTh1S1TC9RiJsvawAfCPaQZoed8gK4 10OARcRwTpEgorBgEEAZdVAQUBAQdAQv8GIa2rSTzgqbXCpDDYMiKRVitCsy203x3s 11E9+eviIDAQgHiHgEGBYIACAWIQTrhbtfozp14V6UTmPyMVUMT0fjjgUCXEcE6QIb 12DAAKCRDyMVUMT0fjjlnQAQDFHUs6TIcxrNTtEZFjUFm1M0PJ1Dng/cDW4xN80fsn 130QEA22Kr7VkCjeAEC08VSTeV+QFsmz55/lntWkwYWhmvOgE= 14=iIGO 15-----END PGP PUBLIC KEY BLOCK-----

创建一个 Debian 群组发行版#

创建一个 Debian 群组发行版。

plaintext
POST /groups/:id/-/debian_distributions
属性类型必需描述
idinteger/string群组的 ID 或 URL 编码路径
codenamestringDebian 发行版的 codename。
suitestring新 Debian 发行版的 suite。
originstring新 Debian 发行版的 origin。
labelstring新 Debian 发行版的 label。
versionstring新 Debian 发行版的 version。
descriptionstring新 Debian 发行版的 description。
valid_time_duration_secondsinteger新 Debian 发行版的有效时间(以秒为单位)。
componentsstring array新 Debian 发行版的组件列表。
architecturesstring array新 Debian 发行版的架构列表。
shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/-/debian_distributions?codename=sid"

示例响应:

json
1{ 2 "id": 1, 3 "codename": "sid", 4 "suite": null, 5 "origin": null, 6 "label": null, 7 "version": null, 8 "description": null, 9 "valid_time_duration_seconds": null, 10 "components": [ 11 "main" 12 ], 13 "architectures": [ 14 "all", 15 "amd64" 16 ] 17}

更新一个 Debian 群组发行版#

更新一个 Debian 群组发行版。

plaintext
PUT /groups/:id/-/debian_distributions/:codename
属性类型必需描述
idinteger/string群组的 ID 或 URL 编码路径
codenamestringDebian 发行版的新 codename。
suitestringDebian 发行版的新 suite。
originstringDebian 发行版的新 origin。
labelstringDebian 发行版的新 label。
versionstringDebian 发行版的新 version。
descriptionstringDebian 发行版的新 description。
valid_time_duration_secondsintegerDebian 发行版的新有效时间(以秒为单位)。
componentsstring arrayDebian 发行版的新组件列表。
architecturesstring arrayDebian 发行版的新架构列表。
shell
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"

示例响应:

json
1{ 2 "id": 1, 3 "codename": "sid", 4 "suite": "new-suite", 5 "origin": null, 6 "label": null, 7 "version": null, 8 "description": null, 9 "valid_time_duration_seconds": 604800, 10 "components": [ 11 "main" 12 ], 13 "architectures": [ 14 "all", 15 "amd64" 16 ] 17}

删除一个 Debian 群组发行版#

删除一个 Debian 群组发行版。

plaintext
DELETE /groups/:id/-/debian_distributions/:codename
属性类型必需描述
idinteger/string群组的 ID 或 URL 编码路径
codenamestringDebian 发行版的 codename。
shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/-/debian_distributions/unstable"