Chapter 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
1.1.2.1.1. Description

Query your clusters for more details.

1.1.2.1.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

1.1.2.1.3. Responses
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
1.1.2.2.1. Description

Create a cluster

1.1.2.2.2. Parameters
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
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" : { }
}

1.1.2.3. Query a single cluster

GET /cluster.open-cluster-management.io/v1/managedclusters/{cluster_name}
1.1.2.3.1. Description

Query a single cluster for more details.

1.1.2.3.2. Parameters
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
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}
1.1.2.4.1. Description

Delete a single cluster

1.1.2.4.2. Parameters
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
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

NameSchema

apiVersion
required

string

kind
required

string

metadata
required

object

spec
required

spec

spec

NameSchema

hubAcceptsClient
required

bool

managedClusterClientConfigs
optional

< managedClusterClientConfigs > array

leaseDurationSeconds
optional

integer (int32)

managedClusterClientConfigs

NameDescriptionSchema

URL
required

 

string

CABundle
optional

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

string (byte)

1.2. Channels API

1.2.1. Overview

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

1.2.1.1. Version information

Version : 2.0.0

1.2.1.2. Contact information

Contact Email : apiteam@swagger.io

1.2.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.2.1.4. URI scheme

BasePath : /kubernetes/apis
Schemes : HTTPS

1.2.1.5. Tags

  • channels.apps.open-cluster-management.io : Create and manage deployables

1.2.1.6. External Docs

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

1.2.2. Paths

1.2.2.1. Create a channel

POST /apps.open-cluster-management.io/v1/namespaces/{namespace}/channels
1.2.2.1.1. Description

Create a channel.

1.2.2.1.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

Body

body
required

Parameters describing the deployable to be created.

Channel

1.2.2.1.3. Responses
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.2.2.1.4. Consumes
  • application/yaml
1.2.2.1.5. Tags
  • channels.apps.open-cluster-management.io
1.2.2.1.6. Example HTTP request
1.2.2.1.6.1. Request body
{
  "apiVersion" : "apps.open-cluster-management.io/v1",
  "kind" : "Channel",
  "name" : "sample-channel",
  "namespace" : "default",
  "spec" : {
    "type" : "Git",
    "pathname" : "https://github.com/IBM/charts.git",
    "configMapRef" : {
      "name" : "bookinfo-resource-filter-configmap",
      "kind" : "configmap"
    }
  }
}

1.2.2.2. Query all channels for the target namespace

GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/channels
1.2.2.2.1. Description

Query your channels for more details.

1.2.2.2.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.2.2.2.3. Responses
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.2.2.2.4. Consumes
  • application/yaml
1.2.2.2.5. Tags
  • channels.apps.open-cluster-management.io

1.2.2.3. Query a single channels of a namespace

GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/channels/{channel_name}
1.2.2.3.1. Description

Query a single channels for more details.

1.2.2.3.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

channel_name
required

Name of the deployable that you wan to query.

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.2.2.3.3. Responses
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.2.2.3.4. Tags
  • channels.apps.open-cluster-management.io

1.2.2.4. Delete a Channel

DELETE /apps.open-cluster-management.io/v1/namespaces/{namespace}/channels/{channel_name}
1.2.2.4.1. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

channel_name
required

Name of the Channel that you want to delete.

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.2.2.4.2. Responses
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.2.2.4.3. Tags
  • channels.apps.open-cluster-management.io

1.2.3. Definitions

1.2.3.1. Channel

NameSchema

apiVersion
required

string

kind
required

string

metadata
required

object

spec
required

spec

spec

NameDescriptionSchema

configMapRef
optional

ObjectReference contains enough information to let you inspect or modify the referred object.

configMapRef

gates
optional

ChannelGate defines criteria for promote to channel

gates

pathname
required

 

string

secretRef
optional

ObjectReference contains enough information to let you inspect or modify the referred object.

secretRef

sourceNamespaces
optional

 

< enum (Namespace, HelmRepo, ObjectBucket, Git, namespace, helmrepo, objectbucket, github) > array

