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