Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

REST API Reference

OpenShift Container Platform 3.5

OpenShift Container Platform 3.5 REST API for Developers

Red Hat OpenShift Documentation Team

Abstract

The OpenShift Container Platform 3.5 distribution of Kubernetes includes the Kubernetes v1 REST API and the OpenShift v1 REST API. These are RESTful APIs accessible via HTTP(s) on the OpenShift Container Platform master servers.

These REST APIs can be used to manage end-user applications, the cluster, and the users of the cluster.


Chapter 1. Overview

 
The OpenShift Container Platform distribution of Kubernetes includes the Kubernetes v1 REST API and the OpenShift v1 REST API. These are RESTful APIs accessible via HTTP(s) on the OpenShift Container Platform master servers.

These REST APIs can be used to manage end-user applications, the cluster, and the users of the cluster.

1.1. Authentication

API calls must be authenticated with an access token or X.509 certificate. See Authentication in the Architecture documentation for an overview.

This section highlights the token authentication method. With token authentication, a bearer token must be passed in as an HTTP Authorization header. There are two types of access tokens: session and service account.

1.1.1. Session Tokens

A session token is short-lived, expiring within 24 hours by default. It represents a user. After logging in, the session token may be obtained with the oc whoami command:

$ oc login -u test_user
Using project "test".
$ oc whoami --token
dIAo76N-W-GXK3S_w_KsC6DmH3MzP79zq7jbMQvCOUo

1.1.2. Service Account Tokens

Service account tokens are long-lived tokens. They are JSON Web Token (JWT) formatted tokens and are much longer strings than session tokens. See Using a Service Account’s Credentials Externally for steps on using these tokens to authenticate using the CLI.

A service account token may be obtained with these commands:

  1. Create a service account in the current project (test) named robot:

    $ oc create serviceaccount robot
    serviceaccount "robot" created
  2. Grant a role to the service account. In this example, assign the robot service account in the test project the admin role:

    $ oc policy add-role-to-user admin system:serviceaccounts:test:robot
  3. Get the token value:

    $ oc serviceaccounts get-token robot
    eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJpc3YtY2VydCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJpbWctYnVpbGQtdG9rZW4teG1rMHciLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoiaW1nLWJ1aWxkIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiYTJmNzM0NWMtNDA4Zi0xMWU3LTg1NTktMDAxYTRhZTBkZjQ1Iiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50Omlzdi1jZXJ0OmltZy1idWlsZCJ9.Xt5cc9k7fucc7ZAYqt6cz6WvyDhbCZcfHXH-Ow6vStI4Gy7dS3qxIewcXFw8-h1_wkLRUYvyVVYDCRIIbmWL68ybzY2ND8FyuQwCOWP-2_vFvm8xmpjFURZwuNv-eGULNwzOfrSCIelqM2ImCYcM3tpbnyMPeW_KoSI4LGKxXZZqBIcpa9Xb0Zr225uhpZJ2tb_ItuqdOXPUC0GZdHbpbCI0I-Yu-IudCRBHZZ_2SlAi3vbJcvmjpXHfaz49enR602S8ztXF4gXG4_lXa0fS5QYtB0lnIv9q8HXzxKioG_P3O1yD1HqdLYXhZaMNDyg1Xm-5hAkfQ4A7UMPgK4a2zg

The token value may be used in an authorization header to authenticate API calls, the CLI or in the docker login command. Service accounts may be created and deleted as needed with the appropriate role(s) assigned. See Authorization in the Architecture documentation for a deeper discussion on roles.

1.2. Examples

These examples provide a quick reference for making successful REST API calls. They use insecure methods. In these examples, a simple GET call is made to list available resources.

1.2.1. cURL

Example 1.1. Request (Insecure)

$ curl -X GET -H "Authorization: Bearer <token>" https://openshift.redhat.com:8443/oapi/v1 --insecure

Example 1.2. Result (Truncated)