configMapRef

NameDescriptionSchema

apiVersion
optional

API version of the referent.

string

fieldPath
optional

If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.

string

kind
optional

Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

string

name
optional

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

string

namespace
optional

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

string

resourceVersion
optional

Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency

string

uid
optional

UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids

string

gates

NameDescriptionSchema

annotations
optional

typical annotations of k8s

annotations

labelSelector
optional

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

labelSelector

name
optional

 

string

annotations

NameSchema

key
optional

string

value
optional

string

labelSelector

NameDescriptionSchema

matchExpressions
optional

matchExpressions is a list of label selector requirements. The requirements are ANDed.

< matchExpressions > array

matchLabels
optional

matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

< string, string > map

matchExpressions

NameDescriptionSchema

key
required

key is the label key that the selector applies to.

string

operator
required

operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

string

values
optional

values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

< string > array

secretRef

NameDescriptionSchema

apiVersion
optional

API version of the referent.

string

fieldPath
optional

If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.

string

kind
optional

Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

string

name
optional

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

string

namespace
optional

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

string

resourceVersion
optional

Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency

string

uid
optional

UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids

string

1.3. Subscriptions API

1.3.1. Overview

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

1.3.1.1. Version information

Version : 2.0.0

1.3.1.2. Contact information

Contact Email : apiteam@swagger.io

1.3.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.3.1.4. URI scheme

BasePath : /kubernetes/apis
Schemes : HTTPS

1.3.1.5. Tags

  • subscriptions.apps.open-cluster-management.io : Create and manage subscriptions

1.3.1.6. External Docs

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

1.3.2. Paths

1.3.2.1. Create a subscription

POST /apps.open-cluster-management.io/v1/namespaces/{namespace}/subscriptions
1.3.2.1.1. Description

Create a subscription.

1.3.2.1.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

Body

body
required

Parameters describing the subscription to be created.

Subscription

1.3.2.1.3. Responses
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.3.2.1.4. Consumes
  • subscription/yaml
1.3.2.1.5. Tags
  • subscriptions.apps.open-cluster-management.io
1.3.2.1.6. Example HTTP request
1.3.2.1.6.1. Request body
{
  "apiVersion" : "apps.open-cluster-management.io/v1",
  "kind" : "Subscription",
  "metadata" : {
    "name" : "sample_subscription",
    "namespace" : "default",
    "labels" : {
      "app" : "sample_subscription-app"
    },
    "annotations" : {
      "apps.open-cluster-management.io/git-path" : "apps/sample/",
      "apps.open-cluster-management.io/git-branch" : "sample_branch"
    }
  },
  "spec" : {
    "channel" : "channel_namespace/sample_channel",
    "packageOverrides" : [ {
      "packageName" : "my-sample-application",
      "packageAlias" : "the-sample-app",
      "packageOverrides" : [ {
        "path" : "spec",
        "value" : {
          "persistence" : {
            "enabled" : false,
            "useDynamicProvisioning" : false
          },
          "license" : "accept",
          "tls" : {
            "hostname" : "my-mcm-cluster.icp"
          },
          "sso" : {
            "registrationImage" : {
              "pullSecret" : "hub-repo-docker-secret"
            }
          }
        }
      } ]
    } ],
    "placement" : {
      "placementRef" : {
        "kind" : "PlacementRule",
        "name" : "demo-clusters"
      }
    }
  }
}

1.3.2.2. Query all subscriptions

GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/subscriptions
1.3.2.2.1. Description

Query your subscriptions for more details.

1.3.2.2.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.3.2.2.3. Responses
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.3.2.2.4. Consumes
  • subscription/yaml
1.3.2.2.5. Tags
  • subscriptions.apps.open-cluster-management.io

1.3.2.3. Query a single subscription

GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/subscriptions/{subscription_name}
1.3.2.3.1. Description

Query a single subscription for more details.

1.3.2.3.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

Path

subscription_name
required

Name of the subscription that you wan to query.

string

