이 콘텐츠는 선택한 언어로 제공되지 않습니다.
2.2. Version
Every OpenShift REST API call returns the current API version, and other versions that are supported. The following example shows how to use the
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
cURL
command to return the API version.
curl "https://openshift.redhat.com/broker/rest/api"
$ curl "https://openshift.redhat.com/broker/rest/api"
The following examples show the response for this command in both XML and JSON syntax.
XML Response
JSON Response
If a specific API version is required, the client must include the HTTP header with the response request. The following examples show response requests in both XML and JSON syntax.
XML Clients
Accept: application/xml; version=1.5
Accept: application/xml; version=1.5
JSON Clients
Accept: application/json; version=1.5
Accept: application/json; version=1.5
If the version requested by the client is not supported, the server responds with the HTTP status code 406, as shown in the following examples in XML and JSON syntax.
XML Response for Unsupported Version
JSON Response for Unsupported Version