{
  "kind": "APIResourceList",
  "groupVersion": "v1",
  "resources": [
    {
      "name": "buildconfigs",
      "namespaced": true,
      "kind": "BuildConfig"
    },
    {
      "name": "buildconfigs/instantiate",
      "namespaced": true,
      "kind": "BuildRequest"
    },
    {
      "name": "buildconfigs/instantiatebinary",
      "namespaced": true,
      "kind": "BinaryBuildRequestOptions"
    },
    {
      "name": "buildconfigs/webhooks",
      "namespaced": true,
      "kind": "Status"
    },
    {
      "name": "builds",
      "namespaced": true,
      "kind": "Build"
    },
    ...
    {
      "name": "subjectaccessreviews",
      "namespaced": true,
      "kind": "SubjectAccessReview"
    },
    {
      "name": "templates",
      "namespaced": true,
      "kind": "Template"
    },
    {
      "name": "useridentitymappings",
      "namespaced": false,
      "kind": "UserIdentityMapping"
    },
    {
      "name": "users",
      "namespaced": false,
      "kind": "User"
    }
  ]
}

1.2.2. Python

Example 1.3. Interactive Python API Call Using "requests" Module (Insecure)

>>> import requests
>>> url = 'https://openshift.redhat.com:8443/oapi/v1'
>>> headers = {'Authorization': 'Bearer dIAo76N-W-GXK3S_w_KsC6DmH3MzP79zq7jbMQvCOUo'}
>>> requests.get(url, headers=headers, verify=False)
/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:791: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
<Response [200]>

1.2.3. Docker Login

The OpenShift Container Platform integrated Docker registry must be authenticated using either a user session or service account token. The value of the token must be used as the value for the --password argument. The user and email argument values are ignored:

$ docker login -p <token_value> -u unused -e unused <registry>[:<port>]

1.3. Image Signatures

The OpenShift Container Registry allows the users to manipulate the image signatures using its own API. See Accessing Image Signatures Using Registry API for more information.

1.4. Websockets and Watching for Changes

The API is designed to work via the websocket protocol. API requests may take the form of "one-shot" calls to list resources or by passing in query parameter watch=true. When watching an endpoint, changes to the system may be observed through an open endpoint. Using callbacks, dynamic systems may be developed that integrate with the API.

For more information and examples, see the Mozilla Developer Network page on Writing WebSocket client applications.

Chapter 2. OpenShift Container Platform v1 REST API

2.1. Overview

The OpenShift Container Platform API exposes operations for managing an enterprise Kubernetes cluster, including security and user management, application deployments, image and source builds, HTTP(s) routing, and project management.

2.1.1. Version information

Version: v1

2.1.2. URI scheme

Host: 127.0.0.1:8443 BasePath: / Schemes: HTTPS

2.2. Paths

2.2.1. get available resources

GET /oapi/v1

2.2.1.1. Responses

HTTP CodeDescriptionSchema

default

success

Section 2.3.5, “unversioned.APIResourceList”

2.2.1.2. Consumes

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.1.3. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.1.4. Tags

  • oapiv1

2.2.2. list objects of kind AppliedClusterResourceQuota

GET /oapi/v1/appliedclusterresourcequotas

2.2.2.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.2.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.15, “v1.AppliedClusterResourceQuotaList”

2.2.2.3. Consumes

  • /

2.2.2.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf
  • application/json;stream=watch
  • application/vnd.kubernetes.protobuf;stream=watch

2.2.2.5. Tags

  • oapiv1

2.2.3. list or watch objects of kind BuildConfig

GET /oapi/v1/buildconfigs

2.2.3.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.3.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.22, “v1.BuildConfigList”

2.2.3.3. Consumes

  • /

2.2.3.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf
  • application/json;stream=watch
  • application/vnd.kubernetes.protobuf;stream=watch

2.2.3.5. Tags

  • oapiv1

2.2.4. create a BuildConfig

POST /oapi/v1/buildconfigs

2.2.4.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.21, “v1.BuildConfig”

 

2.2.4.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.21, “v1.BuildConfig”

2.2.4.3. Consumes

  • /

2.2.4.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.4.5. Tags

  • oapiv1

2.2.5. list or watch objects of kind Build

GET /oapi/v1/builds