1.3.2.3.3. Responses
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.3.2.3.4. Tags
  • subscriptions.apps.open-cluster-management.io

1.3.2.4. Delete a subscription

DELETE /apps.open-cluster-management.io/v1/namespaces/{namespace}/subscriptions/{subscription_name}
1.3.2.4.1. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

Path

subscription_name
required

Name of the subscription that you want to delete.

string

1.3.2.4.2. Responses
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.3.2.4.3. Tags
  • subscriptions.apps.open-cluster-management.io

1.3.3. Definitions

1.3.3.1. Subscription

NameSchema

apiVersion
required

string

kind
required

string

metadata
required

metadata

spec
required

spec

status
optional

status

metadata

NameSchema

annotations
optional

object

labels
optional

object

name
optional

string

namespace
optional

string

spec

NameSchema

channel
required

string

name
optional

string

overrides
optional

< overrides > array

packageFilter
optional

packageFilter

packageOverrides
optional

< packageOverrides > array

placement
optional

placement

timewindow
optional

timewindow

overrides

NameSchema

clusterName
required

string

clusterOverrides
required

< object > array

packageFilter

NameDescriptionSchema

annotations
optional

 

< string, string > map

filterRef
optional

 

filterRef

labelSelector
optional

 

labelSelector

version
optional

Pattern : "()((\\.[0-9])(\\.)|(\\.[0-9])?(\\.[xX]))$"

string

filterRef

NameSchema

name
optional

string

labelSelector

NameSchema

matchExpressions
optional

< matchExpressions > array

matchLabels
optional

< string, string > map

matchExpressions

NameSchema

key
required

string

operator
required

string

values
optional

< string > array

packageOverrides

NameSchema

packageAlias
optional

string

packageName
required

string

packageOverrides
optional

< object > array

placement

NameSchema

clusterSelector
optional

clusterSelector

clusters
optional

< clusters > array

local
optional

boolean

placementRef
optional

placementRef

clusterSelector

NameSchema

matchExpressions
optional

< matchExpressions > array

matchLabels
optional

< string, string > map

matchExpressions

NameSchema

key
required

string

operator
required

string

values
optional

< string > array

clusters

NameSchema

name
required

string

placementRef

NameSchema

apiVersion
optional

string

fieldPath
optional

string

kind
optional

string

name
optional

string

namespace
optional

string

resourceVersion
optional

string

uid
optional

string

timewindow

NameSchema

daysofweek
optional

< string > array

hours
optional

< hours > array

location
optional

string

windowtype
optional

enum (active, blocked, Active, Blocked)

hours

NameSchema

end
optional

string

start
optional

string

status

NameSchema

lastUpdateTime
optional

string (date-time)

message
optional

string

phase
optional

string

reason
optional

string

statuses
optional

object

1.4. Placementrules API

1.4.1. Overview

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

1.4.1.1. Version information

Version : 2.0.0

1.4.1.2. Contact information

Contact Email : apiteam@swagger.io

1.4.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.4.1.4. URI scheme

BasePath : /kubernetes/apis
Schemes : HTTPS

1.4.1.5. Tags

  • placementrules.apps.open-cluster-management.io : Create and manage placementrules

1.4.1.6. External Docs

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

1.4.2. Paths

1.4.2.1. Create a placementrule

POST /apps.open-cluster-management.io/v1/namespaces/{namespace}/placementrules
1.4.2.1.1. Description

Create a placementrule.

1.4.2.1.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

Body

body
required

Parameters describing the placementrule to be created.

Placementrule

1.4.2.1.3. Responses
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.4.2.1.4. Consumes
  • application/yaml
1.4.2.1.5. Tags
  • placementrules.apps.open-cluster-management.io
1.4.2.1.6. Example HTTP request
1.4.2.1.6.1. Request body
{
  "apiVersion" : "apps.open-cluster-management.io/v1",
  "kind" : "PlacementRule",
  "metadata" : {
    "name" : "towhichcluster",
    "namespace" : "ns-sub-1"
  },
  "spec" : {
    "clusterConditions" : [ {
      "type": "ManagedClusterConditionAvailable",
      "status": "True"
    } ],
    "clusterSelector" : { }
  }
}

