Este contenido no está disponible en el idioma seleccionado.
REST API Guide
Reference documentation for OpenShift Enterprise Representational State Transfer Application Programming Interface (REST API)
Abstract
Chapter 1. Introduction to OpenShift Enterprise Copiar enlaceEnlace copiado en el portapapeles!
1.1. Introduction to OpenShift API Copiar enlaceEnlace copiado en el portapapeles!
Note
1.2. Introduction to Representational State Transfer (REST) Copiar enlaceEnlace copiado en el portapapeles!
GET
, POST
, PUT
, and DELETE
.
Chapter 2. General API Information Copiar enlaceEnlace copiado en el portapapeles!
2.1. Authentication Copiar enlaceEnlace copiado en el portapapeles!
With Basic Authentication a client is required to send the user name and password, separated by a colon, with all requests to correctly authenticate. This string is encoded with Base64 algorithm and transmitted in the HTTP authorization header in the following formats.
- Ruby
require 'base64' base64string = Base64.encode64("#{username}:#{password}").strip headers = { "Authorization" => "Basic #{base64string}" }
require 'base64' base64string = Base64.encode64("#{username}:#{password}").strip headers = { "Authorization" => "Basic #{base64string}" }
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Python
import base64 base64string = base64.encodestring('%s:%s' % (username, password))[:-1] request.add_header("Authorization", "Basic %s" % base64string)
import base64 base64string = base64.encodestring('%s:%s' % (username, password))[:-1] request.add_header("Authorization", "Basic %s" % base64string)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- cURL
- The cURL library supports basic authentication using the
--user
option, as shown in the following example.curl https://openshift.redhat.com/broker/rest/user --user user@example.com
$ curl https://openshift.redhat.com/broker/rest/user --user user@example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
You can also use authorization tokens to authenticate with the remote server instead of your user name and password. However, before you can use an authorization token you must first create one with the appropriate scope option. See Chapter 6, Authorizations for more information on creating and managing authorization tokens.
curl https://openshift.redhat.com/broker/rest/user -H "Authorization: Bearer token_id"
$ curl https://openshift.redhat.com/broker/rest/user -H "Authorization: Bearer token_id"curl https://openshift.redhat.com/broker/rest/user -H "Authorization: Bearer token_id"curl https://openshift.redhat.com/broker/rest/user -H "Authorization: Bearer token_id"
Example 2.1. cURL Command with Authorization Token
curl -X DELETE https://openshift.redhat.com/broker/rest/application/5406971c5973ca2a7f0000c6 -H "Authorization: Bearer 14fc97947174a911c3d1154aa846197cbc18ad550d7ad1cdd58aab105e65783a"
curl -X DELETE https://openshift.redhat.com/broker/rest/application/5406971c5973ca2a7f0000c6 -H "Authorization: Bearer 14fc97947174a911c3d1154aa846197cbc18ad550d7ad1cdd58aab105e65783a"
2.2. Version Copiar enlaceEnlace copiado en el portapapeles!
cURL
command to return the API version.
curl "https://openshift.redhat.com/broker/rest/api"
$ curl "https://openshift.redhat.com/broker/rest/api"
Accept: application/xml; version=1.5
Accept: application/xml; version=1.5
Accept: application/json; version=1.5
Accept: application/json; version=1.5
2.4. Response Information Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
status | HTTP status text. Examples include ok or not_found |
data | The data requested from the API. This is null in cases where there is no data to return |
type | Type of data. For example, application or cartridge. This is null in cases where there is no data to return |
messages | An array of messages returned to the client. See Section 2.5, “Messages” for more information on API messages |
API version | API version requested by the client and returned by the API. Defaults to latest if the version is not specified. See Section 2.2, “Version” for more information |
supported API versions | An array of supported API versions |
2.5. Messages Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
severity | Message severity. Examples include debug, info, warning, error, and result |
text | Text of the message |
field | Indicates the message is relevant to a particular field in the resource. Used for validation errors and can be null |
exit code | Exit code returned by the API. 0 if there are no issues |
Note
severity
=result contain information that is passed to the user. Examples include database user names and passwords.
2.6. Response Type Copiar enlaceEnlace copiado en el portapapeles!
Accept: application/xml
Accept: application/xml
headers = {"Accept" => "application/xml"}
headers = {"Accept" => "application/xml"}
request.add_header("Accept", "application/xml")
request.add_header("Accept", "application/xml")
curl "https://openshift.redhat.com/broker/rest/api" -H "Accept: application/xml"
curl "https://openshift.redhat.com/broker/rest/api" -H "Accept: application/xml"
2.7. Status Codes Copiar enlaceEnlace copiado en el portapapeles!
Code | Text | Description |
---|---|---|
200 | OK | Standard response for successful HTTP requests. |
201 | Created | The resource was successfully created. |
204 | No content | The requested delete operation was successful. |
301 | Moved Permanently | The resource has moved, and all future requests should be made to the new URI. |
400 | Bad Request | Invalid request due to bad syntax. |
401 | Unauthorized | Authentication has failed, or was not provided. |
403 | Forbidden | The request is understood, but server is refusing to respond. |
404 | Not Found | The requested resource cannot be found. |
406 | Not Acceptable | The content from the requested resource is not acceptable according to the Accept headers. Possibly due to version requested, or it no longer being supported. |
409 | Conflict | The request could not be processed because of conflict in the request. |
410 | Gone | The resource is no longer available, and will not be available again. |
422 | Unprocessable Entity | The request was well formed, but was not followed due to semantic errors. |
500 | Internal Server Error | A generic error message when something is broken. |
502 | Bad Gateway | Server was acting as a gateway or proxy, and received an invalid response. |
503 | Service Unavailable | The server is currently unavailable; possibly down for maintenance. |
504 | Gateway Timeout | The server was acting as a gateway or proxy and did not receive a timely response. |
Chapter 3. API Entry Point Copiar enlaceEnlace copiado en el portapapeles!
Interaction with the OpenShift API begins with a request to the URL for the API entry point. The entry point provides navigation links to resources for a client to manage an OpenShift cloud environment.
Method | URL Structure |
---|---|
GET | /broker/rest/api |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/api
$ curl -X GET https://openshift.redhat.com/broker/rest/api
The OpenShift API resources are returned. Unnecessary information has been left out for brevity.
Chapter 4. User Information Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
capabilities | Map of user capabilities. See the following table for user capabilities. |
consumed_gears | Total number of gears consumed by all applications owned by user. |
login | Account user name. |
max_gears | Maximum number of gears available to the specified user. |
max_teams | Maximum number of teams a user can create. |
plan_id | Subscription plan of the specified user. |
plan_state | State of the account for the specified user. |
Name | Description |
---|---|
plan_upgrade_enabled | Indicates whether the user is on an upgraded plan. |
subaccounts | Indicates whether the user has the ability to create subaccounts. |
gear_sizes | Available gear sizes depending on the type of plan. |
max_storage_per_gear | Maximum storage in gigabytes available per gear to the specified user. |
private_ssl_certificates | Subscription plan of the specified user. |
4.1. View User Information Copiar enlaceEnlace copiado en el portapapeles!
Provides resource links to view user information, and manage user SSH keys.
Method | Resource URL |
---|---|
GET | /broker/rest/user |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/user --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/user --user user@example.com:password
The API returns the user information resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 4, User Information for more information on all user information parameters.
4.2. Parent and Child Accounts Copiar enlaceEnlace copiado en el portapapeles!
4.2.1. Delete Child Account Copiar enlaceEnlace copiado en el portapapeles!
Delete the specified child user account, if one exists.
Note
Method | Resource URL |
---|---|
DELETE | /broker/rest/user |
Not applicable
curl -X DELETE https://openshift.redhat.com/broker/rest/user -d --user child_user:password
$ curl -X DELETE https://openshift.redhat.com/broker/rest/user -d --user child_user:password
No content is returned from a successful DELETE
operation.
Chapter 5. SSH Keys Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
name | Name of the SSH key as specific by the user. |
content | Content of the public SSH key. |
type | Type of SSH key; for example, RSA or DSA. . |
5.1. Add SSH Key Copiar enlaceEnlace copiado en el portapapeles!
Add an SSH key to the specified user account.
Method | Resource URL |
---|---|
POST | /broker/rest/user/keys |
Name | Description | Required | Default |
---|---|---|---|
name | Name of key | Yes | |
type | Type of SSH key | Yes | |
content | The key portion (excluding ssh-rsa and comment) | Yes |
{ "name": "mysshkey", "type": "ssh-rsa", "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtWQcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+BMOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M+n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3" }
{
"name": "mysshkey",
"type": "ssh-rsa",
"content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtWQcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+BMOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M+n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3"
}
curl -X POST https://openshift.redhat.com/broker/rest/user/keys --user user@example.com:password --data-urlencode name=mysshkey --data-urlencode type=ssh-rsa --data-urlencode content=AAAAB3NzaC1yc2EhyuiBIwAAAQEA14PDPWsaZMDspZNK7ABsppzwy++Ih2tRwjBkxzC2KEcQi7v8IcyODb7qLJ72tgx3G90zRm7vQ6wuyy7rkYLIvTYiDnchy68ikjyt7wuBuSCgFcHLUdon7xn7VrskjhMN4pae6bjaY1+o4Knpfm3N72+9q/6+T52QIWCE1+Ku6UYYuOGy8qWynddw24bp4jGEKAXqTXcALuBoukC3uB+hrxvZYH1fbek6aEAQPYzO6sGqJqV1UoF0ascelhtyui8kadrKPr/5uJsPS+kGZguU16ykQb2k9K03JMSfvPP4rLe50Q9G4dSZFbUOQXdC3n13CqvsEVzizUGl0HyT8MhRqw==
$ curl -X POST https://openshift.redhat.com/broker/rest/user/keys --user user@example.com:password --data-urlencode name=mysshkey --data-urlencode type=ssh-rsa --data-urlencode content=AAAAB3NzaC1yc2EhyuiBIwAAAQEA14PDPWsaZMDspZNK7ABsppzwy++Ih2tRwjBkxzC2KEcQi7v8IcyODb7qLJ72tgx3G90zRm7vQ6wuyy7rkYLIvTYiDnchy68ikjyt7wuBuSCgFcHLUdon7xn7VrskjhMN4pae6bjaY1+o4Knpfm3N72+9q/6+T52QIWCE1+Ku6UYYuOGy8qWynddw24bp4jGEKAXqTXcALuBoukC3uB+hrxvZYH1fbek6aEAQPYzO6sGqJqV1UoF0ascelhtyui8kadrKPr/5uJsPS+kGZguU16ykQb2k9K03JMSfvPP4rLe50Q9G4dSZFbUOQXdC3n13CqvsEVzizUGl0HyT8MhRqw==
The API returns the key resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 5, SSH Keys for more information on all SSH key parameters.
5.2. List User SSH Keys Copiar enlaceEnlace copiado en el portapapeles!
Get a list of SSH keys for an OpenShift user.
Method | Resource URL |
---|---|
GET | /broker/rest/user/keys |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/user/keys --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/user/keys --user user@example.com:password
The API returns the key resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 5, SSH Keys for more information on all SSH key parameters.
5.3. Get SSH Key Information Copiar enlaceEnlace copiado en el portapapeles!
View the contents of an SSH key.
Method | Resource URL |
---|---|
GET | /broker/rest/user/keys/:name |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/user/keys/mysshkey --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/user/keys/mysshkey --user user@example.com:password
The API returns the key resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 5, SSH Keys for more information on all SSH key parameters.
5.4. Update SSH Key Copiar enlaceEnlace copiado en el portapapeles!
Update the contents of an existing SSH key.
Method | Resource URL |
---|---|
PUT | /broker/rest/user/keys/:name |
Name | Description | Required | Default |
---|---|---|---|
type | Type of key | Yes | |
content | The key portion of an rsa key (excluding ssh-rsa and comment) | Yes |
{ "type": "ssh-rsa", "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtWQcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+BMOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M+n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3" }
{
"type": "ssh-rsa",
"content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtWQcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+BMOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M+n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3"
}
curl -X PUT https://openshift.redhat.com/broker/rest/user/keys/mysshkey --user user@example.com:password --data-urlencode type=ssh-rsa --data-urlencode content=AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtWQcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+BMOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M+n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3
$ curl -X PUT https://openshift.redhat.com/broker/rest/user/keys/mysshkey --user user@example.com:password --data-urlencode type=ssh-rsa --data-urlencode content=AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtWQcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+BMOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M+n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3
Note
The API returns the key resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 5, SSH Keys for more information on all SSH key parameters.
5.5. Delete SSH Key Copiar enlaceEnlace copiado en el portapapeles!
Delete an SSH key from a user account.
Method | Resource URL |
---|---|
DELETE | /broker/rest/user/keys/:name |
Not applicable
curl -X DELETE https://openshift.redhat.com/broker/rest/user/keys/mysshkey --user user@example.com:password
$ curl -X DELETE https://openshift.redhat.com/broker/rest/user/keys/mysshkey --user user@example.com:password
Chapter 6. Authorizations Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
id | Unique OpenShift login that created this authorization token. |
scope | Scope of the authorization token to determine type of access. Scopes that are supported by a server are described in the ADD_AUTHORIZATION resource link and may be different for each server. |
note | A reminder description of what the authorization is for. |
expires_in | Total time in seconds before this authorization expires. Out of range values will be set to the maximum allowed time. |
expires_in_seconds | Remaining time in seconds before this authorization expires. |
reuse | Attempt to locate and reuse an authorization that matches the scope and note and has not yet expired. |
token | Authorization string that contains user credentials. |
scope
options that determine the type of access a user is granted with an authorization.
Name | Description |
---|---|
session | Grants a client the authority to perform all API actions against an account. Valid for one day. |
read | Access to the API is read-only, while authorization endpoints cannot be read. |
userinfo | Only read access to the /user API resource is provided. |
6.1. Add an Authorization Copiar enlaceEnlace copiado en el portapapeles!
Add an authorization to the specified user account.
Method | URL Structure |
---|---|
POST | /broker/rest/user/authorizations |
Name | Description | Required | Default |
---|---|---|---|
scope | Scope of the authorization | No | userinfo |
note | Reminder description of authorization | No | |
expires_in | Number of seconds before authorization expires | No | -1 [a] |
reuse | Attempt to locate and reuse an authorization matching scope and note and has not expired | No | false |
[a]
For invalid values, the default is determined by the server.
|
curl -X POST https://openshift.redhat.com/broker/rest/user/authorizations --user user@example.com:password --data-urlencode scope=userinfo --data-urlencode note=This is my UPDATED note to myself --data-urlencode expires_in=-1 --data-urlencode reuse=false
$ curl -X POST https://openshift.redhat.com/broker/rest/user/authorizations --user user@example.com:password --data-urlencode scope=userinfo --data-urlencode note=This is my UPDATED note to myself --data-urlencode expires_in=-1 --data-urlencode reuse=false
The related resource links returned by the API have been left out for brevity. See Chapter 6, Authorizations for more information on all authorization parameters.
6.2. List Authorizations Copiar enlaceEnlace copiado en el portapapeles!
List all authorizations for the specified user account and provide the client with additional resource links to manage existing authorizations.
Method | URL Structure |
---|---|
GET | /broker/rest/user/authorizations |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/user/authorizations --user user@example.com:password"
$ curl -X GET https://openshift.redhat.com/broker/rest/user/authorizations --user user@example.com:password"
The API returns the authorizations resource with related resource links which have been left out for brevity. No resource links are returned if the user account does not contain any authorizations. See Chapter 6, Authorizations for more information on all authorization parameters.
6.3. Get Authorization Information Copiar enlaceEnlace copiado en el portapapeles!
Get information about the specified authorization.
Method | URL Structure |
---|---|
GET | /broker/rest/user/authorizations/:id |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/user/authorizations/52141fa2e499b2229e00009b --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/user/authorizations/52141fa2e499b2229e00009b --user user@example.com:password
The API returns information about the specified authorization and related resource links which have been left out for brevity. See Chapter 6, Authorizations for more information on all authorization parameters.
6.4. Update an Authorization Copiar enlaceEnlace copiado en el portapapeles!
Update an existing authorization for the specified user account. However, currently this operation only supports updating the note
parameter of an existing authorization.
Method | URL Structure |
---|---|
PUT | /broker/rest/user/authorizations/:id |
Name | Description | Required | Default |
---|---|---|---|
note | Reminder description of authorization. | Yes |
curl -X PUT https://openshift.redhat.com/broker/rest/user/authorizations/52141fa2e499b2229e00009b --user user@example.com:password --data-urlencode note=This is a note to myself
$ curl -X PUT https://openshift.redhat.com/broker/rest/user/authorizations/52141fa2e499b2229e00009b --user user@example.com:password --data-urlencode note=This is a note to myself
The API returns the authorizations resource with related resource links which have been left out for brevity. See Chapter 6, Authorizations for more information on all authorization parameters.
6.5. Delete an Authorization Copiar enlaceEnlace copiado en el portapapeles!
Delete the specified authorization.
Method | URL Structure |
---|---|
DELETE | /broker/rest/user/authorizations/:id |
Not applicable
curl -X DELETE https://openshift.redhat.com/broker/rest/user/authorizations/52141fa2e499b2229e00009b --user user@example.com:password
$ curl -X DELETE https://openshift.redhat.com/broker/rest/user/authorizations/52141fa2e499b2229e00009b --user user@example.com:password
The API returns confirmation of a successful DELETE
operation.
Chapter 7. Domains Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
name | Name of the domain |
suffix | Domain suffix |
allowed_gear_sizes | Array of zero or more gear sizes allowed on this domain |
7.1. Create a Domain Copiar enlaceEnlace copiado en el portapapeles!
Create a new domain for an OpenShift user account. Note that a domain is required to create applications on OpenShift Enterprise.
Method | URL Structure |
---|---|
POST | /broker/rest/domains |
Name | Description | Required | Default |
---|---|---|---|
name | Name of domain | Yes | |
allowed_gear_sizes | List of gear sizes that can be created on this domain | No |
{ "name": "mydomain", "allowed_gear_sizes": "small" }
{
"name": "mydomain",
"allowed_gear_sizes": "small"
}
curl -X POST https://openshift.redhat.com/broker/rest/domains/ --user user@example.com:password --data-urlencode name=mydomain --data-urlencode allowed_gear_sizes=small
$ curl -X POST https://openshift.redhat.com/broker/rest/domains/ --user user@example.com:password --data-urlencode name=mydomain --data-urlencode allowed_gear_sizes=small
The API returns the domain resource with related resource links which have been left out for brevity. See Chapter 7, Domains for more information on all domain parameters.
7.2. List Domains Copiar enlaceEnlace copiado en el portapapeles!
Get a list of all domains accessible to the user, regardless of ownership.
Method | URL Structure |
---|---|
GET | /broker/rest/domains |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/domains --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/domains --user user@example.com:password
The API returns a list of all domains that you have access to. The related resource links returned by the API have been left out for brevity.
7.3. List Domains by Owner Copiar enlaceEnlace copiado en el portapapeles!
Get a list of domains owned by a particular user, specified with the owner
parameter. If no owner is specified, it automatically defaults to self.
Method | URL Structure |
---|---|
GET | /broker/rest/domains |
Name | Description | Required | Default |
---|---|---|---|
owner | List domains owned by specified user, or @self for current user | Yes |
{ "owner": "@self" }
{
"owner": "@self"
}
curl -X GET https://openshift.redhat.com/broker/rest/domains --user user@example.com:password --data-urlencode owner=@self
$ curl -X GET https://openshift.redhat.com/broker/rest/domains --user user@example.com:password --data-urlencode owner=@self
The API returns a list of domains owned by the specified user. The related resource links returned by the API have been left out for brevity.
7.4. Get Domain Information Copiar enlaceEnlace copiado en el portapapeles!
Get information about an existing domain.
Method | URL Structure |
---|---|
GET | /broker/rest/domains/:name |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/domains/mydomain --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/domains/mydomain --user user@example.com:password
The API returns the domain resource with related resource links which have been left out for brevity. See Chapter 7, Domains for more information on all domain resource parameters.
7.5. Update Domain Copiar enlaceEnlace copiado en el portapapeles!
Update an existing domain.
Method | URL Structure |
---|---|
PUT | /broker/rest/domains/:name |
Name | Description | Required | Default |
---|---|---|---|
name | Name of domain | Yes | |
allowed_gear_sizes | Array of zero or more gear sizes allowed on this domain | No |
{ "name": "mydomainX", "allowed_gear_sizes": "small" }
{
"name": "mydomainX",
"allowed_gear_sizes": "small"
}
curl -X PUT https://openshift.redhat.com/broker/rest/domains/mydomain --user user@example.com --data-urlencode name=mydomainx --data-urlencode allowed_gear_sizes=small
$ curl -X PUT https://openshift.redhat.com/broker/rest/domains/mydomain --user user@example.com --data-urlencode name=mydomainx --data-urlencode allowed_gear_sizes=small
The API returns the domain resource with related resource links which have been left out for brevity. See Chapter 7, Domains for more information on all domain parameters.
7.6. Remove Self from a Domain Copiar enlaceEnlace copiado en el portapapeles!
Remove yourself from a domain.
Method | URL Structure |
---|---|
DELETE | /broker/rest/domain/:name/members/self |
Not applicable
curl -X DELETE https://openshift.redhat.com/broker/rest/domain/mydomain/members/self --user user@example.com:password
$ curl -X DELETE https://openshift.redhat.com/broker/rest/domain/mydomain/members/self --user user@example.com:password
7.7. Delete a Domain Copiar enlaceEnlace copiado en el portapapeles!
Delete an existing domain.
Note
force
parameter to true automatically deletes all applications under that domain and then deletes the domain.
Warning
force
parameter set to true deletes all applications created within that domain. This operation cannot be reversed.
Method | URL Structure |
---|---|
DELETE | /broker/rest/domains/:name |
Name | Description | Required | Default |
---|---|---|---|
force | Force delete domain | No | false |
curl -X DELETE https://openshift.redhat.com/broker/rest/domains/mydomain --user user@example.com:password
$ curl -X DELETE https://openshift.redhat.com/broker/rest/domains/mydomain --user user@example.com:password
If there are applications under the domain to be deleted, the API exits with an error message.
force
parameter to true to automatically delete the applications as part of the domain delete process.
Chapter 8. Teams Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
name | Name of the team |
id | Unique identifier of the team |
8.1. Create Team Copiar enlaceEnlace copiado en el portapapeles!
Create a new team. Note that the maximum number of teams that can be created is determined by the max_teams
capability. See Chapter 4, User Information for more information on user capabilities.
- Team names must be a minimum of 2 characters in length, with a maximum length of 250 characters
- If there are multiple teams under one owner, each team must have a unique name
- Team names cannot be modified
Method | URL Structure |
---|---|
POST | /broker/rest/teams |
{ "name": "myteam", }
{
"name": "myteam",
}
curl -X POST https://openshift.redhat.com/broker/rest/teams --user user@example.com:password --data-urlencode name=myteam
$ curl -X POST https://openshift.redhat.com/broker/rest/teams --user user@example.com:password --data-urlencode name=myteam
The API returns the team resource with related resource links which have been left out for brevity. See Chapter 8, Teams for more information on all team parameters.
8.2. List Teams Copiar enlaceEnlace copiado en el portapapeles!
Get a list of teams that you are a member of.
Method | URL Structure |
---|---|
GET | /broker/rest/teams |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/teams --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/teams --user user@example.com:password
The API returns a list of all teams that you are a member of. The related resource links returned by the API have been left out for brevity.
8.3. List Teams by Owner Copiar enlaceEnlace copiado en el portapapeles!
Get a list of teams owned by a particular user, specified with the owner
parameter.
Method | URL Structure |
---|---|
GET | /broker/rest/teams |
Name | Description | Required | Default |
---|---|---|---|
owner | List teams owned by specified user, or @self for current user | Yes |
{ "owner": "@self" }
{
"owner": "@self"
}
curl -X GET https://openshift.redhat.com/broker/rest/teams --user user@example.com:password --data-urlencode owner=@self
$ curl -X GET https://openshift.redhat.com/broker/rest/teams --user user@example.com:password --data-urlencode owner=@self
The API returns a list of teams owned by the specified user. The related resource links returned by the API have been left out for brevity.
8.4. Search Teams by Name Copiar enlaceEnlace copiado en el portapapeles!
Search teams with the specified string.
Method | URL Structure |
---|---|
GET | /broker/rest/teams |
Name | Description | Required | Default |
---|---|---|---|
search | Search string of at least 2 characters | Yes | |
global | Boolean parameter to indicate whether global teams or teams owned by users are searched | Yes |
{ "search": "engineering", "global": true }
{
"search": "engineering",
"global": true
}
curl -X GET https://openshift.redhat.com/broker/rest/teams --user user@example.com:password --data-urlencode search=engineering --data-urlencode global=true
$ curl -X GET https://openshift.redhat.com/broker/rest/teams --user user@example.com:password --data-urlencode search=engineering --data-urlencode global=true
The API returns a list of teams matching the search string.
8.5. Get Team Information Copiar enlaceEnlace copiado en el portapapeles!
Get information about an existing team.
Method | URL Structure |
---|---|
GET | /broker/rest/team/:id |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae --user user@example.com:password
The API returns the team resource with related resource links which have been left out for brevity. See Chapter 8, Teams for more information on all team resource parameters.
8.6. Remove Self from a Team Copiar enlaceEnlace copiado en el portapapeles!
Remove yourself from a team owned by another user.
Method | URL Structure |
---|---|
DELETE | /broker/rest/team/:id/members/self |
Not applicable
curl -X DELETE https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/members/self --user user@example.com:password
$ curl -X DELETE https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/members/self --user user@example.com:password
8.7. Delete Team Copiar enlaceEnlace copiado en el portapapeles!
Delete an existing team.
Method | URL Structure |
---|---|
DELETE | /broker/rest/team/:id |
Not applicable
curl -X DELETE https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae --user user@example.com:password
$ curl -X DELETE https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae --user user@example.com:password
Chapter 9. Members Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
id | Unique identifier of member |
role | Type of role a member is provided |
type | Type of member; for example, user or team |
from | Source of the membership |
owner | Indicates whether the member is owner of the resource |
members | An array of members to add with corresponding type and role; for example, {'members': [{'login': 'foo', 'type': 'user', 'role': 'view'}, {'id': '5326534e2046fde9d3000001', 'type': 'team', 'role': 'none'}]} |
9.1. List Members of a Domain Copiar enlaceEnlace copiado en el portapapeles!
Get a list of members that belong to the specified domain.
Method | URL Structure |
---|---|
GET | /broker/rest/domains/:name/members |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/domains/mydomain/members --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/domains/mydomain/members --user user@example.com:password
The API returns a list of all members belonging to the specified domain.
9.2. Add or Remove Domain Members Copiar enlaceEnlace copiado en el portapapeles!
Add or remove one or more domain members. If a member has the admin
role on a domain, they can:
- Add a team they own as a member of a domain
- Change the role of any team that is already a member of a domain
- Remove any team that is already a member of a domain
MAX_TEAMS_PER_RESOURCE
parameter.
Method | URL Structure |
---|---|
PATCH | /broker/rest/domains/:name/members |
Name | Description | Required | Default |
---|---|---|---|
role | Type of role a member has on the domain | Yes | |
id | Unique user or team identifier | No | |
login | User's login attribute; only used when the member type is 'user' | No | |
type | Indicates whether a member is a user, or a team | No | user |
members | An array of members to add with corresponding id or user login , type , and role |
{ "role": "view", "login": "member@example.com" }
{
"role": "view",
"login": "member@example.com"
}
curl -X PATCH https://openshift.redhat.com/broker/rest/domains/mydomain/members --user user@example.com:password --data-urlencode role=view --data-urlencode login=member@memberemail.com
$ curl -X PATCH https://openshift.redhat.com/broker/rest/domains/mydomain/members --user user@example.com:password --data-urlencode role=view --data-urlencode login=member@memberemail.com
The sample JSON response below shows that a new domain member has been added.
9.3. List Members of an Application Copiar enlaceEnlace copiado en el portapapeles!
Get a list of members that belong to the specified application.
Method | URL Structure |
---|---|
GET | /broker/rest/application/:id/members |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/application/521bf818656c67309c000001/members --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/application/521bf818656c67309c000001/members --user user@example.com:password
The API returns a list of all members belonging to the specified application.
9.4. Add Team Member Copiar enlaceEnlace copiado en el portapapeles!
Add a member to an existing team. Note that the maximum number of members a team can have is determined by the MAX_MEMBERS_PER_RESOURCE
configuration parameter.
Method | URL Structure |
---|---|
POST | /broker/rest/team/:id/members |
Name | Description | Required | Default |
---|---|---|---|
role | Type of role user has on the team | Yes | |
id | Unique user identifier | No | |
login | User's login attribute | No |
{ "role": "view", "login": "member@example.com" }
{
"role": "view",
"login": "member@example.com"
}
curl -X POST https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/members --user user@example.com:password --data-urlencode role=view --data-urlencode login=member@example.com
$ curl -X POST https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/members --user user@example.com:password --data-urlencode role=view --data-urlencode login=member@example.com
The sample JSON response below shows that a new member has been added to the specified team. Unnecessary information and related resource links returned by the API have been removed for brevity.
9.5. List Members of a Team Copiar enlaceEnlace copiado en el portapapeles!
Get a list of members that belong to the specified team.
Method | URL Structure |
---|---|
GET | /broker/rest/team/:id/members |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/members --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/members --user user@example.com:password
The API returns a list of all members belonging to the specified team.
9.6. Add or Remove Team Members Copiar enlaceEnlace copiado en el portapapeles!
Add one or more members to a team, or remove them from a team.
Method | URL Structure |
---|---|
PATCH | /broker/rest/team/:id/members |
Name | Description | Required | Default |
---|---|---|---|
role | Type of role user has on the team | Yes | |
id | Unique user identifier | No | |
login | User's login attribute | No | |
members | An array of members to add with corresponding type and role | No |
{ "role": "view", "login": "member@example.com" }
{
"role": "view",
"login": "member@example.com"
}
curl -X PATCH https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/members --user user@example.com:password --data-urlencode role=view --data-urlencode login=member@example.com
$ curl -X PATCH https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/members --user user@example.com:password --data-urlencode role=view --data-urlencode login=member@example.com
The API returns the member resource with related resource links which have been left out for brevity. See Chapter 9, Members for more information on all member parameters.
9.7. Get Member Information Copiar enlaceEnlace copiado en el portapapeles!
Get information about an existing team member.
Method | URL Structure |
---|---|
GET | /broker/rest/team/:id/member/:id |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/member/533369f861b322dfc1000003 --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/member/533369f861b322dfc1000003 --user user@example.com:password
The API returns the member resource with related resource links which have been left out for brevity. See Chapter 9, Members for more information on all member resource parameters.
9.8. Update Team Member Copiar enlaceEnlace copiado en el portapapeles!
Update the role of a team member.
Method | URL Structure |
---|---|
PUT | /broker/rest/team/:id/member/:id |
Name | Description | Required | Default |
---|---|---|---|
role | Type of role user has on the team | Yes |
{ "role": "view", }
{
"role": "view",
}
curl -X PUT https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/member/533369f861b322dfc1000003 --user user@example.com:password --data-urlencode role=view
$ curl -X PUT https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/member/533369f861b322dfc1000003 --user user@example.com:password --data-urlencode role=view
The API returns the member resource with related resource links which have been left out for brevity. See Chapter 9, Members for more information on all member parameters.
9.9. Delete Team Member Copiar enlaceEnlace copiado en el portapapeles!
Delete a team member.
Method | URL Structure |
---|---|
DELETE | /broker/rest/team/:id/member/:id |
Not applicable
curl -X DELETE https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/member/533369f861b322dfc1000003--user user@example.com:password
$ curl -X DELETE https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/member/533369f861b322dfc1000003--user user@example.com:password
The specified member is deleted from the team, and the API returns the member resource. Other information and related resource links have been left out for brevity. See Chapter 9, Members for more information on all member parameters.
force
parameter to true to automatically delete the applications as part of the domain delete process.
Chapter 10. Quickstarts Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
id | Unique identifier of the quickstart. |
search | The search term to use for the quickstart. |
10.1. List Quickstarts Copiar enlaceEnlace copiado en el portapapeles!
List all available quickstarts. The client will only see this resource if there are quickstarts available, and it will be absent if there are none. Unlike other REST API calls, the following guidelines apply when retrieving a list of quickstarts:
- API versioning is not supported
- Only JSON is supported
- The body of the API response is different from other API responses
- Parse errors or unexpected data values must be handled by omitting the entry
Method | URL Structure |
---|---|
GET | /api/v1/quickstarts/promoted.json |
Not applicable
curl -X GET https://www.openshift.com/api/v1/quickstarts/promoted.json --user user@example.com
$ curl -X GET https://www.openshift.com/api/v1/quickstarts/promoted.json --user user@example.com
The API returns a list of all quickstarts that are available. See Chapter 10, Quickstarts for more information on all quickstart parameters.
10.2. Show Quickstart Copiar enlaceEnlace copiado en el portapapeles!
Get information about the specified quickstart. The client does not have to retrieve the quickstarts list and scan for a known ID.
Method | URL Structure |
---|---|
GET | /api/v1/quickstarts/:id |
Name | Description | Required | Default |
---|---|---|---|
id | Unique identifier of the quickstart | Yes |
curl -X GET https://www.openshift.com/api/v1/quickstarts/12724 --user user@example.com
$ curl -X GET https://www.openshift.com/api/v1/quickstarts/12724 --user user@example.com
The API returns information about the specified quickstart.
10.3. Search Quickstarts Copiar enlaceEnlace copiado en el portapapeles!
Search for a quickstart using a search term.
Method | URL Structure |
---|---|
GET | /api/v1/quickstarts.json?search=search_term |
Name | Description | Required | Default |
---|---|---|---|
search | Search term to use for the quickstart. | Yes |
curl -X GET https://www.openshift.com/api/v1/quickstarts.json?search=wordpress --user user@example.com
$ curl -X GET https://www.openshift.com/api/v1/quickstarts.json?search=wordpress --user user@example.com
The API returns information about all quickstarts that match the specified search string. See Chapter 10, Quickstarts for more information on all quickstart parameters.
Chapter 11. Applications Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
name | Name of the application. |
framework | Application framework. For example, JBoss, PHP, or Ruby. |
domain_id | The domain ID of the application. |
embedded | List of cartridges that have been added to this application. |
creation_time | Time the application was created. |
scalable | Whether application is scaled or not scaled. The values are either true or false . |
gear_count | Number of gears for this application. |
gear_profile | Gear size of an application. For example, small . |
aliases | Application server aliases, if applicable. |
app_url | The URL to access this application. |
git_url | The URL to access the Git repository for this application. |
ssh_url | The URL to access this application using an SSH terminal. |
health_check_path | The URL to check if the application is running. |
uuid | Unique identifier for this application. |
initial_git_url | The URL that was used to initialize the Git repository for this application. |
11.1. Resolve DNS Copiar enlaceEnlace copiado en el portapapeles!
Check whether the DNS is created with an actual DNS nameserver lookup that is not subject to caching. When DNS availability is checked with the client tools, the value gets cached for approximately 30 seconds. This REST API call checks for DNS availability by directly querying the DNS servers.
Method | URL Structure |
---|---|
GET | /broker/rest/application/:id/dns_resolvable |
Not applicable
curl GET https://openshift.redhat.com/broker/rest/applications/534253991015616165707776/dns_resolvable --user user@example.com
$ curl GET https://openshift.redhat.com/broker/rest/applications/534253991015616165707776/dns_resolvable --user user@example.com
The following is an example of the API response if the DNS is resolvable. If the DNS is not resolved an error message is returned.
11.2. Create an Application Copiar enlaceEnlace copiado en el portapapeles!
Create a new application. Note that if the specified domain does not exist when attempting to create an application, a domain is automatically created. See Section 7.1, “Create a Domain” for more information on how to create a domain.
Method | URL Structure |
---|---|
POST | /broker/rest/domain/:domain_name/applications |
Name | Description | Required | Default |
---|---|---|---|
name | Name of application | Yes | |
cartridges | Add cartridges to the application by specifying an array of one or more cartridges, using the name or unique ID | No | |
template | UUID of application template | No | |
scale | Mark application as scalable | No | false |
gear_size | Cartridge gear size | No | small |
initial_git_url | URL to Git source code repository that is the basis for this application | No | |
cartridges[][name] | Name of cartridge | No | |
cartridges[][gear_size] | Gear size of each individual cartridge. If gear_size is not specified, default gear size is used depending on user input | No | |
cartridges[][url] | URL to a downloadable cartridge; multiple URLs can be specified | No | |
environment_variables | Add or update application environment variables | No | |
region | Restrict the application to the specified region | No |
Note
curl -X POST https://openshift.redhat.com/broker/rest/domain/mydomain/applications --user user@example.com:password --data-urlencode name=myapp --data-urlencode cartridges=ruby-2.0 --data-urlencode scale=true --data-urlencode gear_size=small
$ curl -X POST https://openshift.redhat.com/broker/rest/domain/mydomain/applications --user user@example.com:password --data-urlencode name=myapp --data-urlencode cartridges=ruby-2.0 --data-urlencode scale=true --data-urlencode gear_size=small
gear_size
parameter is applied to all cartridges that are added to the specified application. However, the following cURL command example shows how to apply the gear_size
parameter to individual cartridges when adding multiple cartridges to an application.
curl -X POST https://openshift.redhat.com/broker/rest/domain/mydomain/applications --user user@example.com:password --data-urlencode name=mysecondapp --data-urlencode cartridges=[][name]=jbosseap-6 --data-urlencode cartridges[][gear_size]=medium --data-urlencode cartridges[][name]=mysql-5.5 --data-urlencode cartridges[][gear_size]=small
$ curl -X POST https://openshift.redhat.com/broker/rest/domain/mydomain/applications --user user@example.com:password --data-urlencode name=mysecondapp --data-urlencode cartridges=[][name]=jbosseap-6 --data-urlencode cartridges[][gear_size]=medium --data-urlencode cartridges[][name]=mysql-5.5 --data-urlencode cartridges[][gear_size]=small
The API returns information about the newly created application with related resource links which have been left out for brevity. See Chapter 11, Applications for more information on all application parameters.
Note
11.3. List Applications by Owner Copiar enlaceEnlace copiado en el portapapeles!
Get a list of applications owned by a particular user, specified with the owner
parameter. If no owner is specified, it automatically defaults to self.
Method | URL Structure |
---|---|
GET | /broker/rest/applications |
Name | Description | Required | Default |
---|---|---|---|
owner | List applications owned by specified user, or @self for current user | Yes |
{ "owner": "@self" }
{
"owner": "@self"
}
curl -X GET https://openshift.redhat.com/broker/rest/applications --user user@example.com:password --data-urlencode owner=@self
$ curl -X GET https://openshift.redhat.com/broker/rest/applications --user user@example.com:password --data-urlencode owner=@self
The API returns a list of applications owned by the specified user. The related resource links returned by the API have been left out for brevity.
11.4. List Applications for a User Copiar enlaceEnlace copiado en el portapapeles!
List all applications for the specified user.
Method | URL Structure |
---|---|
GET | /broker/rest/applications |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/applications --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/applications --user user@example.com:password
The API returns a list of all applications for the specified user. The related resource links returned by the API have been left out for brevity. See Chapter 11, Applications for a description of each response parameter associated with an application.
11.5. List Applications for a Domain Copiar enlaceEnlace copiado en el portapapeles!
List all applications for the specified domain.
Method | URL Structure |
---|---|
GET | /broker/rest/domain/:name/applications |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/domain/mydomain/applications --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/domain/mydomain/applications --user user@example.com:password
The API returns a list of all applications under the specified domain. The related resource links returned by the API have been left out for brevity. See Chapter 11, Applications for a description of each response parameter associated with an application.
11.6. List Applications and Cartridges Copiar enlaceEnlace copiado en el portapapeles!
Get a list of all applications for the specified domain including all cartridges.
Method | URL Structure |
---|---|
GET | /broker/rest/domain/:name/applications?include=cartridges |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/domains/mydomain/applications?include=cartridges --user user@example.com
$ curl -X GET https://openshift.redhat.com/broker/rest/domains/mydomain/applications?include=cartridges --user user@example.com
The API returns a list of all applications and embedded cartridges. The related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for a description of each response parameter associated with an application.
11.7. Get Application Information Copiar enlaceEnlace copiado en el portapapeles!
Get information about an existing application.
Method | URL Structure |
---|---|
GET | /broker/rest/application/:id |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/application/52131ae36cec0e0d5f00012b
$ curl -X GET https://openshift.redhat.com/broker/rest/application/52131ae36cec0e0d5f00012b
The API returns information about the specified application and related resource links which have been left out for brevity. See Chapter 11, Applications for more information on all application parameters.
11.8. Get Application and Cartridge Information Copiar enlaceEnlace copiado en el portapapeles!
Get information about an existing application and its embedded cartridges.
Method | URL Structure |
---|---|
GET | /broker/rest/application/:id?include=cartridges |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/application/5213190e2587c8817a000121?include=cartridges --user user@example.com
$ curl -X GET https://openshift.redhat.com/broker/rest/application/5213190e2587c8817a000121?include=cartridges --user user@example.com
The API returns information about the specified application and its embedded cartridges. The related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
11.9. Update an Application Copiar enlaceEnlace copiado en el portapapeles!
Update an application.
Method | Resource URL |
---|---|
PUT | /broker/rest/application/:id |
Name | Description | Required | Default Value |
---|---|---|---|
auto_deploy | Indicates whether an application should build and deploy automatically whenever git push is executed | No | |
deployment_type | Indicates whether an application is configured for binary or Git based deployments | No | |
deployment_branch | If automatic deployment is enabled, this indicates from which branch automatic deployment occurs | No | |
keep_deployments | Indicates how many total deployments are preserved; must be greater than zero | No |
{ "auto_deploy": true, "deployment_type": "git" }
{
"auto_deploy": true,
"deployment_type": "git"
}
curl -X PUT https://openshift.redhat.com/broker/rest/application/527ade9d7f9c48d37100000a --user user@myemail.com:password --data-urlencode auto_deploy=true --data-urlencode deployment_type=git
$ curl -X PUT https://openshift.redhat.com/broker/rest/application/527ade9d7f9c48d37100000a --user user@myemail.com:password --data-urlencode auto_deploy=true --data-urlencode deployment_type=git
The API returns the deployment resource. See Chapter 11, Applications for more information on all deployment parameters.
11.10. Enable High Availability (HA) on Application Copiar enlaceEnlace copiado en el portapapeles!
Enable high availability (HA) feature on an application.
Method | URL Structure |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "make-ha" }
{
"event": "make-ha"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/527ade9d7f9c48d37100000a/events --user user@example.com:password --data-urlencode event=make-ha
$ curl -X POST https://openshift.redhat.com/broker/rest/application/527ade9d7f9c48d37100000a/events --user user@example.com:password --data-urlencode event=make-ha
11.11. Disable High Availability (HA) on Application Copiar enlaceEnlace copiado en el portapapeles!
Disable high availability (HA) feature on an application.
Method | URL Structure |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "disable-ha" }
{
"event": "disable-ha"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/527ade9d7f9c48d37100000a/events --user user@example.com:password --data-urlencode event=disable-ha
$ curl -X POST https://openshift.redhat.com/broker/rest/application/527ade9d7f9c48d37100000a/events --user user@example.com:password --data-urlencode event=disable-ha
11.12. Start Application Copiar enlaceEnlace copiado en el portapapeles!
Start an application that is not running.
Method | URL Structure |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "start" }
{
"event": "start"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com:password --data-urlencode event=start
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com:password --data-urlencode event=start
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
11.13. Stop Application Copiar enlaceEnlace copiado en el portapapeles!
Stop a running application.
Method | URL Structure |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "stop" }
{
"event": "stop"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=stop
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=stop
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
11.14. Force Stop Application Copiar enlaceEnlace copiado en el portapapeles!
Force a running application to stop.
Method | URL Structure |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "force-stop" }
{
"event": "force-stop"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com:password --data-urlencode event=force-stop
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com:password --data-urlencode event=force-stop
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity.See Chapter 11, Applications for more information on all application parameters.
11.15. Restart Application Copiar enlaceEnlace copiado en el portapapeles!
Restart a running application.
Method | URL Structure |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "restart" }
{
"event": "restart"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com:password --data-urlencode event=restart
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com:password --data-urlencode event=restart
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
11.16. Scale Up Application Copiar enlaceEnlace copiado en el portapapeles!
Scale up an application that was created with the scaling function enabled.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "scale-up" }
{
"event": "scale-up"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=scale-up
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=scale-up
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
11.17. Scale Down Application Copiar enlaceEnlace copiado en el portapapeles!
Scale down an application that was created with the scaling function enabled.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "scale-down" }
{
"event": "scale-down"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=scale-down
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=scale-down
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
11.18. Tidy Application Framework Copiar enlaceEnlace copiado en el portapapeles!
Tidy the application framework.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "tidy" }
{
"event": "tidy"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=tidy
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=tidy
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
11.19. Reload Application Copiar enlaceEnlace copiado en el portapapeles!
Reload an application.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "reload" }
{
"event": "reload"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=reload
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=reload
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
11.20. Trigger Thread Dump Copiar enlaceEnlace copiado en el portapapeles!
Trigger application thread dump.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "thread-dump" }
{
"event": "thread-dump"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=thread-dump
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/events --user user@example.com --data-urlencode event=thread-dump
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
11.21. Delete Application Copiar enlaceEnlace copiado en el portapapeles!
Delete an OpenShift application.
Method | Resource URL |
---|---|
DELETE | /broker/rest/application/:id |
Not applicable
curl -X DELETE https://openshift.redhat.com/broker/rest/application/534253991015616165707776 -user user@example.com
$ curl -X DELETE https://openshift.redhat.com/broker/rest/application/534253991015616165707776 -user user@example.com
Chapter 12. Application Aliases and SSL Certificates Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
id | Name of application alias. |
certificate_added_at | The date and time when the SSL certificate was added. |
has_private_ssl_certificate | Indicates whether an SSL certificate has been added to the specified application. |
12.1. Add Application Alias Copiar enlaceEnlace copiado en el portapapeles!
Add an alias to an application, with the option to upload an SSL certificate. Adding an alias allows you to use your own domain name for an application.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/aliases |
Name | Description | Required | Default |
---|---|---|---|
id | Alias for application | Yes | |
ssl_certificate | Content of SSL certificate | No | |
private_key | Required private key for SSL certificate | No | |
pass_phrase | Optional passphrase for private key | No |
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/aliases --user user@example.com --data-urlencode id=myappalias
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/aliases --user user@example.com --data-urlencode id=myappalias
curl -X POST https://openshift.redhat.com/broker/rest/applications/534253991015616165707776/aliases --user user@example.com --data-urlencode id=myappalias --data-urlencode ssl_certificate=-----BEGIN CERTIFICATE----- MIIDoDCCAogCCQDzF8AJCHnrbjANBgkqhkiG9w0BAQUFADCBkTELMAkGA1UEBhMC VVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJl ZGhhdDESMBAGA1UECwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAm BgkqhkiG9w0BCQEWGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wHhcNMTMwMjE5 MjExMTQ4WhcNMTQwMjE5MjExMTQ4WjCBkTELMAkGA1UEBhMCVVMxCzAJBgNVBAgM AkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJlZGhhdDESMBAGA1UE CwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAmBgkqhkiG9w0BCQEW GWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB DwAwggEKAoIBAQDAEbH4MCi3iIDP1HS+/Xwu8SjdSc5WJX6htV7hJpmFZ8HohV/8 ba0v6aM9IJIIt+sIe2J62t/9G3leOdIHBxeACN4fV2l/iA/fvxvlnFKeD7sHm9Oc Yj1H6YYJ57sIOf/oLDpJl6l3Rw8VC3+3W0/lzlVpA8qt7fpkiW7XQJCPplUSrdVC 3okQ2T5NAod5+wVIOqELgE5bLX1LRs5VPsjytHkJ7rKXs55FHR3kpsoImn5xD0Ky 6lRn8cIMolQoyN5HIGr8f5P+07hrHibve8jje/DKTssb5yEUAEmh6iGHQsRAnsUW QoIEUOLq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xb5TBeUU9lkzuTZAZIDXKIm7AG UwMbj/A038yAumYQtThTE/3e4W3rn7F2Vko900bC4aAC1KQOAzjIeQqzqkVxWTWq 4SUFQAECgYEA/ODwifOTuI6hdZK6JRgc4wp6Rc0fkqHuxLzABXoIGuSVlWyimqIN ZySAkpo5EW6DNraRJxNCOBmWeGPEhHGrea+JPiPEwCK0F7SxvSmg3jzNzw3Es31T ecET7eDwuSOY9v4XDzLyiXXkEUUReD7Ng2hEYL+HaQrl5jWj4lxgq/ECgYEAwnCb Krz7FwX8AqtFAEi6uUrc12k1xYKQfrwSxbfdK2vBBUpgB71Iq/fqP+1BittEljDG 8f4jEtMBFfEPhLzGIHaI3UiHUHXS4GetA77TRgR8lnKKpj1FcMIY2iKU479707O5 Q08pgWRUDQ8BVg2ePgbo5QjLMc/rv7UF3AHvPAECgYB/auAIwqDGN6gHU/1TP4ke pWLi1O55tfpXSzv+BnUbB96PQgPUop7aP7xBIlBrBiI7aVZOOBf/qHT3CF421geu 8tHWa7NxlIrl/vgn9lfGYyDYmXlpb1amXLEsBVGGF/e1TGZWFDe9J5fZU9HvosVu 1xTNIvSZ6xHYI2MGZcGYIQKBgEYeebaV5C7PV6xWu1F46O19U9rS9DM//H/XryVi Qv4vo7IWuj7QQe7SPsXC98ntfPR0rqoCLf/R3ChfgGsr8H8wf/bc+v9HHj8S5E/f dy1e3Nccg2ej3PDm7jNsGSlwmmUkAQGHAL7KwYzcBm1UB+bycvZ1j2FtS+UckPpg MDgBAoGALD8PkxHb4U4DtbNFSYRrUdvS9heav/yph3lTMfifNkOir36io6v8RPgb D2bHKKZgmYlTgJrxD45Er9agC5jclJO35QRU/OfGf3GcnABkBI7vlvUKADAo65Sq weZkdJnbrIadcvLOHOzkKC9m+rxFTC9VoN1dwK2zwYvUXfa1VJA= -----END RSA PRIVATE KEY----- --data-urlencode pass_phrase=abcd
$ curl -X POST https://openshift.redhat.com/broker/rest/applications/534253991015616165707776/aliases --user user@example.com --data-urlencode id=myappalias --data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eGPEhHGrea+JPiPEwCK0F7SxvSmg3jzNzw3Es31T ecET7eDwuSOY9v4XDzLyiXXkEUUReD7Ng2hEYL+HaQrl5jWj4lxgq/ECgYEAwnCb Krz7FwX8AqtFAEi6uUrc12k1xYKQfrwSxbfdK2vBBUpgB71Iq/fqP+1BittEljDG 8f4jEtMBFfEPhLzGIHaI3UiHUHXS4GetA77TRgR8lnKKpj1FcMIY2iKU479707O5 Q08pgWRUDQ8BVg2ePgbo5QjLMc/rv7UF3AHvPAECgYB/auAIwqDGN6gHU/1TP4ke pWLi1O55tfpXSzv+BnUbB96PQgPUop7aP7xBIlBrBiI7aVZOOBf/qHT3CF421geu 8tHWa7NxlIrl/vgn9lfGYyDYmXlpb1amXLEsBVGGF/e1TGZWFDe9J5fZU9HvosVu 1xTNIvSZ6xHYI2MGZcGYIQKBgEYeebaV5C7PV6xWu1F46O19U9rS9DM//H/XryVi Qv4vo7IWuj7QQe7SPsXC98ntfPR0rqoCLf/R3ChfgGsr8H8wf/bc+v9HHj8S5E/f dy1e3Nccg2ej3PDm7jNsGSlwmmUkAQGHAL7KwYzcBm1UB+bycvZ1j2FtS+UckPpg MDgBAoGALD8PkxHb4U4DtbNFSYRrUdvS9heav/yph3lTMfifNkOir36io6v8RPgb D2bHKKZgmYlTgJrxD45Er9agC5jclJO35QRU/OfGf3GcnABkBI7vlvUKADAo65Sq weZkdJnbrIadcvLOHOzkKC9m+rxFTC9VoN1dwK2zwYvUXfa1VJA= -----END RSA PRIVATE KEY----- --data-urlencode pass_phrase=abcd
The API returns the aliases resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 12, Application Aliases and SSL Certificates for all parameters associated with application aliases.
12.2. List Application Aliases Copiar enlaceEnlace copiado en el portapapeles!
List all aliases and SSL certificates associated with the specified application.
Note
Method | URL Structure |
---|---|
GET | /broker/rest/application/:id/aliases |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/aliases --user user@example.com
$ curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/aliases --user user@example.com
The API returns a list of all aliases and SSL certificates for the specified application. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 12, Application Aliases and SSL Certificates for a description of each response parameter associated with application aliases.
12.3. Get Application Alias Information Copiar enlaceEnlace copiado en el portapapeles!
Get information about the specified application alias.
Note
Method | URL Structure |
---|---|
GET | /broker/rest/application/:id/aliases/:id |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/aliases/myappalias --user user@example.com
$ curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/aliases/myappalias --user user@example.com
The API returns information about the specified alias. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 12, Application Aliases and SSL Certificates for a description of each response parameter associated with application aliases.
12.4. Update Application Alias Copiar enlaceEnlace copiado en el portapapeles!
Update an existing application alias with a new SSL certificate or remove an existing certificate.
Method | Resource URL |
---|---|
PUT | /broker/rest/application/:id/aliases/:id |
Name | Description | Required | Default |
---|---|---|---|
ssl_certificate | Content of SSL certificate | Yes | |
private_key | Required private key for SSL certificate | Yes | |
pass_phrase | Optional passphrase for private key | No |
{ "ssl_certificate": "-----BEGIN CERTIFICATE-----\nMIIDoDCCAogCCQDzF8AJCHnrbjANBgkqhkiG9w0BAQUFADCBkTELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJl\nZGhhdDESMBAGA1UECwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAm\nBgkqhkiG9w0BCQEWGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wHhcNMTMwMjE5\nMjExMTQ4WhcNMTQwMjE5MjExMTQ4WjCBkTELMAkGA1UEBhMCVVMxCzAJBgNVBAgM\nAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJlZGhhdDESMBAGA1UE\nCwwJb3BlbnNo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e3Nccg2ej3PDm7jNsGSlwmmUkAQGHAL7KwYzcBm1UB+bycvZ1j2FtS+UckPpg\nMDgBAoGALD8PkxHb4U4DtbNFSYRrUdvS9heav/yph3lTMfifNkOir36io6v8RPgb\nD2bHKKZgmYlTgJrxD45Er9agC5jclJO35QRU/OfGf3GcnABkBI7vlvUKADAo65Sq\nweZkdJnbrIadcvLOHOzkKC9m+rxFTC9VoN1dwK2zwYvUXfa1VJA=\n-----END RSA PRIVATE KEY-----",
"pass_phrase": "abcd"
}
When updating an application alias to upload a new SSL certificate, include the contents of the SSL certificate and the associated private key with or without the optional private key passphrase.
curl -X PUT https://openshift.redhat.com/broker/rest/application/534253991015616165707776/aliases/myappalias --user user@example.com --data-urlencode ssl_certificate=-----BEGIN CERTIFICATE----- MIIDoDCCAogCCQDzF8AJCHnrbjANBgkqhkiG9w0BAQUFADCBkTELMAkGA1UEBhMC VVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJl ZGhhdDESMBAGA1UECwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAm BgkqhkiG9w0BCQEWGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wHhcNMTMwMjE5 MjExMTQ4WhcNMTQwMjE5MjExMTQ4WjCBkTELMAkGA1UEBhMCVVMxCzAJBgNVBAgM AkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJlZGhhdDESMBAGA1UE CwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAmBgkqhkiG9w0BCQEW GWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB DwAwggEKAoIBAQDAEbH4MCi3iIDP1HS+/Xwu8SjdSc5WJX6htV7hJpmFZ8HohV/8 ba0v6aM9IJIIt+sIe2J62t/9G3leOdIHBxeACN4fV2l/iA/fvxvlnFKeD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KKZgmYlTgJrxD45Er9agC5jclJO35QRU/OfGf3GcnABkBI7vlvUKADAo65Sq weZkdJnbrIadcvLOHOzkKC9m+rxFTC9VoN1dwK2zwYvUXfa1VJA= -----END RSA PRIVATE KEY----- --data-urlencode pass_phrase=abcd
$ curl -X PUT https://openshift.redhat.com/broker/rest/application/534253991015616165707776/aliases/myappalias --user user@example.com --data-urlencode ssl_certificate=-----BEGIN CERTIFICATE----- MIIDoDCCAogCCQDzF8AJCHnrbjANBgkqhkiG9w0BAQUFADCBkTELMAkGA1UEBhMC VVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJl ZGhhdDESMBAGA1UECwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAm BgkqhkiG9w0BCQEWGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wHhcNMTMwMjE5 MjExMTQ4WhcNMTQwMjE5MjExMTQ4WjCBkTELMAkGA1UEBhMCVVMxCzAJBgNVBAgM AkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJlZGhhdDESMBAGA1UE CwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAmBgkqhkiG9w0BCQEW GWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB DwAwggEKAoIBAQDAEbH4MCi3iIDP1HS+/Xwu8SjdSc5WJX6htV7hJpmFZ8HohV/8 ba0v6aM9IJIIt+sIe2J62t/9G3leOdIHBxeACN4fV2l/iA/fvxvlnFKeD7sHm9Oc Yj1H6YYJ57sIOf/oLDpJl6l3Rw8VC3+3W0/lzlVpA8qt7fpkiW7XQJCPplUSrdVC 3okQ2T5NAod5+wVIOqELgE5bLX1LRs5VPsjytHkJ7rKXs55FHR3kpsoImn5xD0Ky 6lRn8cIMolQoyN5HIGr8f5P+07hrHibve8jje/DKTssb5yE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wbbN6Ma97gw9KgXnM4Nlh29Fxb5TBeUU9lkzuTZAZIDXKIm7AG UwMbj/A038yAumYQtThTE/3e4W3rn7F2Vko900bC4aAC1KQOAzjIeQqzqkVxWTWq 4SUFQAECgYEA/ODwifOTuI6hdZK6JRgc4wp6Rc0fkqHuxLzABXoIGuSVlWyimqIN ZySAkpo5EW6DNraRJxNCOBmWeGPEhHGrea+JPiPEwCK0F7SxvSmg3jzNzw3Es31T ecET7eDwuSOY9v4XDzLyiXXkEUUReD7Ng2hEYL+HaQrl5jWj4lxgq/ECgYEAwnCb Krz7FwX8AqtFAEi6uUrc12k1xYKQfrwSxbfdK2vBBUpgB71Iq/fqP+1BittEljDG 8f4jEtMBFfEPhLzGIHaI3UiHUHXS4GetA77TRgR8lnKKpj1FcMIY2iKU479707O5 Q08pgWRUDQ8BVg2ePgbo5QjLMc/rv7UF3AHvPAECgYB/auAIwqDGN6gHU/1TP4ke pWLi1O55tfpXSzv+BnUbB96PQgPUop7aP7xBIlBrBiI7aVZOOBf/qHT3CF421geu 8tHWa7NxlIrl/vgn9lfGYyDYmXlpb1amXLEsBVGGF/e1TGZWFDe9J5fZU9HvosVu 1xTNIvSZ6xHYI2MGZcGYIQKBgEYeebaV5C7PV6xWu1F46O19U9rS9DM//H/XryVi Qv4vo7IWuj7QQe7SPsXC98ntfPR0rqoCLf/R3ChfgGsr8H8wf/bc+v9HHj8S5E/f dy1e3Nccg2ej3PDm7jNsGSlwmmUkAQGHAL7KwYzcBm1UB+bycvZ1j2FtS+UckPpg MDgBAoGALD8PkxHb4U4DtbNFSYRrUdvS9heav/yph3lTMfifNkOir36io6v8RPgb D2bHKKZgmYlTgJrxD45Er9agC5jclJO35QRU/OfGf3GcnABkBI7vlvUKADAo65Sq weZkdJnbrIadcvLOHOzkKC9m+rxFTC9VoN1dwK2zwYvUXfa1VJA= -----END RSA PRIVATE KEY----- --data-urlencode pass_phrase=abcd
The API returns the aliases resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 12, Application Aliases and SSL Certificates for all parameters associated with application aliases.
12.5. Delete Application Alias Copiar enlaceEnlace copiado en el portapapeles!
Remove an alias from an application.
Method | Resource URL |
---|---|
DELETE | /broker/rest/application/:id/aliases/:id |
Not applicable
curl -X DELETE https://openshift.redhat.com/broker/rest/application/534253991015616165707776/aliases/myappalias --user user@example.com
$ curl -X DELETE https://openshift.redhat.com/broker/rest/application/534253991015616165707776/aliases/myappalias --user user@example.com
Chapter 13. Cartridges Copiar enlaceEnlace copiado en el portapapeles!
Standalone cartridges offer a variety of programming languages and frameworks for developing an application. Every application requires a framework cartridge. Examples include PHP, JBoss, and Ruby.
Name | Description |
---|---|
name | Name of the cartridge. |
id | Unique ID of the cartridge. |
obsolete | Indicates whether the cartridge is marked obsolete. Can be true or false . |
added_time | The date and time when the cartridge was added to an application. |
activation_time | The date and time when the cartridge version was marked active. Nil if the cartridge is not active. |
automatic_updates | Set to true if the cartridge receives updates when a security update is released. |
version | Version of the packaged software in the cartridge. |
license | License of the packaged software in the cartridge. |
license_url | URL of the license file for the packaged software in the cartridge. |
website | Website URL for the packaged software in the cartridge. |
help_topics | Map of topics and associated URLs that provide help on how to use and configure the cartridge. |
display_name | Formatted name of the cartridge for user interfaces. |
description | Description of the cartridge for user interfaces. |
current_scale | Current number of gears used to run the cartridge. |
scales_from | Minimum number of gears that a cartridge can scale to; once reached, scale_down requests are rejected. Cannot be less than the supported_scales_from value. |
scales_to | Maximum number of gears that a cartridge can scale to; once reached, scale_up requests are rejected. Cannot be greater than the supported_scales_to value. |
scales_with | Names of other cartridges that scale with this cartridge and run on the same set of gears; currently only HAProxy-1.4 is available. |
supported_scales_from | Minimum number of gears supported by the cartridge; the scales_from value cannot be less than this number. |
supported_scales_to | Maximum number of gears supported by the cartridge; the scales_to value cannot be greater than this number. |
tags | Array of tags associated with the cartridge. |
usage_rates | Plan usage costs. |
status_messages | Status messages returned by the cartridge. |
Note
scales_from
and scales_to
parameters can be set separately or set in the same REST API call. If the scales_from
value is greater than the scales_to
value, the broker logic automatically interchanges the two values.
Embedded cartridges provide extended functionality to OpenShift applications. Examples include MySQL, PostgreSQL, and Jenkins Client.
Name | Description |
---|---|
additional_gear_storage | Set additional filesystem storage in gigabytes for the gear profile that the cartridge is running on. |
base_gear_storage | Default basic storage in gigabytes associated with the gear profile that the cartridge is running on. |
collocated_with | Array of names of other cartridges that share the same gear(s) with the cartridge. |
gear_profile | Size of the gears grouped in this profile that the cartridge is running on; all gears in a group will have the same gear_profile . |
properties | List of environment variables and property values exposed by the cartridge and usable in application code. |
13.1. List Cartridges Copiar enlaceEnlace copiado en el portapapeles!
Get a list of all available OpenShift cartridges.
Method | Resource URL |
---|---|
GET | /broker/rest/cartridges |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/cartridges --user user@example.com
$ curl -X GET https://openshift.redhat.com/broker/rest/cartridges --user user@example.com
The API returns the cartridge resource with a list of all available OpenShift cartridges. Information on other available cartridges has been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
13.2. Embedded Cartridges Copiar enlaceEnlace copiado en el portapapeles!
13.2.1. Add Embedded Cartridge Copiar enlaceEnlace copiado en el portapapeles!
Add an embedded cartridge to an application.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/cartridges |
Name | Description | Required | Default |
---|---|---|---|
name | Name of cartridge; note that valid options may be different from those shown here | Yes | |
colocate_with | Component to colocate with | No | |
scales_from | Minimum number of gears to run component | No | |
scales_to | Maximum number of gears to run component | No | |
additional_storage | Additional GB of storage request on gears running this component | No | |
gear_size | Cartridge gear size | No | |
url | URL to a downloadable cartridge | No | |
environment_variables | Add or update application environment variables | No |
{ "name": "mysql-5.5", "colocate_with": "ruby-2.0", "gear_size": "small" }
{
"name": "mysql-5.5",
"colocate_with": "ruby-2.0",
"gear_size": "small"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridges --user "user:Password" --data-urlencode name=mysql-5.5 --data-urlencode colocate_with=ruby-2.0 --data-urlencode gear_size=small
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridges --user "user:Password" --data-urlencode name=mysql-5.5 --data-urlencode colocate_with=ruby-2.0 --data-urlencode gear_size=small
The API returns the embedded cartridge resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
13.2.2. List Embedded Cartridges Copiar enlaceEnlace copiado en el portapapeles!
Get a list of embedded cartridges that have been added to an application. For scaled applications, the API also returns the scaling properties of the cartridge.
Note
LIST_APPLICATIONS
resource. See Section 11.6, “List Applications and Cartridges” for more information.
Method | Resource URL |
---|---|
GET | /broker/rest/application/:id/cartridges |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridges --user user@example.com
$ curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridges --user user@example.com
The API returns a list of all embedded cartridges that have been added to the specified application. Related resource links and other cartridges returned by the API have been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
13.2.3. Get Cartridge Information Copiar enlaceEnlace copiado en el portapapeles!
Get information for the specified cartridge using the cartridge name or unique ID.
Method | Resource URL |
---|---|
GET | /broker/rest/application/:id/cartridge/:name |
Not applicable
Using the name of the cartridge:
curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5 --user user@example.com
$ curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5 --user user@example.com
The API returns the embedded cartridge resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
13.2.4. Update Cartridge Configuration Copiar enlaceEnlace copiado en el portapapeles!
Update the configuration of an existing cartridge. Minimum and maximum scaling factors and additional filesystem storage in gigabytes on each gear that contains the specified cartridge can be set with this API resource.
Note
Method | Resource URL |
---|---|
PUT | /broker/rest/application/:id/cartridge/:name |
Name | Description | Required | Default |
---|---|---|---|
additional_gear_storage | Additional filesystem storage (GB) | No | |
scales_from | Minimum number of gears to run component | No | |
scales_to | Maximum number of gears to run component | No |
{ "additional_gear_storage": 10 }
{
"additional_gear_storage": 10
}
curl -X PUT https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5 --user user@example.com --data-urlencode additional_gear_storage=10
$ curl -X PUT https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5 --user user@example.com --data-urlencode additional_gear_storage=10
The API returns the embedded cartridge resource with related resource links, and the updated values for the parameters that were changed. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
13.2.5. Get Cartridge Status Copiar enlaceEnlace copiado en el portapapeles!
Retrieve the status_messages
string as an array for the specified cartridge in an application.
Method | Resource URL |
---|---|
GET | /broker/rest/domain/:name/applications/:name/cartridge/:name |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/domain/mydomain/applications/myapp/cartridge/mysql-5.5?include=status_messages --user user@example.com
$ curl -X GET https://openshift.redhat.com/broker/rest/domain/mydomain/applications/myapp/cartridge/mysql-5.5?include=status_messages --user user@example.com
The API returns the status_messages
string as an array for the specified cartridge in an application. Unnecessary information and related resource links returned by the API have been removed for brevity.
13.2.6. Start Cartridge Copiar enlaceEnlace copiado en el portapapeles!
Start an application's embedded cartridge that is not running.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/cartridge/:name/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "start" }
{
"event": "start"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5/events --user user@example.com --data-urlencode event=start
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5/events --user user@example.com --data-urlencode event=start
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
13.2.7. Stop Cartridge Copiar enlaceEnlace copiado en el portapapeles!
Stop an application's embedded cartridge that is running.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/cartridge/:name/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "stop" }
{
"event": "stop"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5/events --user user@example.com --data-urlencode event=stop
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5/events --user user@example.com --data-urlencode event=stop
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
13.2.8. Restart Cartridge Copiar enlaceEnlace copiado en el portapapeles!
Restart a running embedded cartridge.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/cartridge/:name/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "restart" }
{
"event": "restart"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5/events --user user@example.com --data-urlencode event=restart
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5/events --user user@example.com --data-urlencode event=restart
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
13.2.9. Reload Cartridge Copiar enlaceEnlace copiado en el portapapeles!
Reload the embedded cartridge configuration if it has been modified.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/cartridge/:name/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes |
{ "event": "reload" }
{
"event": "reload"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5/events --user user@example.com --data-urlencode event=reload
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5/events --user user@example.com --data-urlencode event=reload
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
13.2.10. Delete Cartridge Copiar enlaceEnlace copiado en el portapapeles!
Delete an embedded cartridge from an application.
Method | Resource URL |
---|---|
DELETE | /broker/rest/application/:id/cartridge/:name |
Not applicable
curl -X DELETE https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5 --user user@example.com
$ curl -X DELETE https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5 --user user@example.com
Chapter 14. Deployment Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
id | Application deployment ID |
created_at | Creation time of application |
hot_deploy | Indicates whether the hot deployment was enabled for this deployment |
force_clean_build | Indicates whether a clean build was performed for this deployment |
ref | Git reference such as tag, branch, or commit ID |
artifact_url | A binary deployment artifact |
activations | An array of activations |
14.1. List Application Deployments Copiar enlaceEnlace copiado en el portapapeles!
Get a list of deployments for the specified application.
Method | Resource URL |
---|---|
GET | /broker/rest/application/:id/deployments |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/application/5255b678b78bba421d000008/deployments --user user@example.com:password
$ curl -X GET https://openshift.redhat.com/broker/rest/application/5255b678b78bba421d000008/deployments --user user@example.com:password
The API returns a list of deployments for the specified application. See Chapter 14, Deployment for more information on all application deployment parameters.
14.2. Deploy an Application Copiar enlaceEnlace copiado en el portapapeles!
Deploy the specified application.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/deployments |
Name | Description | Required | Default |
---|---|---|---|
ref | Git reference, such as tag, branch, or commit ID | No | master |
artifact_url | URL from where the deployment artifact is to be downloaded | No | |
hot_deploy | Indicates whether this is a hot deployment | No | false |
force_clean_build | Indicates whether a clean build is to be performed | No | false |
{ "ref": "master", "hot_deploy": false, "force_clean_build": false }
{
"ref": "master",
"hot_deploy": false,
"force_clean_build": false
}
curl -X POST https://openshift.redhat.com/broker/rest/application/5255b678b78bba421d000008/deployments --user user@example.com:password --data-urlencode ref=master --data-urlencode hot_deploy=false --data-urlencode force_clean_build=false
$ curl -X POST https://openshift.redhat.com/broker/rest/application/5255b678b78bba421d000008/deployments --user user@example.com:password --data-urlencode ref=master --data-urlencode hot_deploy=false --data-urlencode force_clean_build=false
The API returns the deployment resource. See Chapter 14, Deployment for more information on all deployment parameters.
14.3. Activate a Deployment of an Application Copiar enlaceEnlace copiado en el portapapeles!
Activate a particular deployment for the specified application.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/events |
Name | Description | Required | Default |
---|---|---|---|
event | Event | Yes | |
deployment_id | Deployment ID to activate the application | Yes |
{ "event": "activate", "deployment_id": "f36f59c0" }
{
"event": "activate",
"deployment_id": "f36f59c0"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/528424f6dbd93c204d000001/events --user user@example.com:password --data-urlencode event=activate --data-urlencode deployment_id=56e71f70
$ curl -X POST https://openshift.redhat.com/broker/rest/application/528424f6dbd93c204d000001/events --user user@example.com:password --data-urlencode event=activate --data-urlencode deployment_id=56e71f70
The API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
14.4. Update an Application Deployment Copiar enlaceEnlace copiado en el portapapeles!
Update a deployment of an application. Note that special permissions are required to update deployments.
Method | Resource URL |
---|---|
POST | /broker/rest/application/:id/deployments |
Name | Description | Required | Default |
---|---|---|---|
deployments | An array of deployments | Yes |
curl -X POST https://openshift.redhat.com/broker/rest/application/5255b678b78bba421d000008/deployments --user user@example.com:password
$ curl -X POST https://openshift.redhat.com/broker/rest/application/5255b678b78bba421d000008/deployments --user user@example.com:password
The API returns the deployment resource. See Chapter 14, Deployment for more information on all deployment parameters.
Chapter 15. Environment Variables Copiar enlaceEnlace copiado en el portapapeles!
Name | Description |
---|---|
name | Name of the environment variable |
value | Value of the environment variable |
15.1. Add Environment Variable Copiar enlaceEnlace copiado en el portapapeles!
Add an environment variable to the specified application.
Method | URL Structure |
---|---|
POST | /broker/rest/application/:id/environment-variables |
Name | Description | Required | Default |
---|---|---|---|
name | Name of environment variable | No | |
value | Value of environment variable | No |
{ "name": "MY_ENV_VAR", "value": "myvalue" }
{
"name": "MY_ENV_VAR",
"value": "myvalue"
}
curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/environment-variables --user user@example.com:password --data-urlencode name=MY_ENV_VAR --data-urlencode value=myvalue
$ curl -X POST https://openshift.redhat.com/broker/rest/application/534253991015616165707776/environment-variables --user user@example.com:password --data-urlencode name=MY_ENV_VAR --data-urlencode value=myvalue
The API returns the environment variables resource with related resource links which have been left out for brevity. See Chapter 15, Environment Variables for more information on all parameters for environment variables.
15.2. List Environment Variables Copiar enlaceEnlace copiado en el portapapeles!
Get a list of all environment variables associated with the specified application.
Method | Resource URL |
---|---|
GET | /broker/rest/application/:id/environment-variables |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/environment-variables --user user@example.com
$ curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/environment-variables --user user@example.com
The API returns the environment variables resource with a list of all available environment variables for the specified application. Unnecessary information and other resource links have been removed for brevity. See Chapter 15, Environment Variables for more information on all parameters for environment variables.
15.3. Get Environment Variable Information Copiar enlaceEnlace copiado en el portapapeles!
Get information about the specified environment variable.
Method | Resource URL |
---|---|
GET | /broker/rest/application/:id/environment-variable/ENV_VAR_NAME |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/environment-variable/MY_ENV_VAR --user user@example.com
$ curl -X GET https://openshift.redhat.com/broker/rest/application/534253991015616165707776/environment-variable/MY_ENV_VAR --user user@example.com
The API returns information about the specified environment variable. Unnecessary information and other resource links have been removed for brevity. See Chapter 15, Environment Variables for more information on all parameters for environment variables.
15.4. Update Environment Variable Copiar enlaceEnlace copiado en el portapapeles!
Update the value of an existing environment variable.
Method | URL Structure |
---|---|
PUT | /broker/rest/application/:id/environment-variable/ENV_VAR_NAME |
Name | Description | Required | Default |
---|---|---|---|
value | Value of environment variable | Yes |
{ "value": "mynewvalue" }
{
"value": "mynewvalue"
}
curl -X PUT https://openshift.redhat.com/broker/rest/application/534253991015616165707776/environment-variable/MY_ENV_VAR --user user@example.com --data-urlencode value=mynewvalue
$ curl -X PUT https://openshift.redhat.com/broker/rest/application/534253991015616165707776/environment-variable/MY_ENV_VAR --user user@example.com --data-urlencode value=mynewvalue
The API returns the environment variables resource with related resource links which have been left out for brevity. See Chapter 15, Environment Variables for more information on all parameters for environment variables.
15.5. Delete Environment Variable Copiar enlaceEnlace copiado en el portapapeles!
Delete an existing environment variable.
Method | Resource URL |
---|---|
DELETE | /broker/rest/application/:id/environment-variable/ENV_VAR_NAME |
Not applicable
curl -X DELETE https://openshift.redhat.com/broker/rest/application/534253991015616165707776/environment-variable/MY_ENV_VAR --user user@example.com
$ curl -X DELETE https://openshift.redhat.com/broker/rest/application/534253991015616165707776/environment-variable/MY_ENV_VAR --user user@example.com
Chapter 16. Gear Groups Copiar enlaceEnlace copiado en el portapapeles!
16.1. Get Application Gear Groups Copiar enlaceEnlace copiado en el portapapeles!
Get a list of gear groups where each group represents a list of gears that share scaling and storage policies.
Note
Method | URL Structure |
---|---|
GET | /broker/rest/application/:id/gear_groups |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/application/5213190e2587c8817a000121/gear_groups --user user@example.com
$ curl -X GET https://openshift.redhat.com/broker/rest/application/5213190e2587c8817a000121/gear_groups --user user@example.com
The API returns a list of all gear groups for the specified application. See Chapter 13, Cartridges for more information on all cartridge parameters.
16.2. Get Application Gear Endpoints Copiar enlaceEnlace copiado en el portapapeles!
Get API endpoints for individual application gears.
Method | URL Structure |
---|---|
GET | /broker/rest/applications/:id/gear_groups |
Not applicable
curl -X GET https://openshift.redhat.com/broker/rest/applications/5213190e2587c8817a000121/gear_groups --user user@myemail.com --data-urlencode include=endpoints
$ curl -X GET https://openshift.redhat.com/broker/rest/applications/5213190e2587c8817a000121/gear_groups --user user@myemail.com --data-urlencode include=endpoints
{ "include": "endpoints" }
{
"include": "endpoints"
}
The API returns a list of all gear groups for the specified application, including API endpoints for individual gears. Some information has been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
Appendix A. Valid Options for API Resources Copiar enlaceEnlace copiado en el portapapeles!
A.1. SSH Keys Copiar enlaceEnlace copiado en el portapapeles!
Name | Valid Options |
---|---|
name | |
type | ssh-rsa ; ssh-dss ; ecdsa-sha2-nistp256-cert-v01@openssh.com ; ecdsa-sha2-nistp384-cert-v01@openssh.com ; ecdsa-sha2-nistp521-cert-v01@openssh.com ; ssh-rsa-cert-v01@openssh.com ; ssh-dss-cert-v01@openssh.com ; ssh-rsa-cert-v00@openssh.com ; ssh-dss-cert-v00@openssh.com ; ecdsa-sha2-nistp256 ; ecdsa-sha2-nistp384 ; ecdsa-sha2-nistp521 |
content |
A.2. Authorizations Copiar enlaceEnlace copiado en el portapapeles!
Name | Valid Options |
---|---|
scope | session ; read ; userinfo ; domain/:id/view ; domain/:id/edit ; domain/:id/admin ; application/:id/view ; application/:id/edit ; application/:id/admin |
note | |
expires_in | |
reuse | true ; false |
A.3. Domains Copiar enlaceEnlace copiado en el portapapeles!
Name | Valid Options |
---|---|
name | |
allowed_gear_sizes | small; medium; large; c9 |
owner | User input; @self |
force |
A.4. Teams Copiar enlaceEnlace copiado en el portapapeles!
A.5. Members Copiar enlaceEnlace copiado en el portapapeles!
A.6. Applications Copiar enlaceEnlace copiado en el portapapeles!
Name | Valid Options |
---|---|
name | |
cartridges | python-3.3 ; python-2.7 ; python-2.6 ; ruby-2.0 ; ruby-1.9 ; ruby-1.8 ; jenkins-1 ; jbossews-2.0 ; jbossews-1.0 ; perl-5.10 ; php-5.3 ; php-5.4 ; jbosseap-6 ; diy-0.1 |
scale | true ; false |
gear_size | small ; small.highcpu ; medium ; large |
initial_git_url | URL; empty |
cartridges[][name] | python-3.3 ; python-2.7 ; python-2.6 ; ruby-2.0 ; ruby-1.9 ; ruby-1.8 ; jenkins-1 ; jbossews-2.0 ; jbossews-1.0 ; perl-5.10 ; php-5.3 ; php-5.4 ; jbosseap-6 ; diy-0.1 |
cartridges[][gear_size] | small ; small.highcpu ; medium ; large |
cartridges[][url] | |
environment_variables | |
auto_deploy [a] | true ; false |
deployment_type [b] | git ; binary |
deployment_branch [c] | |
keep_deployments [d] | |
event | make-ha ; disable-ha ; start ; stop ; force-stop ; restart ; scale-up ; scale-down ; tidy ; reload ; thread-dump |
owner | User input; @self |
[a]
The auto_deploy option can only be set when modifying an existing application.
[b]
The deployment_type option can only be set when modifying an existing application.
[c]
The deployment_branch option can only be set when modifying an existing application.
[d]
The keep_deployments option can only be set when modifying an existing application.
|
See Also:
A.7. Cartridges Copiar enlaceEnlace copiado en el portapapeles!
Name | Valid Options |
---|---|
name | cron-1.4 ; mysql-5.1 ; mysql-5.5 ; postgresql-9.2 ; haproxy-1.4 ; jenkins-client-1 |
colocate_with | ruby-1.9 ; haproxy-1.4 |
scales_from | |
scales_to | |
additional_storage | |
gear_size | small ; medium |
url | |
environment_variables | |
additional_gear_storage |
A.8. Deployments Copiar enlaceEnlace copiado en el portapapeles!
Name | Valid Options |
---|---|
ref | |
artifact_url | |
hot_deploy | true ; false |
force_clean_build | true ; false |
deployments |
Appendix B. Revision History Copiar enlaceEnlace copiado en el portapapeles!
Revision History | |||||||||
---|---|---|---|---|---|---|---|---|---|
Revision 2.1-2 | Thur 11 Dec 2014 | ||||||||
| |||||||||
Revision 2.1-1 | Wed 20 Aug 2014 | ||||||||
| |||||||||
Revision 2.1-0 | Fri May 16 2014 | ||||||||
| |||||||||
Revision 2.0-1 | Wed Feb 26 2014 | ||||||||
| |||||||||
Revision 2.0-0 | Mon Dec 9 2013 | ||||||||
|
Legal Notice
Copyright © 2025 Red Hat
OpenShift documentation is licensed under the Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0).
Modified versions must remove all Red Hat trademarks.
Portions adapted from https://github.com/kubernetes-incubator/service-catalog/ with modifications by Red Hat.
Red Hat, Red Hat Enterprise Linux, the Red Hat logo, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation’s permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.