2.2.5.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.5.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.25, “v1.BuildList”

2.2.5.3. Consumes

  • /

2.2.5.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf
  • application/json;stream=watch
  • application/vnd.kubernetes.protobuf;stream=watch

2.2.5.5. Tags

  • oapiv1

2.2.6. create a Build

POST /oapi/v1/builds

2.2.6.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.20, “v1.Build”

 

2.2.6.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.20, “v1.Build”

2.2.6.3. Consumes

  • /

2.2.6.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.6.5. Tags

  • oapiv1

2.2.7. delete collection of ClusterNetwork

DELETE /oapi/v1/clusternetworks

2.2.7.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.7.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.10, “unversioned.Status”

2.2.7.3. Consumes

  • /

2.2.7.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.7.5. Tags

  • oapiv1

2.2.8. list or watch objects of kind ClusterNetwork

GET /oapi/v1/clusternetworks

2.2.8.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.8.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.43, “v1.ClusterNetworkList”

2.2.8.3. Consumes

  • /

2.2.8.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf
  • application/json;stream=watch
  • application/vnd.kubernetes.protobuf;stream=watch

2.2.8.5. Tags

  • oapiv1

2.2.9. create a ClusterNetwork

POST /oapi/v1/clusternetworks

2.2.9.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.42, “v1.ClusterNetwork”

 

2.2.9.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.42, “v1.ClusterNetwork”

2.2.9.3. Consumes

  • /

2.2.9.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.9.5. Tags

  • oapiv1

2.2.10. delete a ClusterNetwork

DELETE /oapi/v1/clusternetworks/{name}

2.2.10.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.64, “v1.DeleteOptions”

 

QueryParameter

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer

 

QueryParameter

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

 

PathParameter

name

name of the ClusterNetwork

true

string

 

2.2.10.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.10, “unversioned.Status”

2.2.10.3. Consumes

  • /

2.2.10.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.10.5. Tags

  • oapiv1

2.2.11. replace the specified ClusterNetwork

PUT /oapi/v1/clusternetworks/{name}

2.2.11.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.42, “v1.ClusterNetwork”

 

PathParameter

name

name of the ClusterNetwork

true

string

 

2.2.11.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.42, “v1.ClusterNetwork”

2.2.11.3. Consumes

  • /

2.2.11.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.11.5. Tags

  • oapiv1

2.2.12. read the specified ClusterNetwork

GET /oapi/v1/clusternetworks/{name}

2.2.12.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

export

Should this value be exported. Export strips fields that a user can not specify.

false

boolean

 

QueryParameter

exact

Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'

false

boolean

 

PathParameter

name

name of the ClusterNetwork

true

string

 

2.2.12.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.42, “v1.ClusterNetwork”

2.2.12.3. Consumes

  • /

2.2.12.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.12.5. Tags

  • oapiv1

2.2.13. partially update the specified ClusterNetwork

PATCH /oapi/v1/clusternetworks/{name}

2.2.13.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.9, “unversioned.Patch”

 

PathParameter

name

name of the ClusterNetwork

true

string

 

2.2.13.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.42, “v1.ClusterNetwork”

2.2.13.3. Consumes

  • application/json-patch+json
  • application/merge-patch+json
  • application/strategic-merge-patch+json

2.2.13.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.13.5. Tags

  • oapiv1

2.2.14. delete collection of ClusterPolicy

DELETE /oapi/v1/clusterpolicies

2.2.14.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.14.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.10, “unversioned.Status”

2.2.14.3. Consumes

  • /

2.2.14.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.14.5. Tags

  • oapiv1

2.2.15. list or watch objects of kind ClusterPolicy

GET /oapi/v1/clusterpolicies

2.2.15.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.15.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.47, “v1.ClusterPolicyList”

2.2.15.3. Consumes

  • /

2.2.15.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf
  • application/json;stream=watch
  • application/vnd.kubernetes.protobuf;stream=watch

2.2.15.5. Tags

  • oapiv1

2.2.16. create a ClusterPolicy

POST /oapi/v1/clusterpolicies

2.2.16.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.44, “v1.ClusterPolicy”

 