1.4.2.2. Query all placementrules

GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/placementrules
1.4.2.2.1. Description

Query your placementrules for more details.

1.4.2.2.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.4.2.2.3. Responses
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.4.2.2.4. Consumes
  • application/yaml
1.4.2.2.5. Tags
  • placementrules.apps.open-cluster-management.io

1.4.2.3. Query a single placementrule

GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/placementrules/{placementrule_name}
1.4.2.3.1. Description

Query a single placementrule for more details.

1.4.2.3.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

Path

placementrule_name
required

Name of the placementrule that you want to query.

string

1.4.2.3.3. Responses
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.4.2.3.4. Tags
  • placementrules.apps.open-cluster-management.io

1.4.2.4. Delete a placementrule

DELETE /apps.open-cluster-management.io/v1/namespaces/{namespace}/placementrules/{placementrule_name}
1.4.2.4.1. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

Path

placementrule_name
required

Name of the placementrule that you want to delete.

string

1.4.2.4.2. Responses
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.4.2.4.3. Tags
  • placementrules.apps.open-cluster-management.io

1.4.3. Definitions

1.4.3.1. Placementrule

NameSchema

apiVersion
required

string

kind
required

string

metadata
required

object

spec
required

spec

spec

NameSchema

clusterConditions
optional

< clusterConditions > array

clusterReplicas
optional

integer

clusterSelector
optional

clusterSelector

clusters
optional

< clusters > array

policies
optional

< policies > array

resourceHint
optional

resourceHint

schedulerName
optional

string

clusterConditions

NameSchema

status
optional

string

type
optional

string

clusterSelector

NameSchema

matchExpressions
optional

< matchExpressions > array

matchLabels
optional

< string, string > map

matchExpressions

NameSchema

key
optional

string

operator
optional

string

values
optional

< string > array

clusters

NameSchema

name
optional

string

policies

NameSchema

apiVersion
optional

string

fieldPath
optional

string

kind
optional

string

name
optional

string

namespace
optional

string

resourceVersion
optional

string

uid
optional

string

resourceHint

NameSchema

order
optional

string

type
optional

string

1.5. Applications API

1.5.1. Overview

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

1.5.1.1. Version information

Version : 2.0.0

1.5.1.2. Contact information

Contact Email : apiteam@swagger.io

1.5.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.5.1.4. URI scheme

BasePath : /kubernetes/apis
Schemes : HTTPS

1.5.1.5. Tags

  • applications.app.k8s.io : Create and manage applications

1.5.1.6. External Docs

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

1.5.2. Paths

1.5.2.1. Create a application

POST /app.k8s.io/v1beta1/namespaces/{namespace}/applications
1.5.2.1.1. Description

Create a application.

1.5.2.1.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

Body

body
required

Parameters describing the application to be created.

Application

1.5.2.1.3. Responses
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.5.2.1.4. Consumes
  • application/yaml
1.5.2.1.5. Tags
  • applications.app.k8s.io
1.5.2.1.6. Example HTTP request
1.5.2.1.6.1. Request body
{
  "apiVersion" : "app.k8s.io/v1beta1",
  "kind" : "Application",
  "metadata" : {
    "labels" : {
      "app" : "nginx-app-details"
    },
    "name" : "nginx-app-3",
    "namespace" : "ns-sub-1"
  },
  "spec" : {
    "componentKinds" : [ {
      "group" : "apps.open-cluster-management.io",
      "kind" : "Subscription"
    } ]
  },
  "selector" : {
    "matchLabels" : {
      "app" : "nginx-app-details"
    }
  },
  "status" : { }
}

1.5.2.2. Query all applications

GET /app.k8s.io/v1beta1/namespaces/{namespace}/applications
1.5.2.2.1. Description

Query your applications for more details.

1.5.2.2.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.5.2.2.3. Responses
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.5.2.2.4. Consumes
  • application/yaml
