Help us learn about your current experience with the documentation. Take the survey.

集群发现 API (基于证书的) (已弃用)

  • 版本:Free, Premium, Ultimate
  • 产品:GitLab.com, GitLab Self-Managed, GitLab Dedicated

此功能已在 GitLab 14.5 版本中被弃用

发现基于证书的集群

获取已注册到组、子组或项目的基于证书的集群。同时也会返回已禁用和已启用的集群。

GET /discover-cert-based-clusters

参数:

属性 类型 是否必需 描述
group_id integer/string 组的 ID

示例请求:

curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/discover-cert-based-clusters?group_id=1"

示例响应:

{
  "groups": {
    "my-clusters-group": [
      {
        "id": 2,
        "name": "group-cluster-1"
      }
    ],
    "my-clusters-group/subgroup1/subsubgroup1": [
      {
        "id": 4,
        "name": "subsubgroup-cluster"
      }
    ]
  },
  "projects": {
    "my-clusters-group/subgroup1/subsubgroup1/subsubgroup-project-with-cluster": [
      {
        "id": 3,
        "name": "subsubgroup-project-cluster"
      }
    ],
    "my-clusters-group/project1-with-clustser": [
      {
        "id": 1,
        "name": "test"
      }
    ]
  }
}