2.2.16.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.44, “v1.ClusterPolicy”

2.2.16.3. Consumes

  • /

2.2.16.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.16.5. Tags

  • oapiv1

2.2.17. delete a ClusterPolicy

DELETE /oapi/v1/clusterpolicies/{name}

2.2.17.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.64, “v1.DeleteOptions”

 

QueryParameter

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer

 

QueryParameter

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

 

PathParameter

name

name of the ClusterPolicy

true

string

 

2.2.17.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.10, “unversioned.Status”

2.2.17.3. Consumes

  • /

2.2.17.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.17.5. Tags

  • oapiv1

2.2.18. replace the specified ClusterPolicy

PUT /oapi/v1/clusterpolicies/{name}

2.2.18.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.44, “v1.ClusterPolicy”

 

PathParameter

name

name of the ClusterPolicy

true

string

 

2.2.18.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.44, “v1.ClusterPolicy”

2.2.18.3. Consumes

  • /

2.2.18.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.18.5. Tags

  • oapiv1

2.2.19. read the specified ClusterPolicy

GET /oapi/v1/clusterpolicies/{name}

2.2.19.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

export

Should this value be exported. Export strips fields that a user can not specify.

false

boolean

 

QueryParameter

exact

Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'

false

boolean

 

PathParameter

name

name of the ClusterPolicy

true

string

 

2.2.19.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.44, “v1.ClusterPolicy”

2.2.19.3. Consumes

  • /

2.2.19.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.19.5. Tags

  • oapiv1

2.2.20. partially update the specified ClusterPolicy

PATCH /oapi/v1/clusterpolicies/{name}

2.2.20.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.9, “unversioned.Patch”

 

PathParameter

name

name of the ClusterPolicy

true

string

 

2.2.20.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.44, “v1.ClusterPolicy”

2.2.20.3. Consumes

  • application/json-patch+json
  • application/merge-patch+json
  • application/strategic-merge-patch+json

2.2.20.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.20.5. Tags

  • oapiv1

2.2.21. delete collection of ClusterPolicyBinding

DELETE /oapi/v1/clusterpolicybindings

2.2.21.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.21.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.10, “unversioned.Status”

2.2.21.3. Consumes

  • /

2.2.21.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.21.5. Tags

  • oapiv1

2.2.22. list or watch objects of kind ClusterPolicyBinding

GET /oapi/v1/clusterpolicybindings

2.2.22.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.22.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.46, “v1.ClusterPolicyBindingList”

2.2.22.3. Consumes

  • /

2.2.22.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf
  • application/json;stream=watch
  • application/vnd.kubernetes.protobuf;stream=watch

2.2.22.5. Tags

  • oapiv1

2.2.23. create a ClusterPolicyBinding

POST /oapi/v1/clusterpolicybindings

2.2.23.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.45, “v1.ClusterPolicyBinding”

 

2.2.23.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.45, “v1.ClusterPolicyBinding”

2.2.23.3. Consumes

  • /

2.2.23.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.23.5. Tags

  • oapiv1

2.2.24. delete a ClusterPolicyBinding

DELETE /oapi/v1/clusterpolicybindings/{name}

2.2.24.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.64, “v1.DeleteOptions”

 

QueryParameter

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer

 

QueryParameter

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

 

PathParameter

name

name of the ClusterPolicyBinding

true

string

 

2.2.24.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.10, “unversioned.Status”

2.2.24.3. Consumes

  • /

2.2.24.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.24.5. Tags

  • oapiv1

2.2.25. replace the specified ClusterPolicyBinding

PUT /oapi/v1/clusterpolicybindings/{name}

2.2.25.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.45, “v1.ClusterPolicyBinding”

 

PathParameter

name

name of the ClusterPolicyBinding

true

string

 

2.2.25.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.45, “v1.ClusterPolicyBinding”

2.2.25.3. Consumes

  • /

2.2.25.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.25.5. Tags

  • oapiv1

2.2.26. read the specified ClusterPolicyBinding

GET /oapi/v1/clusterpolicybindings/{name}

2.2.26.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

export