1.5.2.2.5. Tags
  • applications.app.k8s.io

1.5.2.3. Query a single application

GET /app.k8s.io/v1beta1/namespaces/{namespace}/applications/{application_name}
1.5.2.3.1. Description

Query a single application for more details.

1.5.2.3.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

application_name
required

Name of the application that you wan to query.

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.5.2.3.3. Responses
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.5.2.3.4. Tags
  • applications.app.k8s.io

1.5.2.4. Delete a application

DELETE /app.k8s.io/v1beta1/namespaces/{namespace}/applications/{application_name}
1.5.2.4.1. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

application_name
required

Name of the application that you want to delete.

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.5.2.4.2. Responses
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.5.2.4.3. Tags
  • applications.app.k8s.io

1.5.3. Definitions

1.5.3.1. Application

NameSchema

apiVersion
required

string

kind
required

string

metadata
required

object

spec
required

spec

spec

NameSchema

assemblyPhase
optional

string

componentKinds
optional

< object > array

descriptor
optional

descriptor

info
optional

< info > array

selector
optional

object

descriptor

NameSchema

description
optional

string

icons
optional

< icons > array

keywords
optional

< string > array

links
optional

< links > array

maintainers
optional

< maintainers > array

notes
optional

string

owners
optional

< owners > array

type
optional

string

version
optional

string

icons

NameSchema

size
optional

string

src
required

string

type
optional

string

NameSchema

description
optional

string

url
optional

string

maintainers

NameSchema

email
optional

string

name
optional

string

url
optional

string

owners

NameSchema

email
optional

string

name
optional

string

url
optional

string

info

NameSchema

name
optional

string

type
optional

string

value
optional

string

valueFrom
optional

valueFrom

valueFrom

NameSchema

configMapKeyRef
optional

configMapKeyRef

ingressRef
optional

ingressRef

secretKeyRef
optional

secretKeyRef

serviceRef
optional

serviceRef

type
optional

string

configMapKeyRef

NameSchema

apiVersion
optional

string

fieldPath
optional

string

key
optional

string

kind
optional

string

name
optional

string

namespace
optional

string

resourceVersion
optional

string

uid
optional

string

ingressRef

NameSchema

apiVersion
optional

string

fieldPath
optional

string

host
optional

string

kind
optional

string

name
optional

string

namespace
optional

string

path
optional

string

resourceVersion
optional

string

uid
optional

string

secretKeyRef

NameSchema

apiVersion
optional

string

fieldPath
optional

string

key
optional

string

kind
optional

string

name
optional

string

namespace
optional

string

resourceVersion
optional

string

uid
optional

string

serviceRef

NameSchema

apiVersion
optional

string

fieldPath
optional

string

kind
optional

string

name
optional

string

namespace
optional

string

path
optional

string

port
optional

integer (int32)

resourceVersion
optional

string

uid
optional

string

1.6. Helm API

1.6.1. Overview

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

1.6.1.1. Version information

Version : 2.0.0

1.6.1.2. Contact information

Contact Email : apiteam@swagger.io

1.6.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.6.1.4. URI scheme

BasePath : /kubernetes/apis
Schemes : HTTPS

1.6.1.5. Tags

  • helmreleases.apps.open-cluster-management.io : Create and manage helmreleases

1.6.1.6. External Docs

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

1.6.2. Paths

1.6.2.1. Create a helmrelease

POST /apps.open-cluster-management.io/v1/namespaces/{namespace}/helmreleases
1.6.2.1.1. Description

Create a helmrelease.

1.6.2.1.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

Body

body
required

Parameters describing the helmrelease to be created.

HelmRelease

1.6.2.1.3. Responses
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.6.2.1.4. Consumes
  • application/yaml
1.6.2.1.5. Tags
  • helmreleases.apps.open-cluster-management.io
