第 1 章 APIs


You can access APIs for to create and manage application resources, channels, subscriptions, and to query information.

For more information, review the API documentation for each of the following resources:

1.1. Clusters API

1.1.1. Overview

This documentation is for the cluster resource for Red Hat Advanced Cluster Management for Kubernetes. Cluster resource has four possible requests: create, query, delete and update.

1.1.1.1. Version information

Version : 2.0.0

1.1.1.2. Contact information

Contact Email : apiteam@swagger.io

1.1.1.3. License information

License : Apache 2.0
License URL : http://www.apache.org/licenses/LICENSE-2.0.html
Terms of service : http://swagger.io/terms/

1.1.1.4. URI scheme

BasePath : /kubernetes/apis
Schemes : HTTPS

1.1.1.5. Tags

  • cluster.open-cluster-management.io : Create and manage clusters

1.1.1.6. External Docs

Description : Find out more about Swagger.
URL : http://swagger.io

1.1.2. Paths

1.1.2.1. Query all clusters

GET /cluster.open-cluster-management.io/v1/managedclusters
Copy to Clipboard Toggle word wrap
1.1.2.1.1. Description

Query your clusters for more details.

1.1.2.1.2. Parameters
Expand
TypeNameDescriptionSchema

Header

COOKIE
required

Authorization: Bearer {ACCESS_TOKEN} ; ACCESS_TOKEN is the user access token.

string

1.1.2.1.3. Responses
Expand
HTTP CodeDescriptionSchema

200

Success

No Content

403

Access forbidden

No Content

404

Resource not found

No Content

500

Internal service error

No Content

503

Service unavailable

No Content

1.1.2.1.4. Consumes
  • cluster/yaml
1.1.2.1.5. Tags
  • cluster.open-cluster-management.io

1.1.2.2. Create a cluster

POST /cluster.open-cluster-management.io/v1/managedclusters
Copy to Clipboard Toggle word wrap
1.1.2.2.1. Description

Create a cluster

1.1.2.2.2. Parameters
Expand
TypeNameDescriptionSchema

Header

COOKIE
required

Authorization: Bearer {ACCESS_TOKEN} ; ACCESS_TOKEN is the user access token.

string

Body

body
required

Parameters describing the cluster to be created.

Cluster

1.1.2.2.3. Responses
Expand
HTTP CodeDescriptionSchema

200

Success

No Content

403

Access forbidden

No Content

404

Resource not found

No Content

500

Internal service error

No Content

503

Service unavailable

No Content

1.1.2.2.4. Consumes
  • cluster/yaml
1.1.2.2.5. Tags
  • cluster.open-cluster-management.io
1.1.2.2.6. Example HTTP request
1.1.2.2.6.1. Request body
{
  "apiVersion" : "cluster.open-cluster-management.io/v1",
  "kind" : "ManagedCluster",
  "metadata" : {
    "labels" : {
      "vendor" : "OpenShift"
    },
    "name" : "cluster1",
  },
  "spec": {
    "hubAcceptsClient": true,
    "managedClusterClientConfigs": [
      {
        "caBundle": "test",
        "url": "https://test.com"
      }
    ]
  },
  "status" : { }
}
Copy to Clipboard Toggle word wrap

1.1.2.3. Query a single cluster

GET /cluster.open-cluster-management.io/v1/managedclusters/{cluster_name}
Copy to Clipboard Toggle word wrap
1.1.2.3.1. Description

Query a single cluster for more details.

1.1.2.3.2. Parameters
Expand
TypeNameDescriptionSchema

Header

COOKIE
required

Authorization: Bearer {ACCESS_TOKEN} ; ACCESS_TOKEN is the user access token.

string

Path

cluster_name
required

Name of the cluster that you want to query.

string

1.1.2.3.3. Responses
Expand
HTTP CodeDescriptionSchema

200

Success

No Content

403

Access forbidden

No Content

404

Resource not found

No Content

500

Internal service error

No Content

503

Service unavailable

No Content

1.1.2.3.4. Tags
  • cluster.open-cluster-management.io

1.1.2.4. Delete a cluster

DELETE /cluster.open-cluster-management.io/v1/managedclusters/{cluster_name}
Copy to Clipboard Toggle word wrap
1.1.2.4.1. Description

Delete a single cluster

1.1.2.4.2. Parameters
Expand
TypeNameDescriptionSchema

Header

COOKIE
required

Authorization: Bearer {ACCESS_TOKEN} ; ACCESS_TOKEN is the user access token.

string

Path

cluster_name
required

Name of the cluster that you want to delete.

string

1.1.2.4.3. Responses
Expand
HTTP CodeDescriptionSchema

200

Success

No Content

403

Access forbidden

No Content

404

Resource not found

No Content

500

Internal service error

No Content

503

Service unavailable

No Content

1.1.2.4.4. Tags
  • cluster.open-cluster-management.io

1.1.3. Definitions

1.1.3.1. Cluster

Expand
NameSchema

apiVersion
required

string

kind
required

string

metadata
required

object

spec
required

spec

spec

Expand
NameSchema

hubAcceptsClient
required

bool

managedClusterClientConfigs
optional

< managedClusterClientConfigs > array

leaseDurationSeconds
optional

integer (int32)

managedClusterClientConfigs

Expand
NameDescriptionSchema

URL
required

 

string

CABundle
optional

Pattern : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"

string (byte)

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部