Should this value be exported. Export strips fields that a user can not specify.

false

boolean

 

QueryParameter

exact

Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'

false

boolean

 

PathParameter

name

name of the ClusterPolicyBinding

true

string

 

2.2.26.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.45, “v1.ClusterPolicyBinding”

2.2.26.3. Consumes

  • /

2.2.26.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.26.5. Tags

  • oapiv1

2.2.27. partially update the specified ClusterPolicyBinding

PATCH /oapi/v1/clusterpolicybindings/{name}

2.2.27.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.9, “unversioned.Patch”

 

PathParameter

name

name of the ClusterPolicyBinding

true

string

 

2.2.27.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.45, “v1.ClusterPolicyBinding”

2.2.27.3. Consumes

  • application/json-patch+json
  • application/merge-patch+json
  • application/strategic-merge-patch+json

2.2.27.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.27.5. Tags

  • oapiv1

2.2.28. delete collection of ClusterResourceQuota

DELETE /oapi/v1/clusterresourcequotas

2.2.28.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.28.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.10, “unversioned.Status”

2.2.28.3. Consumes

  • /

2.2.28.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.28.5. Tags

  • oapiv1

2.2.29. list or watch objects of kind ClusterResourceQuota

GET /oapi/v1/clusterresourcequotas

2.2.29.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.29.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.49, “v1.ClusterResourceQuotaList”

2.2.29.3. Consumes

  • /

2.2.29.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf
  • application/json;stream=watch
  • application/vnd.kubernetes.protobuf;stream=watch

2.2.29.5. Tags

  • oapiv1

2.2.30. create a ClusterResourceQuota

POST /oapi/v1/clusterresourcequotas

2.2.30.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.48, “v1.ClusterResourceQuota”

 

2.2.30.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.48, “v1.ClusterResourceQuota”

2.2.30.3. Consumes

  • /

2.2.30.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.30.5. Tags

  • oapiv1

2.2.31. delete a ClusterResourceQuota

DELETE /oapi/v1/clusterresourcequotas/{name}

2.2.31.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.64, “v1.DeleteOptions”

 

QueryParameter

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer

 

QueryParameter

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

 

PathParameter

name

name of the ClusterResourceQuota

true

string

 

2.2.31.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.10, “unversioned.Status”

2.2.31.3. Consumes

  • /

2.2.31.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.31.5. Tags

  • oapiv1

2.2.32. replace the specified ClusterResourceQuota

PUT /oapi/v1/clusterresourcequotas/{name}

2.2.32.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.48, “v1.ClusterResourceQuota”

 

PathParameter

name

name of the ClusterResourceQuota

true

string

 

2.2.32.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.48, “v1.ClusterResourceQuota”

2.2.32.3. Consumes

  • /

2.2.32.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.32.5. Tags

  • oapiv1

2.2.33. read the specified ClusterResourceQuota

GET /oapi/v1/clusterresourcequotas/{name}

2.2.33.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

export

Should this value be exported. Export strips fields that a user can not specify.

false

boolean

 

QueryParameter

exact

Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'

false

boolean

 

PathParameter

name

name of the ClusterResourceQuota

true

string

 

2.2.33.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.48, “v1.ClusterResourceQuota”

2.2.33.3. Consumes

  • /

2.2.33.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.33.5. Tags

  • oapiv1

2.2.34. partially update the specified ClusterResourceQuota

PATCH /oapi/v1/clusterresourcequotas/{name}

2.2.34.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.9, “unversioned.Patch”

 

PathParameter

name

name of the ClusterResourceQuota

true

string

 

2.2.34.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.48, “v1.ClusterResourceQuota”

2.2.34.3. Consumes

  • application/json-patch+json
  • application/merge-patch+json
  • application/strategic-merge-patch+json

2.2.34.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.34.5. Tags

  • oapiv1

2.2.35. replace status of the specified ClusterResourceQuota

PUT /oapi/v1/clusterresourcequotas/{name}/status

2.2.35.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.48, “v1.ClusterResourceQuota”

 

PathParameter

name

name of the ClusterResourceQuota

true

string

 