1.6.2.1.6. Example HTTP request
1.6.2.1.6.1. Request body
{
  "apiVersion" : "apps.open-cluster-management.io/v1",
  "kind" : "HelmRelease",
  "metadata" : {
    "name" : "nginx-ingress",
    "namespace" : "default"
  },
  "repo" : {
    "chartName" : "nginx-ingress",
    "source" : {
      "helmRepo" : {
        "urls" : [ "https://kubernetes-charts.storage.googleapis.com/nginx-ingress-1.26.0.tgz" ]
      },
      "type" : "helmrepo"
    },
    "version" : "1.26.0"
  },
  "spec" : {
    "defaultBackend" : {
      "replicaCount" : 3
    }
  }
}

1.6.2.2. Query all helmreleases

GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/helmreleases
1.6.2.2.1. Description

Query your helmreleases for more details.

1.6.2.2.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.6.2.2.3. Responses
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.6.2.2.4. Consumes
  • application/yaml
1.6.2.2.5. Tags
  • helmreleases.apps.open-cluster-management.io

1.6.2.3. Query a single helmrelease

GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/helmreleases/{helmrelease_name}
1.6.2.3.1. Description

Query a single helmrelease for more details.

1.6.2.3.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

helmrelease_name
required

Name of the helmrelease that you wan to query.

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.6.2.3.3. Responses
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.6.2.3.4. Tags
  • helmreleases.apps.open-cluster-management.io

1.6.2.4. Delete a helmrelease

DELETE /apps.open-cluster-management.io/v1/namespaces/{namespace}/helmreleases/{helmrelease_name}
1.6.2.4.1. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

helmrelease_name
required

Name of the helmrelease that you want to delete.

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.6.2.4.2. Responses
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.6.2.4.3. Tags
  • helmreleases.apps.open-cluster-management.io

1.6.3. Definitions

1.6.3.1. HelmRelease

NameSchema

apiVersion
required

string

kind
required

string

metadata
required

object

repo
required

repo

spec
required

object

status
required

status

repo

NameSchema

chartName
optional

string

configMapRef
optional

configMapRef

secretRef
optional

secretRef

source
optional

source

version
optional

string

configMapRef

NameSchema

apiVersion
optional

string

fieldPath
optional

string

kind
optional

string

name
optional

string

namespace
optional

string

resourceVersion
optional

string

uid
optional

string

secretRef

NameSchema

apiVersion
optional

string

fieldPath
optional

string

kind
optional

string

name
optional

string

namespace
optional

string

resourceVersion
optional

string

uid
optional

string

source

NameSchema

github
optional

github

helmRepo
optional

helmRepo

type
optional

string

github

NameSchema

branch
optional

string

chartPath
optional

string

urls
optional

< string > array

helmRepo

NameSchema

urls
optional

< string > array

status

NameSchema

conditions
required

< conditions > array

deployedRelease
optional

deployedRelease

conditions

NameSchema

lastTransitionTime
optional

string (date-time)

message
optional

string

reason
optional

string

status
required

string

type
required

string

deployedRelease

NameSchema

manifest
optional

string

name
optional

string

1.7. Policy API

1.7.1. Overview

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

1.7.1.1. Version information

Version : 2.0.0

1.7.1.2. Contact information

Contact Email : apiteam@swagger.io

1.7.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.7.1.4. URI scheme

BasePath : /kubernetes/apis
Schemes : HTTPS

1.7.1.5. Tags

  • policy.open-cluster-management.io/v1 : Create and manage policies

1.7.1.6. External Docs

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

1.7.2. Paths

1.7.2.1. Create a policy

POST /policy.open-cluster-management.io/v1/v1alpha1/namespaces/{namespace}/policies/{policy_name}
1.7.2.1.1. Description

Create a policy.

1.7.2.1.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

Body

body
required

Parameters describing the policy to be created.

Application

1.7.2.1.3. Responses
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.7.2.1.4. Consumes
  • application/json
1.7.2.1.5. Tags
  • policy.open-cluster-management.io
1.7.2.1.6. Example HTTP request
1.7.2.1.6.1. Request body
{
  "apiVersion": "policy.open-cluster-management.io/v1/v1alpha1",
  "kind": "Policy",
  "metadata": {
    "name": "test-policy-swagger",
    "description": "Example body for Policy API Swagger docs"
  },
  "spec": {
    "remediationAction": "enforce",
    "namespaces": {
      "include": [
        "default"
      ],
      "exclude": [
        "kube*"
      ]
    },
    "policy-templates": {
    "kind": "ConfigurationPolicy",
    "apiVersion": "policy.open-cluster-management.io/v1alpha1",
    "complianceType": "musthave",
    "metadata": {
      "namespace": null,
      "name": "test-role"
    },
    "selector": {
      "matchLabels": {
        "cloud": "IBM"
      }
    },
    "spec" : {
      "object-templates": {
        "complianceType": "mustHave",
        "objectDefinition": {
          "apiVersion": "rbac.authorization.k8s.io/v1",
          "kind": "Role",
          "metadata": {
            "name": "role-policy",
          },
          "rules": [
            {
              "apiGroups": [
                "extensions",
                "apps"
              ],
              "resources": [
                "deployments"
              ],
              "verbs": [
                "get",
                "list",
                "watch",
                "delete"
              ]
            },
            {
              "apiGroups": [
                "core"
              ],
              "resources": [
                "pods"
              ],
              "verbs": [
                "create",
                "update",
                "patch"
              ]
            },
            {
              "apiGroups": [
                "core"
              ],
              "resources": [
                "secrets"
              ],
              "verbs": [
                "get",
                "watch",
                "list",
                "create",
                "delete",
                "update",
                "patchß"
              ],
            },
          ],
        },
      },
    },
  },

1.7.2.2. Query all policies

GET /policy.open-cluster-management.io/v1/v1alpha1/namespaces/{namespace}/policies/{policy_name}
1.7.2.2.1. Description

Query your policies for more details.

1.7.2.2.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

namespace
required

Namespace that you want to apply the policy to, for example, default.

string

1.7.2.2.3. Responses
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.7.2.2.4. Consumes
  • application/json
1.7.2.2.5. Tags
  • policy.open-cluster-management.io

1.7.2.3. Query a single policy

GET /policy.open-cluster-management.io/v1/v1alpha1/namespaces/{namespace}/policies/{policy_name}
1.7.2.3.1. Description

Query a single policy for more details.

1.7.2.3.2. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

policy_name
required

Name of the policy that you want to query.

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.7.2.3.3. Responses
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.7.2.3.4. Tags
  • policy.open-cluster-management.io

1.7.2.4. Delete a policy

DELETE /policy.open-cluster-management.io/v1/v1alpha1/namespaces/{namespace}/policies/{policy_name}
1.7.2.4.1. Parameters
TypeNameDescriptionSchema

Header

COOKIE
required

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

string

Path

policy_name
required

Name of the policy that you want to delete.

string

Path

namespace
required

Namespace that you want to use, for example, default.

string

1.7.2.4.2. Responses
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.7.2.4.3. Tags
  • policy.open-cluster-management.io

1.7.3. Definitions

1.7.3.1. Policy

NameDescriptionSchema

apiVersion
required

The versioned schema of Policy.

string

kind
required

String value that represents the REST resource.

string

metadata
required

Describes rules that define the policy.

object

spec

NameDescriptionSchema

remediationAction
optional

Value that represents how violations are handled as defined in the resource.

string

namespace
required

Value that represents which namespaces the policy is applied.

string

policy-templates

NameDescriptionSchema

apiVersion
required

The versioned schema of Policy.

string

kind
optional

String value that represents the REST resource.

string

complianceType
required

The compliance standard.

string

metadata
required

Describes rules that define the policy.

object

clusterConditions
optional

Section to define labels.

string

rules
optional

 

string

selector

NameDescriptionSchema

matchLabels
optional

The label that is required for the policy to be applied to a namespace.

object

cloud
optional

The label that is required for the policy to be applied to a cloud provider.

string

rules

NameDescriptionSchema

apiGroups
required

List of APIs that the rule applies to.

string

resources
required

A list of resource types.

object

verbs
required

A list of verbs.

string