2.2.35.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.48, “v1.ClusterResourceQuota”

2.2.35.3. Consumes

  • /

2.2.35.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.35.5. Tags

  • oapiv1

2.2.36. read status of the specified ClusterResourceQuota

GET /oapi/v1/clusterresourcequotas/{name}/status

2.2.36.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

PathParameter

name

name of the ClusterResourceQuota

true

string

 

2.2.36.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.48, “v1.ClusterResourceQuota”

2.2.36.3. Consumes

  • /

2.2.36.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.36.5. Tags

  • oapiv1

2.2.37. partially update status of the specified ClusterResourceQuota

PATCH /oapi/v1/clusterresourcequotas/{name}/status

2.2.37.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.9, “unversioned.Patch”

 

PathParameter

name

name of the ClusterResourceQuota

true

string

 

2.2.37.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.48, “v1.ClusterResourceQuota”

2.2.37.3. Consumes

  • application/json-patch+json
  • application/merge-patch+json
  • application/strategic-merge-patch+json

2.2.37.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.37.5. Tags

  • oapiv1

2.2.38. list objects of kind ClusterRoleBinding

GET /oapi/v1/clusterrolebindings

2.2.38.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

 

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

 

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

 

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

 

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer

 

2.2.38.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.55, “v1.ClusterRoleBindingList”

2.2.38.3. Consumes

  • /

2.2.38.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf
  • application/json;stream=watch
  • application/vnd.kubernetes.protobuf;stream=watch

2.2.38.5. Tags

  • oapiv1

2.2.39. create a ClusterRoleBinding

POST /oapi/v1/clusterrolebindings

2.2.39.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.54, “v1.ClusterRoleBinding”

 

2.2.39.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.54, “v1.ClusterRoleBinding”

2.2.39.3. Consumes

  • /

2.2.39.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.39.5. Tags

  • oapiv1

2.2.40. delete a ClusterRoleBinding

DELETE /oapi/v1/clusterrolebindings/{name}

2.2.40.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.64, “v1.DeleteOptions”

 

QueryParameter

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer

 

QueryParameter

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

 

PathParameter

name

name of the ClusterRoleBinding

true

string

 

2.2.40.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.10, “unversioned.Status”

2.2.40.3. Consumes

  • /

2.2.40.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.40.5. Tags

  • oapiv1

2.2.41. replace the specified ClusterRoleBinding

PUT /oapi/v1/clusterrolebindings/{name}

2.2.41.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.54, “v1.ClusterRoleBinding”

 

PathParameter

name

name of the ClusterRoleBinding

true

string

 

2.2.41.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.54, “v1.ClusterRoleBinding”

2.2.41.3. Consumes

  • /

2.2.41.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.41.5. Tags

  • oapiv1

2.2.42. read the specified ClusterRoleBinding

GET /oapi/v1/clusterrolebindings/{name}

2.2.42.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

PathParameter

name

name of the ClusterRoleBinding

true

string

 

2.2.42.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.54, “v1.ClusterRoleBinding”

2.2.42.3. Consumes

  • /

2.2.42.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.42.5. Tags

  • oapiv1

2.2.43. partially update the specified ClusterRoleBinding

PATCH /oapi/v1/clusterrolebindings/{name}

2.2.43.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If 'true', then the output is pretty printed.

false

string

 

BodyParameter

body

 

true

Section 2.3.9, “unversioned.Patch”

 

PathParameter

name

name of the ClusterRoleBinding

true

string

 

2.2.43.2. Responses

HTTP CodeDescriptionSchema

200

success

Section 2.3.54, “v1.ClusterRoleBinding”

2.2.43.3. Consumes

  • application/json-patch+json
  • application/merge-patch+json
  • application/strategic-merge-patch+json

2.2.43.4. Produces

  • application/json
  • application/yaml
  • application/vnd.kubernetes.protobuf

2.2.43.5. Tags

  • oapiv1

2.2.44. list objects of kind ClusterRole

GET /oapi/v1/clusterroles

2.2.44.1. Parameters

TypeNameDescriptionRequiredSchemaDefault

QueryParameter