REST API Documentation version 1.6

Resources

Api
User
Key
Authorization
Domain
Team
Member
Application
Cartridge
Alias
Environment variable
Gear group
Descriptor
Deployment

Api

Authentication

The OpenShift API uses Basic Authentication. A client is required to send the username and password, separated by a colon, with all requests to correctly authenticate. For example, send the credentials as username:password. This string is encoded with Base64 algorithm, and transmitted in the HTTP authorization header in the formats shown below.

Using Ruby

  require 'base64'
  base64string = Base64.encode64("#{username}:#{password}").strip
  headers = { "Authorization" => "Basic #{base64string}" }

Using Python

  import base64
  base64string = base64.encodestring('%s:%s' % (username, password))[:-1]
  request.add_header("Authorization", "Basic %s" % base64string)

Using cURL

The cURL library supports basic authentication using the --user or -u option, as shown in the example below.
  $ curl -k https://openshift.redhat.com/broker/rest/user --user "[email protected]:password"

API Response

Each response from the REST API contains te following information
NameDescription
statusHTTP status text e.g. ok, not_found, etc
dataThe data requested from the API (may be null in cases where there is no data to return)
typeThe type of data e.g. application, cartridge, etc (may be null in cases where there is no data)
messagesAn Array of messages returned to the client (See API Messages)
API versionThe API version requested by client and returned by the API. The version defaults to latest if the client does not specify a version (See Version)
supported API versionsAn Array of supported API versions

API Messages

Each response from the REST API may contain 0 or more messages.
NameDescription
severityThe severity of the message e.g. debug, info, warning, error or result
textThe text of the message
fieldIndicates that the message is relevant to a particual field in the resource. Used for validation errors. May be null.
exit codeExit code returned from API (0 if everyhting is ok)

Note: Messages with severity=result contain information that should be passed on to the user. For example the database username and password.

API Version

Every OpenShift REST API call returns the current API version, and other versions that are supported.
For example:
{
  "supported_api_versions": [
   1.0,
   1.1,
   1.2,
   1.3,
   1.4
  ],
  "api_version": 1.5
}
To request a specific API version, the client must include a HTTP header with the request.
  JSON Clients       Accept: application/json; version=1.4
 
  XML Clients        Accept: application/xml; version=1.4
If the version requested by the client is not supported, the server responds with the HTTP status code 406, as shown below.
{
  "messages": [
    {
      "field": null,
      "severity": "error",
      "text": "Requested API version 2.0 is not supported. Supported versions are 1.0, 1.1, 1.2, 1.3, 1.4"
    }
  ],
  "status": "not_acceptable",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4
  ],
  "api_version": 1.4
}

Response Type

Although OpenShift supports both XML and JSON response formats, the default server response is in JSON. To receive the response in XML, send the following HTTP header with your request:
  Accept: application/xml
Example using cURL
  $ curl -k "https://openshift.redhat.com/broker/rest/api" -H "Accept: application/xml"

Links

The OpenShift REST API implements the Hypermedia as the Engine of Application State, or HATEOAS, design principle of the REST application architecture. This principle implies that the interaction between a client and a network application happens entirely through links provided dynamically by the application server. No prior knowledge, beyond a generic understanding of REST and HTTP protocol, is required from the REST client on how to interact with any particular application or server. Entry to the REST application by a REST client is through a simple fixed URL. All future actions the client takes are discovered within resource representations returned from the server. The client selects the links within these resources to navigate to the required resource.

Each resource returned by the OpenShift REST API will have an array of relevant links embedded in it. Each link has the following attributes:
nameDescription
methodHTTP method to use with resource link: GET, PUT, POST or DELETE
hrefThe full URI for the resource
required parametersAn Array of input parameters that the client is required to provide
optional parametersAn Array of optional input parameters

Each required input parameter has the following attributes:
NameDescription
nameThe name of the parameter
typeThe type of the paramater e.g. String, Integer, Array or Boolean
descriptionA brief description of the paramater
valid optionsAn Array of valid values (May be empty)
invalid optionsAn Array of invalid values (May be empty)

Each optional input parameter has the following attributes:
NameDescription
nameThe name of the parameter
typeThe type of the paramater e.g. String, Integer, Array or Boolean
descriptionA brief description of the paramater
valid optionsAn Array of valid values (May be empty)
default valueThe value this parameter defaults to if not provided by the client

Note: The links can be excluded from the API response by passing nolinks=true to any API call.

HTTP Status Codes

The OpenShift REST API attempts to return standard HTTP status codes, with the more common status codes shown in the table below along with a brief description of each.

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.

Api entry point

GET /broker/rest/api
Response
{
  "api_version": 1.6,
  "data": {
    "API": {
      "href": "https://openshift.redhat.com/broker/rest/api",
      "method": "GET",
      "optional_params": [

      ],
      "rel": "API entry point",
      "required_params": [

      ]
    },
    "GET_ENVIRONMENT": {
      "href": "https://openshift.redhat.com/broker/rest/environment",
      "method": "GET",
      "optional_params": [

      ],
      "rel": "Get environment information",
      "required_params": [

      ]
    },
    "GET_USER": {
      "href": "https://openshift.redhat.com/broker/rest/user",
      "method": "GET",
      "optional_params": [

      ],
      "rel": "Get user information",
      "required_params": [

      ]
    },
    "ADD_DOMAIN": {
      "href": "https://openshift.redhat.com/broker/rest/domains",
      "method": "POST",
      "optional_params": [
        {
          "default_value": null,
          "description": "A list of gear sizes that are allowed to be created on this domain",
          "name": "allowed_gear_sizes",
          "type": "array",
          "valid_options": [
            "small",
            "medium",
            "large",
            "c9"
          ]
        }
      ],
      "rel": "Create new domain",
      "required_params": [
        {
          "description": "Name of the domain",
          "invalid_options": [
            "amentra",
            "aop",
            "apiviz",
            "arquillian",
            "blacktie",
            "boxgrinder",
            "byteman",
            "cirras",
            "cloud",
            "cloudforms",
            "cygwin",
            "davcache",
            "dogtag",
            "drools",
            "drools",
            "ejb3",
            "errai",
            "esb",
            "fedora",
            "freeipa",
            "gatein",
            "git",
            "gfs",
            "gravel",
            "guvnor",
            "hibernate",
            "hornetq",
            "iiop",
            "infinispan",
            "ironjacamar",
            "javassist",
    ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/api 

User

This resource provides information that allow a client to manage OpenShift user account information.
The table below describes each parameter associated with a user account.
NameDescription
capabilities Map of user capabilities. See the table below 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.
plan_id Subscription plan of the specified user.
plan_state State of the account for the specified user.

The table below further describes each available capability for the user.
NameDescription
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_certificatesWhether the user can add their own private SSL certificates

Get user information

GET /broker/rest/user
Response
{
  "api_version": 1.6,
  "data": {
    "capabilities": {
      "subaccounts": false,
      "gear_sizes": [
        "small"
      ],
      "plan_upgrade_enabled": true,
      "view_global_teams": true,
      "private_ssl_certificates": true,
      "ha": true,
      "max_storage_per_gear": 20
    },
    "consumed_gears": 0,
    "created_at": "2014-04-30T03:58:09Z",
    "email": null,
    "id": "536074d1194e4cdc2a000001",
    "login": "[email protected]",
    "max_domains": 1,
    "max_gears": 3,
    "max_teams": 10,
    "plan_expiration_date": null,
    "plan_id": "free",
    "plan_quantity": 1,
    "plan_state": "ACTIVE",
    "usage_account_id": null,
    "usage_rates": {
    }
  },
  "messages": [

  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "user",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/user

Key

This resource provides information that allows a client to view and manage SSH keys.
The table below describes each parameter associated with SSH keys.
NameDescription
nameName of the SSH key as specific by the user.
contentContent of the public SSH key.
typeType of SSH key; for example, RSA or DSA.

Add new ssh key

POST /broker/rest/user/keys
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
nameName of the keyYesN/A
typeType of Key
Note: Valid options may be different on your actual implementation of OpenShift.
Yesssh-rsa, ssh-dss, [email protected], [email protected], [email protected], [email protected], krb5-principalN/A
contentThe key portion of an ssh key (excluding key type and comment)YesN/A
Request
{
  "name": "mykey",
  "type": "ssh-rsa",
  "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtWQcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+BMOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M+n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3"
}
Response
{
  "api_version": 1.6,
  "data": {
    "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtWQcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+BMOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M+n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3",
    "name": "mykey",
    "type": "ssh-rsa"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Created SSH key mykey"
    }
  ],
  "status": "created",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "key",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/user/keys  --data-urlencode name=mykey  --data-urlencode type=ssh-rsa  --data-urlencode content=AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtWQcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+BMOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M+n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3 

List ssh keys

GET /broker/rest/user/keys
Response
{
  "api_version": 1.6,
  "data": [
    {
      "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCw6NXzjOTOrpQbzG4KjJXXRGLk6g8KCNjjMnqA34WA4SEPeCrCVbDPHlyY/2ygb3XRML/UhcImyzJfelQLSVmygUEzLn03ES3GhYKdyENDlp9mtMih8Dyk4g7CpqYoClIm/S9m2UrAvvt9fTcN6SatOXeOTayhLVvk3VJBYJQRL5c135mmqko90x8O8ixNAN1FP920jOVlHBFIFHePDFKvSfqjC7p8nIYvIowODZPk7vnI//m6lyDbKuxdwO5RnqyBHJtVST7+tyPuC3Kh0Y7tjAB/KsFMs5G+OTqT6b3gNPS6DoyGf6y1umGW1YepVc+pGcwLk93Ra9hU0GB1qA3t",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/user/keys/mykey",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get SSH key",
          "required_params": [

          ]
        },
        "UPDATE": {
          "href": "https://openshift.redhat.com/broker/rest/user/keys/mykey",
          "method": "PUT",
          "optional_params": [

          ],
          "rel": "Update SSH key",
          "required_params": [
            {
              "description": "Type of Key",
              "invalid_options": [

              ],
              "name": "type",
              "type": "string",
              "valid_options": [
                "ssh-rsa",
                "ssh-dss",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "krb5-principal"
              ]
            },
            {
              "description": "The key portion of an rsa key (excluding ssh key type and comment)",
              "invalid_options": [

              ],
              "name": "content",
              "type": "string",
              "valid_options": [

              ]
            }
          ]
        },
        "DELETE": {
          "href": "https://openshift.redhat.com/broker/rest/user/keys/mykey",
          "method": "DELETE",
          "optional_params": [

          ],
          "rel": "Delete SSH key",
          "required_params": [

          ]
     ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/user/keys 

Get ssh key

GET /broker/rest/user/keys/:name
Response
{
  "api_version": 1.6,
  "data": {
    "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtWQcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+BMOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M+n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3",
    "name": "mykey",
    "type": "ssh-rsa"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Found SSH key 'mykey'"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "key",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/user/keys/mykey 

Update ssh key

PUT /broker/rest/user/keys/:name
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
typeType of Key
Note: Valid options may be different on your actual implementation of OpenShift.
Yesssh-rsa, ssh-dss, [email protected], [email protected], [email protected], [email protected], krb5-principalN/A
contentThe key portion of an rsa key (excluding ssh key type and comment)YesN/A
Request
{
  "type": "ssh-rsa",
  "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCw6NXzjOTOrpQbzG4KjJXXRGLk6g8KCNjjMnqA34WA4SEPeCrCVbDPHlyY/2ygb3XRML/UhcImyzJfelQLSVmygUEzLn03ES3GhYKdyENDlp9mtMih8Dyk4g7CpqYoClIm/S9m2UrAvvt9fTcN6SatOXeOTayhLVvk3VJBYJQRL5c135mmqko90x8O8ixNAN1FP920jOVlHBFIFHePDFKvSfqjC7p8nIYvIowODZPk7vnI//m6lyDbKuxdwO5RnqyBHJtVST7+tyPuC3Kh0Y7tjAB/KsFMs5G+OTqT6b3gNPS6DoyGf6y1umGW1YepVc+pGcwLk93Ra9hU0GB1qA3t"
}
Response
{
  "api_version": 1.6,
  "data": {
    "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCw6NXzjOTOrpQbzG4KjJXXRGLk6g8KCNjjMnqA34WA4SEPeCrCVbDPHlyY/2ygb3XRML/UhcImyzJfelQLSVmygUEzLn03ES3GhYKdyENDlp9mtMih8Dyk4g7CpqYoClIm/S9m2UrAvvt9fTcN6SatOXeOTayhLVvk3VJBYJQRL5c135mmqko90x8O8ixNAN1FP920jOVlHBFIFHePDFKvSfqjC7p8nIYvIowODZPk7vnI//m6lyDbKuxdwO5RnqyBHJtVST7+tyPuC3Kh0Y7tjAB/KsFMs5G+OTqT6b3gNPS6DoyGf6y1umGW1YepVc+pGcwLk93Ra9hU0GB1qA3t",
    "name": "mykey",
    "type": "ssh-rsa"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Updated SSH key mykey for user [email protected]"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "key",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X PUT -u [email protected]:password https://openshift.redhat.com/broker/rest/user/keys/mykey  --data-urlencode type=ssh-rsa  --data-urlencode content=AAAAB3NzaC1yc2EAAAADAQABAAABAQCw6NXzjOTOrpQbzG4KjJXXRGLk6g8KCNjjMnqA34WA4SEPeCrCVbDPHlyY/2ygb3XRML/UhcImyzJfelQLSVmygUEzLn03ES3GhYKdyENDlp9mtMih8Dyk4g7CpqYoClIm/S9m2UrAvvt9fTcN6SatOXeOTayhLVvk3VJBYJQRL5c135mmqko90x8O8ixNAN1FP920jOVlHBFIFHePDFKvSfqjC7p8nIYvIowODZPk7vnI//m6lyDbKuxdwO5RnqyBHJtVST7+tyPuC3Kh0Y7tjAB/KsFMs5G+OTqT6b3gNPS6DoyGf6y1umGW1YepVc+pGcwLk93Ra9hU0GB1qA3t 

Delete ssh key

DELETE /broker/rest/user/keys/:name
Response
{
  "api_version": 1.6,
  "data": {
    "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCw6NXzjOTOrpQbzG4KjJXXRGLk6g8KCNjjMnqA34WA4SEPeCrCVbDPHlyY/2ygb3XRML/UhcImyzJfelQLSVmygUEzLn03ES3GhYKdyENDlp9mtMih8Dyk4g7CpqYoClIm/S9m2UrAvvt9fTcN6SatOXeOTayhLVvk3VJBYJQRL5c135mmqko90x8O8ixNAN1FP920jOVlHBFIFHePDFKvSfqjC7p8nIYvIowODZPk7vnI//m6lyDbKuxdwO5RnqyBHJtVST7+tyPuC3Kh0Y7tjAB/KsFMs5G+OTqT6b3gNPS6DoyGf6y1umGW1YepVc+pGcwLk93Ra9hU0GB1qA3t",
    "name": "mykey",
    "type": "ssh-rsa"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Updated SSH key mykey for user [email protected]"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "key",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X DELETE -u [email protected]:password https://openshift.redhat.com/broker/rest/user/keys/mykey 

Authorization

This chapter provides information on API resources to add, view, and manage authorization tokens. An authorization token is a secret value that allows access to an OpenShift account without having to supply login information each time. An authorization token can also be used to grant another user access to your account. Authorization tokens use scopes to determine the type of access a user is granted and what they can do with that token; for example full access versus limited access. Authorization tokens are easily managed, and offer better security because you are not repeatedly supplying your login credentials. For example, if your password is ever compromised, the password must be reset. If a secret authorization token is compromised, that token can be revoked and another one created. The table below describes each parameter associated with an OpenShift authorization token.
NameDescription
idUnique OpenShift login that created this authorization token.
scopeScope 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.
noteA reminder description of what the authorization is for.
expires_inTotal time in seconds before this authorization expires. Out of range values will be set to the maximum allowed time.
expires_in_secondsRemaining time in seconds before this authorization expires.
reuseAttempt to locate and reuse an authorization that matches the scope and note and has not yet expired.
tokenAuthorization string that contains user credentials.
The table below describes the available scope options that determine the type of access a user is granted with an authorization.
NameDescription
sessionEquivalent of logging into an account with normal login credentials such as user name and password.
readAccess to the API is read-only, while authorization endpoints cannot be read.
userinfoOnly read access to the /user API resource is provided.

List authorizations

GET /broker/rest/user/authorizations
Response
{
  "api_version": 1.6,
  "data": [

  ],
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "List authorizations"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "authorizations",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/user/authorizations 

Add new authorization

POST /broker/rest/user/authorizations
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
scopeSelect one or more scopes that this authorization will grant access to:

* session
Grants a client the authority to perform all API actions against your account. Valid for about 1 month.
* read
Allows the client to access resources you own without making changes. Does not allow access to view authorization tokens. Valid for 6 months.
* userinfo
Allows a client to view your login name, unique id, and your user capabilities. Valid for 6 months.
* domain/:id/view
Grant read-only access to a single domain. Valid for 6 months.
* domain/:id/edit
Grant edit access to a single domain and all its applications. Valid for 6 months.
* domain/:id/admin
Grant full administrative access to a single domain and all its applications. Valid for 6 months.
* application/:id/view
Grant read-only access to a single application. Valid for 6 months.
* application/:id/edit
Grant edit access to a single application. Valid for 6 months.
* application/:id/admin
Grant full administrative access to a single application. Valid for 6 months.
Note: Valid options may be different on your actual implementation of OpenShift.
Nosession, read, userinfo, domain/:id/view, domain/:id/edit, domain/:id/admin, application/:id/view, application/:id/edit, application/:id/adminuserinfo
noteA description to remind you what this authorization is for.No
expires_inThe number of seconds before this authorization expires. Out of range values will be set to the maximum allowed time.No-1
reuseAttempt to locate and reuse an authorization that matches the scope and note and has not yet expired.Notrue, falsefalse
Request
{
  "note": "This is a note to myself"
}
Response
{
  "api_version": 1.6,
  "data": {
    "created_at": "2014-04-30T04:01:52Z",
    "expires_in": 15552000,
    "expires_in_seconds": 15552000,
    "id": "536075b0194e4c85ef000024",
    "identity": "[email protected]",
    "note": "This is a note to myself",
    "scopes": "userinfo",
    "token": "bdafca27070328eb0b666d7bad4266130633f706afff95d2128519a396069b0a"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Create authorization"
    }
  ],
  "status": "created",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "authorization",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/user/authorizations  --data-urlencode note=This is a note to myself 

Get authorization

GET /broker/rest/user/authorization/:id
Response
{
  "api_version": 1.6,
  "data": {
    "created_at": "2014-04-30T04:01:52Z",
    "expires_in": 15552000,
    "expires_in_seconds": 15552000,
    "id": "536075b0194e4c85ef000024",
    "identity": "[email protected]",
    "note": "This is a note to myself",
    "scopes": "userinfo",
    "token": "bdafca27070328eb0b666d7bad4266130633f706afff95d2128519a396069b0a"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Display authorization"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "authorization",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/user/authorization/536075b0194e4c85ef000024 

Update authorization

PUT /broker/rest/user/authorization/:id
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
noteA note to remind you what this token is for.YesN/A
Request
{
  "note": "This is my UPDATED note to myself"
}
Response
{
  "api_version": 1.6,
  "data": {
    "created_at": "2014-04-30T04:01:52Z",
    "expires_in": 15552000,
    "expires_in_seconds": 15552000,
    "id": "536075b0194e4c85ef000024",
    "identity": "[email protected]",
    "note": "This is my UPDATED note to myself",
    "scopes": "userinfo",
    "token": "bdafca27070328eb0b666d7bad4266130633f706afff95d2128519a396069b0a"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Change authorization"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "authorization",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X PUT -u [email protected]:password https://openshift.redhat.com/broker/rest/user/authorization/536075b0194e4c85ef000024  --data-urlencode note=This is my UPDATED note to myself 

Delete authorization

DELETE /broker/rest/user/authorization/:id
Response
{
  "api_version": 1.6,
  "data": {
    "created_at": "2014-04-30T04:01:52Z",
    "expires_in": 15552000,
    "expires_in_seconds": 15552000,
    "id": "536075b0194e4c85ef000024",
    "identity": "[email protected]",
    "note": "This is my UPDATED note to myself",
    "scopes": "userinfo",
    "token": "bdafca27070328eb0b666d7bad4266130633f706afff95d2128519a396069b0a"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Change authorization"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "authorization",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X DELETE -u [email protected]:password https://openshift.redhat.com/broker/rest/user/authorization/536075b0194e4c85ef000024 

Domain

This chapter provides information on API resources to add, update, and manage OpenShift user domains. A domain must be created before an OpenShift application can be created. Domain names on OpenShift are non-strict, meaning there is no preceding period, and form part of the application name. Therefore, the syntax for the application name is ApplicationName–DomainName.DomainSuffix. Each username can only support a single domain, but multiple applications can be created within a domain.
The table below describes each parameter associated with an OpenShift domain.
NameDescription
nameThe name of the domain
suffixDomain suffix

Create new domain

POST /broker/rest/domains
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
nameName of the domainYesN/A
allowed_gear_sizesA list of gear sizes that are allowed to be created on this domainNosmall, medium, large, c9
Request
{
  "name": "mydomain"
}
Response
{
  "api_version": 1.6,
  "data": {
    "allowed_gear_sizes": [
      "small"
    ],
    "available_gears": 3,
    "creation_time": "2014-04-30T03:58:40Z",
    "id": "536074f0194e4cdfd100000b",
    "max_storage_per_gear": 20,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "owner",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/domain/mydomain/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/domain/mydomain/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/domain/mydomain/member/536074d1194e4cdc2a000001",
            "method": "DELETE",
            "optional_params": [

            ],
            "rel": "Delete member",
            "required_params": [

            ]
          }
        },
        "login": "[email protected]",
        "owner": true,
        "role": "admin",
        "type": "user"
      }
    ],
    "name": "mydomain",
    "private_ssl_certificates": true,
    "suffix": "dev.rhcloud.com",
    "usage_rates": {
    }
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/domains  --data-urlencode name=mydomain 

List all domains you have access to

GET /broker/rest/domains
Response
{
  "api_version": 1.6,
  "data": [
    {
      "allowed_gear_sizes": [
        "small"
      ],
      "available_gears": 0,
      "creation_time": "2014-04-30T03:58:40Z",
      "id": "536074f0194e4cdfd100000b",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/domain/mydomain",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get domain",
          "required_params": [

          ]
        },
        "ADD_APPLICATION": {
          "href": "https://openshift.redhat.com/broker/rest/domain/mydomain/applications",
          "method": "POST",
          "optional_params": [
            {
              "default_value": null,
              "description": "Array of one or more cartridge names",
              "name": "cartridges",
              "type": "array",
              "valid_options": [

              ]
            },
            {
              "default_value": false,
              "description": "Mark application as scalable",
              "name": "scale",
              "type": "boolean",
              "valid_options": [
                true,
                false
              ]
            },
            {
              "default_value": "small",
              "description": "The size of the gear",
              "name": "gear_size",
              "type": "string",
              "valid_options": [
                "small"
              ]
            },
            {
              "default_value": null,
              "description": "A URL to a Git source code repository that will be the basis for this application.",
              "name": "initial_git_url",
              "type": "string",
              "valid_options": [
                "",
                "empty"
              ]
            },
            {
              "default_value": null,
              "description": "Name of a cartridge.",
              "name": "cartridges[][name]",
              "type": "string",
              "valid_options": [

 ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/domains 

List domains by owner

GET /broker/rest/domains
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
ownerReturn only the domains owned by the specified user id or identity. Use @self to refer to the current user.Yes@selfN/A
Request
{
  "owner": "@self"
}
Response
{
  "api_version": 1.6,
  "data": [
    {
      "allowed_gear_sizes": [
        "small"
      ],
      "available_gears": 0,
      "creation_time": "2014-04-30T03:58:40Z",
      "id": "536074f0194e4cdfd100000b",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/domain/mydomain",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get domain",
          "required_params": [

          ]
        },
        "ADD_APPLICATION": {
          "href": "https://openshift.redhat.com/broker/rest/domain/mydomain/applications",
          "method": "POST",
          "optional_params": [
            {
              "default_value": null,
              "description": "Array of one or more cartridge names",
              "name": "cartridges",
              "type": "array",
              "valid_options": [

              ]
            },
            {
              "default_value": false,
              "description": "Mark application as scalable",
              "name": "scale",
              "type": "boolean",
              "valid_options": [
                true,
                false
              ]
            },
            {
              "default_value": "small",
              "description": "The size of the gear",
              "name": "gear_size",
              "type": "string",
              "valid_options": [
                "small"
              ]
            },
            {
              "default_value": null,
              "description": "A URL to a Git source code repository that will be the basis for this application.",
              "name": "initial_git_url",
              "type": "string",
              "valid_options": [
                "",
                "empty"
              ]
            },
            {
              "default_value": null,
              "description": "Name of a cartridge.",
              "name": "cartridges[][name]",
              "type": "string",
              "valid_options": [

 ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/domains  --data-urlencode owner=@self 

Get domain

GET /broker/rest/domain/:name
Response
{
  "api_version": 1.6,
  "data": {
    "allowed_gear_sizes": [
      "small"
    ],
    "available_gears": 3,
    "creation_time": "2014-04-30T03:58:40Z",
    "id": "536074f0194e4cdfd100000b",
    "max_storage_per_gear": 20,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "owner",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/domain/mydomain/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/domain/mydomain/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/domain/mydomain/member/536074d1194e4cdc2a000001",
            "method": "DELETE",
            "optional_params": [

            ],
            "rel": "Delete member",
            "required_params": [

            ]
          }
        },
        "login": "[email protected]",
        "owner": true,
        "role": "admin",
        "type": "user"
      }
    ],
    "name": "mydomain",
    "private_ssl_certificates": true,
    "suffix": "dev.rhcloud.com",
    "usage_rates": {
    }
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/domain/mydomain 

Remove yourself as a member of the domain

DELETE /broker/rest/domain/:name/members/self
Example using curl command
curl -X DELETE -u [email protected]:password https://openshift.redhat.com/broker/rest/domain/mydomain/members/self 

Update domain

PUT /broker/rest/domain/:name
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
nameName of the domainYesN/A
allowed_gear_sizesArray of zero or more gear sizes allowed on this domainNosmall, medium, large, c9
Request
{
  "name": "xmydomainx"
}
Example using curl command
curl -X PUT -u [email protected]:password https://openshift.redhat.com/broker/rest/domain/mydomain  --data-urlencode name=xmydomainx 

Delete domain

DELETE /broker/rest/domain/:name
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
forceForce delete domain. i.e. delete any applications under this domainNotrue, falsefalse
Example using curl command
curl -X DELETE -u [email protected]:password https://openshift.redhat.com/broker/rest/domain/mydomain 

Team

This chapter provides information on API resources to create and manage OpenShift teams. A team is a group of users bundled together for the purposes of access control. You can add a team as a member to a domain the same way you would add a user.
The table below describes each parameter associated with an OpenShift team.
NameDescription
nameThe name of the team
idThe unique identifier

Create new team

POST /broker/rest/teams
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
nameName of the teamYesN/A
Request
{
  "name": "myteam"
}
Response
{
  "api_version": 1.6,
  "data": {
    "global": false,
    "id": "536075af194e4c85ef000022",
    "maps_to": null,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "owner",
            "role": "view"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d1194e4cdc2a000001",
            "method": "DELETE",
            "optional_params": [

            ],
            "rel": "Delete member",
            "required_params": [

            ]
          }
        },
        "login": "[email protected]",
        "owner": true,
        "role": "view",
        "type": "user"
      }
    ],
    "name": "myteam"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Added myteam"
    }
  ],
  "status": "created",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "team"...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/teams  --data-urlencode name=myteam 

List all teams you are a member of

GET /broker/rest/teams
Response
{
  "api_version": 1.6,
  "data": [
    {
      "global": false,
      "id": "536075af194e4c85ef000022",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get team",
          "required_params": [

          ]
        },
        "ADD_MEMBER": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/members",
          "method": "POST",
          "optional_params": [
            {
              "default_value": null,
              "description": "Unique identifier of the user",
              "name": "id",
              "type": "string",
              "valid_options": [

              ]
            },
            {
              "default_value": null,
              "description": "The user's login attribute",
              "name": "login",
              "type": "string",
              "valid_options": [

              ]
            }
          ],
          "rel": "add member",
          "required_params": [
            {
              "description": "The role the user should have on the team",
              "invalid_options": [

              ],
              "name": "role",
              "type": "string",
              "valid_options": [
                "view"
              ]
            }
          ]
        },
        "LIST_MEMBERS": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/members",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "list members",
          "required_params": [

          ]
        },
        "UPDATE_MEMBERS": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/members",
          "method": "PATCH",
          "optional_params": [
            {
              "default_value": null,
              "description": "Unique identifier of the user",
              "name": "id...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/teams 

List teams by owner

GET /broker/rest/teams
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
ownerReturn only the teams owned by the specified user id or identity. Use @self to refer to the current user.Yes@selfN/A
Request
{
  "owner": "@self"
}
Response
{
  "api_version": 1.6,
  "data": [
    {
      "global": false,
      "id": "536075af194e4c85ef000022",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get team",
          "required_params": [

          ]
        },
        "ADD_MEMBER": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/members",
          "method": "POST",
          "optional_params": [
            {
              "default_value": null,
              "description": "Unique identifier of the user",
              "name": "id",
              "type": "string",
              "valid_options": [

              ]
            },
            {
              "default_value": null,
              "description": "The user's login attribute",
              "name": "login",
              "type": "string",
              "valid_options": [

              ]
            }
          ],
          "rel": "add member",
          "required_params": [
            {
              "description": "The role the user should have on the team",
              "invalid_options": [

              ],
              "name": "role",
              "type": "string",
              "valid_options": [
                "view"
              ]
            }
          ]
        },
        "LIST_MEMBERS": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/members",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "list members",
          "required_params": [

          ]
        },
        "UPDATE_MEMBERS": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/members",
          "method": "PATCH",
          "optional_params": [
            {
              "default_value": null,
              "description": "Unique identifier of the user",
              "name": "id...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/teams  --data-urlencode owner=@self 

Search teams by name

GET /broker/rest/teams
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
searchSearch string must be at least 2 charactersYesN/A
globalSearch global teamsYestrue, falseN/A
Request
{
  "search": "engineering",
  "global": true
}
Response
{
  "api_version": 1.6,
  "data": [
    {
      "global": true,
      "id": "536074ec56ee376f38000001",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/team/536074ec56ee376f38000001",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get team",
          "required_params": [

          ]
        },
        "LIST_MEMBERS": {
          "href": "https://openshift.redhat.com/broker/rest/team/536074ec56ee376f38000001/members",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "list members",
          "required_params": [

          ]
        }
      },
      "maps_to": "cn=engineering-team,ou=Groups,dc=example,dc=com",
      "name": "engineering-team"
    }
  ],
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Found 1 teams"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "teams",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/teams  --data-urlencode search=engineering  --data-urlencode global=true 

Get team

GET /broker/rest/team/:id
Response
{
  "api_version": 1.6,
  "data": {
    "global": false,
    "id": "536075af194e4c85ef000022",
    "maps_to": null,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "owner",
            "role": "view"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d1194e4cdc2a000001",
            "method": "DELETE",
            "optional_params": [

            ],
            "rel": "Delete member",
            "required_params": [

            ]
          }
        },
        "login": "[email protected]",
        "owner": true,
        "role": "view",
        "type": "user"
      }
    ],
    "name": "myteam"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Showing team 536075af194e4c85ef000022 for user [email protected]"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
  ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022 

Leave team

DELETE /broker/rest/team/:id/members/self
Example using curl command
curl -X DELETE -u [email protected]:password https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/members/self 

Delete team

DELETE /broker/rest/team/:id
Example using curl command
curl -X DELETE -u [email protected]:password https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022 

Member

This chapter provides information on API resources to create and manage OpenShift members. A member is a user or team that has been given access to a domain.
The table below describes each parameter associated with an OpenShift team.
NameDescription
idThe unique identifier
roleThe role the member has been give
typeThe member type i.e. user or team
fromThe source of membership
ownerWhether the member is the owner of the resource

List members of this domain

GET /broker/rest/domain/:name/members
Response
{
  "api_version": 1.6,
  "data": [
    {
      "explicit_role": null,
      "from": [
        {
          "type": "owner",
          "role": "admin"
        }
      ],
      "id": "536074d1194e4cdc2a000001",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/domain/mydomain/member/536074d1194e4cdc2a000001",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get member",
          "required_params": [

          ]
        },
        "UPDATE": {
          "href": "https://openshift.redhat.com/broker/rest/domain/mydomain/member/536074d1194e4cdc2a000001",
          "method": "PUT",
          "optional_params": [

          ],
          "rel": "Update member",
          "required_params": [
            {
              "description": "New role for member",
              "invalid_options": [

              ],
              "name": "role",
              "type": "string",
              "valid_options": [

              ]
            }
          ]
        },
        "DELETE": {
          "href": "https://openshift.redhat.com/broker/rest/domain/mydomain/member/536074d1194e4cdc2a000001",
          "method": "DELETE",
          "optional_params": [

          ],
          "rel": "Delete member",
          "required_params": [

          ]
        }
      },
      "login": "[email protected]",
      "owner": true,
      "role": "admin",
      "type": "user"
    }
  ],
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Found 1 member."
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "members",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/domain/mydomain/members 

Add or remove one or more members to this domain.

PATCH /broker/rest/domain/:name/members
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
roleThe role the member should have on the domainYesview, edit, adminN/A
typeThe member's type. i.e. user or teamNouser, teamuser
idUnique identifier of the member for the given member type (user or team ID)No
loginThe user's login attributeNo
membersAn array of members to add with corresponding type and role. e.g. {'members': [{'login': 'foo', 'type': 'user', 'role': 'view'}, {'id': '5326534e2046fde9d3000001', 'type': 'team', 'role': 'none'}]}No
Request
{
  "role": "view",
  "type": "user",
  "login": "[email protected]"
}
Response
{
  "api_version": 1.6,
  "data": {
    "explicit_role": "view",
    "id": "536074d2194e4cdc2a000003",
    "login": "[email protected]",
    "owner": false,
    "role": "view",
    "type": "user"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Added 1 member."
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "member",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X PATCH -u [email protected]:password https://openshift.redhat.com/broker/rest/domain/mydomain/members  --data-urlencode role=view  --data-urlencode type=user  --data-urlencode [email protected] 

Add member

POST /broker/rest/team/:id/members
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
roleThe role the user should have on the teamYesviewN/A
idUnique identifier of the userNo
loginThe user's login attributeNo
Request
{
  "role": "view",
  "login": "[email protected]"
}
Response
{
  "api_version": 1.6,
  "data": {
    "explicit_role": "view",
    "id": "536074d2194e4cdc2a000003",
    "login": "[email protected]",
    "owner": false,
    "role": "view",
    "type": "user"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Added 1 member."
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "member",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/members  --data-urlencode role=view  --data-urlencode [email protected] 

List members

GET /broker/rest/team/:id/members
Response
{
  "api_version": 1.6,
  "data": [
    {
      "explicit_role": null,
      "from": [
        {
          "type": "owner",
          "role": "view"
        }
      ],
      "id": "536074d1194e4cdc2a000001",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d1194e4cdc2a000001",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get member",
          "required_params": [

          ]
        },
        "UPDATE": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d1194e4cdc2a000001",
          "method": "PUT",
          "optional_params": [

          ],
          "rel": "Update member",
          "required_params": [
            {
              "description": "New role for member",
              "invalid_options": [

              ],
              "name": "role",
              "type": "string",
              "valid_options": [

              ]
            }
          ]
        },
        "DELETE": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d1194e4cdc2a000001",
          "method": "DELETE",
          "optional_params": [

          ],
          "rel": "Delete member",
          "required_params": [

          ]
        }
      },
      "login": "[email protected]",
      "owner": true,
      "role": "view",
      "type": "user"
    },
    {
      "explicit_role": "view",
      "id": "536074d2194e4cdc2a000003",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d2194e4cdc2a000003",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get member",
          "required_params": [

          ]
        },
        "UPDATE": {
          "href": "https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d2194e4cdc2a000003",
          "meth...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/members 

Add or remove one or more members to or from this team.

PATCH /broker/rest/team/:id/members
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
roleThe role the user should have on the teamYesview, noneN/A
idUnique identifier of the userNo
loginThe user's login attributeNo
membersAn array of users to add with corresponding role. e.g. {'members': [{'login': 'foo', 'type': 'user', 'role': 'view'}, {'id': '5326534e2046fde9d3000001', 'type': 'user', 'role': 'none'}]}No
Request
{
  "role": "view",
  "login": "[email protected]"
}
Response
{
  "api_version": 1.6,
  "data": {
    "explicit_role": "view",
    "id": "536074d2194e4cdc2a000003",
    "login": "[email protected]",
    "owner": false,
    "role": "view",
    "type": "user"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Updated 1 member."
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "member",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X PATCH -u [email protected]:password https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/members  --data-urlencode role=view  --data-urlencode [email protected] 

Get member

GET /broker/rest/team/:id/member/:id
Response
{
  "api_version": 1.6,
  "data": {
    "explicit_role": "view",
    "id": "536074d2194e4cdc2a000003",
    "login": "[email protected]",
    "owner": false,
    "role": "view",
    "type": "user"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Showing member 536074d2194e4cdc2a000003"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "member",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d2194e4cdc2a000003 

Update member

PUT /broker/rest/team/:id/member/:id
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
roleNew role for memberYesN/A
Request
{
  "role": "view"
}
Response
{
  "api_version": 1.6,
  "data": {
    "explicit_role": "view",
    "id": "536074d2194e4cdc2a000003",
    "login": "[email protected]",
    "owner": false,
    "role": "view",
    "type": "user"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Updated member"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "member",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X PUT -u [email protected]:password https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d2194e4cdc2a000003  --data-urlencode role=view 

Delete member

DELETE /broker/rest/team/:id/member/:id
Response
{
  "api_version": 1.6,
  "data": {
    "explicit_role": "view",
    "id": "536074d2194e4cdc2a000003",
    "login": "[email protected]",
    "owner": false,
    "role": "view",
    "type": "user"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Updated member"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "member",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X DELETE -u [email protected]:password https://openshift.redhat.com/broker/rest/team/536075af194e4c85ef000022/member/536074d2194e4cdc2a000003 

List members of this application

GET /broker/rest/application/:id/members
Response
{
  "api_version": 1.6,
  "data": [
    {
      "explicit_role": null,
      "from": [
        {
          "type": "domain",
          "role": "admin"
        }
      ],
      "id": "536074d1194e4cdc2a000001",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get member",
          "required_params": [

          ]
        },
        "UPDATE": {
          "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
          "method": "PUT",
          "optional_params": [

          ],
          "rel": "Update member",
          "required_params": [
            {
              "description": "New role for member",
              "invalid_options": [

              ],
              "name": "role",
              "type": "string",
              "valid_options": [

              ]
            }
          ]
        },
        "DELETE": {
          "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
          "method": "DELETE",
          "optional_params": [

          ],
          "rel": "Delete member",
          "required_params": [

          ]
        }
      },
      "login": "[email protected]",
      "owner": true,
      "role": "admin",
      "type": "user"
    }
  ],
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Found 1 member."
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "members",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/members 

Application

This resource provides information that allow a client to create and manage OpenShift applications. OpenShift supports a number of application frameworks, such as PHP, JBoss, and Ruby. The table below describes each parameter associated with an OpenShift application.
NameDescription
nameName of the application.
frameworkApplication framework. For example, JBoss, PHP, or Ruby.
domain_idThe domain ID of the application.
embeddedList of cartridges that have been added to this application.
creation_timeTime the application was created.
scalableWhether application is scaled or not scaled. The values are either true or false.
gear_countNumber of gears for this application.
gear_profileThe gear size for this application. For example, small.
aliasesApplication server aliases, if applicable.
app_urlThe URL to access this application.
git_urlThe URL to access the Git repository for this application.
ssh_urlThe URL to access this application using an SSH terminal.
health_check_pathThe URL to check if the application is running.
uuidUnique identifier for this application.
initial_git_urlThe URL that was used to initialize the Git repository for this application

List application

GET /broker/rest/applications
Response
{
  "api_version": 1.6,
  "data": [
    {
      "aliases": [
        {
          "certificate_added_at": "2014-04-30T00:00:00Z",
          "has_private_ssl_certificate": true,
          "id": "myalias",
          "links": {
            "GET": {
              "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
              "method": "GET",
              "optional_params": [

              ],
              "rel": "Get alias",
              "required_params": [

              ]
            },
            "UPDATE": {
              "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
              "method": "PUT",
              "optional_params": [
                {
                  "default_value": null,
                  "description": "Optional passphrase for the private key",
                  "name": "pass_phrase",
                  "type": "string",
                  "valid_options": [

                  ]
                }
              ],
              "rel": "Update alias",
              "required_params": [
                {
                  "description": "Content of SSL Certificate",
                  "invalid_options": [

                  ],
                  "name": "ssl_certificate",
                  "type": "string",
                  "valid_options": [

                  ]
                },
                {
                  "description": "Private key for the certificate.  Required if adding a certificate",
                  "invalid_options": [

                  ],
                  "name": "private_key",
                  "type": "string",
                  "valid_options": [

                  ]
                }
              ]
            },
            "DELETE": {
              "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
              "method": "DELETE",
              "optional_params": [

              ],
        ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/applications 

List applications by owner

GET /broker/rest/applications
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
ownerReturn only the applications owned by the specified user id or identity. Use @self to refer to the current user.Yes@selfN/A
Request
{
  "owner": "@self"
}
Response
{
  "api_version": 1.6,
  "data": [
    {
      "aliases": [
        {
          "certificate_added_at": "2014-04-30T00:00:00Z",
          "has_private_ssl_certificate": true,
          "id": "myalias",
          "links": {
            "GET": {
              "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
              "method": "GET",
              "optional_params": [

              ],
              "rel": "Get alias",
              "required_params": [

              ]
            },
            "UPDATE": {
              "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
              "method": "PUT",
              "optional_params": [
                {
                  "default_value": null,
                  "description": "Optional passphrase for the private key",
                  "name": "pass_phrase",
                  "type": "string",
                  "valid_options": [

                  ]
                }
              ],
              "rel": "Update alias",
              "required_params": [
                {
                  "description": "Content of SSL Certificate",
                  "invalid_options": [

                  ],
                  "name": "ssl_certificate",
                  "type": "string",
                  "valid_options": [

                  ]
                },
                {
                  "description": "Private key for the certificate.  Required if adding a certificate",
                  "invalid_options": [

                  ],
                  "name": "private_key",
                  "type": "string",
                  "valid_options": [

                  ]
                }
              ]
            },
            "DELETE": {
              "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
              "method": "DELETE",
              "optional_params": [

              ],
        ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/applications  --data-urlencode owner=@self 

Create new application

POST /broker/rest/domain/:name/applications
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
nameName of the applicationYesN/A
cartridgesArray of one or more cartridge namesNo
scaleMark application as scalableNotrue, falsefalse
gear_sizeThe size of the gearNosmallsmall
initial_git_urlA URL to a Git source code repository that will be the basis for this application.No, empty
cartridges[][name]Name of a cartridge.No
cartridges[][gear_size]Gear size for the cartridge.Nosmallsmall
cartridges[][url]A URL to a downloadable cartridge. You may specify an multiple urls via {'cartridges' : [{'url':'http://...'}, ...]}No
environment_variablesAdd or Update application environment variables, e.g.:[{'name':'FOO', 'value':'123'}, {'name':'BAR', 'value':'abc'}]No
Request
{
  "name": "myapp",
  "cartridges": "ruby-1.9",
  "scale": true
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 1,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
           ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/domain/mydomain/applications  --data-urlencode name=myapp  --data-urlencode cartridges=ruby-1.9  --data-urlencode scale=true 

List applications for a domain

GET /broker/rest/domain/:name/applications
Response
{
  "api_version": 1.6,
  "data": [
    {
      "aliases": [
        {
          "certificate_added_at": "2014-04-30T00:00:00Z",
          "has_private_ssl_certificate": true,
          "id": "myalias",
          "links": {
            "GET": {
              "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
              "method": "GET",
              "optional_params": [

              ],
              "rel": "Get alias",
              "required_params": [

              ]
            },
            "UPDATE": {
              "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
              "method": "PUT",
              "optional_params": [
                {
                  "default_value": null,
                  "description": "Optional passphrase for the private key",
                  "name": "pass_phrase",
                  "type": "string",
                  "valid_options": [

                  ]
                }
              ],
              "rel": "Update alias",
              "required_params": [
                {
                  "description": "Content of SSL Certificate",
                  "invalid_options": [

                  ],
                  "name": "ssl_certificate",
                  "type": "string",
                  "valid_options": [

                  ]
                },
                {
                  "description": "Private key for the certificate.  Required if adding a certificate",
                  "invalid_options": [

                  ],
                  "name": "private_key",
                  "type": "string",
                  "valid_options": [

                  ]
                }
              ]
            },
            "DELETE": {
              "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
              "method": "DELETE",
              "optional_params": [

              ],
        ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/domain/mydomain/applications 

Get application

GET /broker/rest/application/:id
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 1,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
           ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c 

Start application

POST /broker/rest/application/:id/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesstartN/A
Request
{
  "event": "start"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 1,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
           ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/events  --data-urlencode event=start 

Stop application

POST /broker/rest/application/:id/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesstopN/A
Request
{
  "event": "stop"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 1,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
           ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/events  --data-urlencode event=stop 

Force stop application

POST /broker/rest/application/:id/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesforce-stopN/A
Request
{
  "event": "force-stop"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 1,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
           ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/events  --data-urlencode event=force-stop 

Restart application

POST /broker/rest/application/:id/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesrestartN/A
Request
{
  "event": "restart"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 1,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
           ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/events  --data-urlencode event=restart 

Scale up application

POST /broker/rest/application/:id/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesscale-upN/A
Request
{
  "event": "scale-up"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 2,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
           ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/events  --data-urlencode event=scale-up 

Scale down application

POST /broker/rest/application/:id/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesscale-downN/A
Request
{
  "event": "scale-down"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 1,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
           ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/events  --data-urlencode event=scale-down 

Tidy the application framework

POST /broker/rest/application/:id/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYestidyN/A
Request
{
  "event": "tidy"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 1,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
           ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/events  --data-urlencode event=tidy 

Reload the application

POST /broker/rest/application/:id/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesreloadN/A
Request
{
  "event": "reload"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 1,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
           ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/events  --data-urlencode event=reload 

Trigger thread dump

POST /broker/rest/application/:id/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesthread-dumpN/A
Request
{
  "event": "thread-dump"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 1,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
                "name": "role",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
           ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/events  --data-urlencode event=thread-dump 

Resolve dns

GET /broker/rest/application/:id/dns_resolvable
Response
{
  "api_version": 1.6,
  "data": true,
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Resolved DNS myapp-mydomain.dev.rhcloud.com"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "boolean",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/dns_resolvable 

Deploy the application

POST /broker/rest/application/:id/deployments
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
refGit ref (tag, branch, commit id)Nomaster
artifact_urlURL where the deployment artifact can be downloaded fromNo
hot_deployIndicates whether this is a hot deploymentNotrue or falsefalse
force_clean_buildIndicates whether a clean build should be performedNotrue or falsefalse
Response
{
  "api_version": 1.6,
  "data": {
    "activations": [
      "2014-04-30T04:01:14Z"
    ],
    "created_at": "2014-04-30T04:01:11Z",
    "force_clean_build": false,
    "hot_deploy": false,
    "id": "d70eb464",
    "ref": "master",
    "sha1": "198e8d1"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Added d70eb464 to application myapp"
    }
  ],
  "status": "created",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "deployment",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/deployments 

Activate a specific deployment of the application

POST /broker/rest/application/:id/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesactivateN/A
deployment_idThe deployment ID to activate the applicationYesN/A
Request
{
  "event": "activate",
  "deployment_id": "f36f59c0"
}
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/events  --data-urlencode event=activate  --data-urlencode deployment_id=f36f59c0 

Update application

PUT /broker/rest/application/:id
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
auto_deployIndicates if OpenShift should build and deploy automatically whenever the user executes git pushNotrue, false
deployment_typeIndicates whether the app is setup for binary or git based deploymentsNogit, binary
deployment_branchIndicates which branch should trigger an automatic deployment, if automatic deployment is enabled.No
keep_deploymentsIndicates how many total deployments to preserve. Must be greater than 0No
Request
{
  "keep_deployments": 3
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [
      {
        "certificate_added_at": "2014-04-30T00:00:00Z",
        "has_private_ssl_certificate": true,
        "id": "myalias",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get alias",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
            "method": "PUT",
            "optional_params": [
              {
                "default_value": null,
                "description": "Optional passphrase for the private key",
                "name": "pass_phrase",
                "type": "string",
                "valid_options": [

                ]
              }
            ],
            "rel": "Update alias",
            "required_params": [
              {
                "description": "Content of SSL Certificate",
                "invalid_options": [

                ],
                "name": "ssl_certificate",
                "type": "string",
                "valid_options": [

                ]
              },
              {
                "description": "Private key for the certificate.  Required if adding a certificate",
                "invalid_options": [

                ],
                "name": "private_key",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
            "method": "DELETE",
            "optional_params": [

            ],
            "rel": "Delete alias",
            "required_params": [

            ]
          }
        }
      }
    ],
    ...click to see full response including links
Example using curl command
curl -X PUT -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c  --data-urlencode keep_deployments=3 

Make the application highly available (ha)

POST /broker/rest/application/:id/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesmake-haN/A
Request
{
  "event": "make-ha"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [
      {
        "certificate_added_at": "2014-04-30T00:00:00Z",
        "has_private_ssl_certificate": true,
        "id": "myalias",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get alias",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
            "method": "PUT",
            "optional_params": [
              {
                "default_value": null,
                "description": "Optional passphrase for the private key",
                "name": "pass_phrase",
                "type": "string",
                "valid_options": [

                ]
              }
            ],
            "rel": "Update alias",
            "required_params": [
              {
                "description": "Content of SSL Certificate",
                "invalid_options": [

                ],
                "name": "ssl_certificate",
                "type": "string",
                "valid_options": [

                ]
              },
              {
                "description": "Private key for the certificate.  Required if adding a certificate",
                "invalid_options": [

                ],
                "name": "private_key",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
            "method": "DELETE",
            "optional_params": [

            ],
            "rel": "Delete alias",
            "required_params": [

            ]
          }
        }
      }
    ],
    ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/events  --data-urlencode event=make-ha 

Delete application

DELETE /broker/rest/application/:id
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [
      {
        "certificate_added_at": "2014-04-30T00:00:00Z",
        "has_private_ssl_certificate": true,
        "id": "myalias",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get alias",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
            "method": "PUT",
            "optional_params": [
              {
                "default_value": null,
                "description": "Optional passphrase for the private key",
                "name": "pass_phrase",
                "type": "string",
                "valid_options": [

                ]
              }
            ],
            "rel": "Update alias",
            "required_params": [
              {
                "description": "Content of SSL Certificate",
                "invalid_options": [

                ],
                "name": "ssl_certificate",
                "type": "string",
                "valid_options": [

                ]
              },
              {
                "description": "Private key for the certificate.  Required if adding a certificate",
                "invalid_options": [

                ],
                "name": "private_key",
                "type": "string",
                "valid_options": [

                ]
              }
            ]
          },
          "DELETE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
            "method": "DELETE",
            "optional_params": [

            ],
            "rel": "Delete alias",
            "required_params": [

            ]
          }
        }
      }
    ],
    ...click to see full response including links
Example using curl command
curl -X DELETE -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c 

Cartridge

This chapter provides information on API resources that allow a client to manage OpenShift cartridges. Cartridges are the components of an OpenShift application, and include databases, build systems, and management capabilities. Adding a cartridge to an application provides the desired capability without requiring you to administer or update the included feature. T here are two types of cartridges available with OpenShift: standalone and embedded.

Standalone Cartridges

Standalone cartridges allow you to choose from a variety of programming languages and frameworks for developing your application. Every application requires a framework cartridge. Examples include PHP, JBoss, and Ruby. The table below describes each parameter associated with both standalone and embedded cartridges.
NameDescription
nameName of the cartridge.
versionVersion of the packaged software in the cartridge.
licenseLicense of the packaged software in the cartridge.
license_urlURL of the license file for the packaged software in the cartridge.
websiteWebsite URL for the packaged software in the cartridge.
help_topicsMap of topics and associated URLs that can provide help on how to use and configure the cartridge.
display_nameFormatted name of the cartridge for user interfaces.
descriptionDescription of the cartridge for user interfaces.
current_scaleCurrent number of gears used to run the cartridge.
scales_fromMinimum 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_toMaximum 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_withNames 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_fromMinimum number of gears supported by the cartridge; the scales_from value cannot be less than this number.
supported_scales_toMaximum number of gears supported by the cartridge; the scales_to value cannot be greater than this number.
tagsArray of tags associated with the cartridge.
usage_ratesPlan usage costs.
status_messagesStatus messages returned back by the cartridge.

Embedded Cartridges


Embedded cartridges provide extended functionality to OpenShift applications. Examples include MySQL, MongoDB, and phpMyAdmin. The table below describes each parameter associated with only embedded cartridges.
NameDescription
additional_gear_storageSet additional filesystem storage in gigabytes for the gear profile that the cartridge is running on.
base_gear_storageDefault basic storage in gigabytes associated with the gear profile that the cartridge is running on.
collocated_withArray of names of other cartridges that share the same gear(s) with the cartridge.
gear_profileSize of the gears grouped in this profile that the cartridge is running on; all gears in a group will have the same gear_profile.
propertiesList of environment variables and property values exposed by the cartridge and usable in application code.

List public cartridges

GET /broker/rest/cartridges
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
categoryShow all cartridges with the given categoryNo
Response
{
  "api_version": 1.6,
  "data": [
    {
      "activation_time": "2014-04-29T21:01:40Z",
      "automatic_updates": true,
      "creation_time": "2014-04-29T21:01:40Z",
      "description": "MongoDB Monitoring Service (MMS) instruments MongoDB and provides information about current and historical operational metrics of your system.",
      "display_name": "10gen Mongo Monitoring Service Agent",
      "help_topics": {
        "MMS Manual": "https://mms.mongodb.com/help/"
      },
      "id": "53601334ff85899f9f000001",
      "license": "unknown",
      "license_url": "https://mms.mongodb.com/links/terms-of-service",
      "maintained_by": "redhat",
      "name": "10gen-mms-agent-0.1",
      "requires": [
        [
          "mongodb-2.4"
        ]
      ],
      "supported_scales_from": 1,
      "supported_scales_to": 1,
      "tags": [
        "embedded",
        "database-support"
      ],
      "type": "embedded",
      "usage_rates": [

      ],
      "version": "0.1",
      "website": "https://mms.mongodb.com/"
    },
    {
      "activation_time": "2014-04-29T21:01:40Z",
      "automatic_updates": true,
      "creation_time": "2014-04-29T21:01:40Z",
      "description": "The Cron cartridge allows you to run command line programs at scheduled times. Use this for background jobs and periodic processing.",
      "display_name": "Cron 1.4",
      "help_topics": {
        "Getting Started Guide": "https://www.openshift.com/blogs/getting-started-with-cron-jobs-on-openshift"
      },
      "id": "53601334ff85899f9f000015",
      "license": "ASL 2.0",
      "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt",
      "maintained_by": "redhat",
      "name": "cron-1.4",
      "supported_scales_from": 1,
      "supported_scales_to": -1,
      "tags": [
        "embedded",
        "plugin"
      ],
      "type": "embedded",
      "usage_rates": [

      ],
      "version": "1.4",
      "website": "http://www.openshift.com/"
    },
    {
      "activation_time"...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/cartridges 

Add embedded cartridge

POST /broker/rest/application/:id/cartridges
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
nameName of a cartridge.YesN/A
colocate_withThe component to colocate withNohaproxy-1.4, ruby-1.9
scales_fromMinimum number of gears to run the component on.No
scales_toMaximum number of gears to run the component on.No
additional_gear_storageAdditional GB of space to request on all gears running this component.No
gear_sizeGear size for the cartridge.Nosmallsmall
urlA URL to a downloadable cartridge.No
environment_variablesAdd or Update application environment variables, e.g.:[{'name':'FOO', 'value':'123'}, {'name':'BAR', 'value':'abc'}]No
Request
{
  "name": "mysql-5.1"
}
Response
{
  "api_version": 1.6,
  "data": {
    "activation_time": "2014-04-29T21:01:40Z",
    "added_time": "2014-04-30T03:59:33Z",
    "additional_gear_storage": 0,
    "automatic_updates": true,
    "base_gear_storage": 1,
    "collocated_with": [

    ],
    "creation_time": "2014-04-29T21:01:40Z",
    "current_scale": 1,
    "description": "MySQL is a multi-user, multi-threaded SQL database server.",
    "display_name": "MySQL 5.1",
    "gear_profile": "small",
    "help_topics": {
      "Building with MySQL": "https://www.openshift.com/developers/mysql"
    },
    "license": "GPL",
    "license_url": "",
    "maintained_by": "redhat",
    "name": "mysql-5.1",
    "properties": [
      {
        "name": "username",
        "type": "cart_data",
        "description": "Root user on mysql database",
        "value": "adminARVX63r"
      },
      {
        "name": "password",
        "type": "cart_data",
        "description": "Password for root user on mysql database",
        "value": "fprhFceMAcF8"
      },
      {
        "name": "database_name",
        "type": "cart_data",
        "description": "MySQL DB name",
        "value": "myapp"
      },
      {
        "name": "connection_url",
        "type": "cart_data",
        "description": "MySQL DB connection URL",
        "value": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/"
      }
    ],
    "scales_from": 1,
    "scales_to": 1,
    "scales_with": "haproxy-1.4",
    "status_messages": null,
    "supported_scales_from": 1,
    "supported_scales_to": 1,
    "tags": [
      "service",
      "database",
      "embedded"
    ],
    "type": "embedded",
    "usage_rates": [

    ],
    "version": "5.1",
    "website": "http://www.mysql.com"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Added mysql-5.1 to application myapp"
    },
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "resu...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/cartridges  --data-urlencode name=mysql-5.1 

List embedded cartridges

GET /broker/rest/application/:id/cartridges
Response
{
  "api_version": 1.6,
  "data": [
    {
      "activation_time": "2014-04-29T21:01:40Z",
      "added_time": "2014-04-30T03:58:40Z",
      "additional_gear_storage": 0,
      "automatic_updates": true,
      "base_gear_storage": 1,
      "collocated_with": [
        "ruby-1.9"
      ],
      "creation_time": "2014-04-29T21:01:40Z",
      "current_scale": 1,
      "description": "Acts as a load balancer for your web cartridge and will automatically scale up to handle incoming traffic. Is automatically added to scaled applications when they are created and cannot be removed or added to an application after the fact.",
      "display_name": "Web Load Balancer",
      "gear_profile": "small",
      "help_topics": {
      },
      "license": "GPLv2+",
      "license_url": "http://www.gnu.org/licenses/gpl-2.0.html",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/cartridge/haproxy-1.4",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get cartridge",
          "required_params": [

          ]
        },
        "UPDATE": {
          "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/cartridge/haproxy-1.4",
          "method": "PUT",
          "optional_params": [
            {
              "default_value": null,
              "description": "Additional filesystem storage in gigabytes on each gear having cartridge haproxy-1.4",
              "name": "additional_gear_storage",
              "type": "integer",
              "valid_options": [

              ]
            },
            {
              "default_value": null,
              "description": "Minimum number of gears having cartridge haproxy-1.4",
              "name": "scales_from",
              "type": "integer",
              "valid_options": [

              ]
            },
            {
              "default_value": null,
              "description": "Maximum number o...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/cartridges 

Get cartridge

GET /broker/rest/application/:id/cartridge/:name
Response
{
  "api_version": 1.6,
  "data": {
    "activation_time": "2014-04-29T21:01:40Z",
    "added_time": "2014-04-30T03:59:33Z",
    "additional_gear_storage": 0,
    "automatic_updates": true,
    "base_gear_storage": 1,
    "collocated_with": [

    ],
    "creation_time": "2014-04-29T21:01:40Z",
    "current_scale": 1,
    "description": "MySQL is a multi-user, multi-threaded SQL database server.",
    "display_name": "MySQL 5.1",
    "gear_profile": "small",
    "help_topics": {
      "Building with MySQL": "https://www.openshift.com/developers/mysql"
    },
    "license": "GPL",
    "license_url": "",
    "maintained_by": "redhat",
    "name": "mysql-5.1",
    "properties": [
      {
        "name": "username",
        "type": "cart_data",
        "description": "Root user on mysql database",
        "value": "adminARVX63r"
      },
      {
        "name": "password",
        "type": "cart_data",
        "description": "Password for root user on mysql database",
        "value": "fprhFceMAcF8"
      },
      {
        "name": "database_name",
        "type": "cart_data",
        "description": "MySQL DB name",
        "value": "myapp"
      },
      {
        "name": "connection_url",
        "type": "cart_data",
        "description": "MySQL DB connection URL",
        "value": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/"
      }
    ],
    "scales_from": 1,
    "scales_to": 1,
    "scales_with": "haproxy-1.4",
    "status_messages": [
      {
        "gear_id": "53607525194e4cdfd1000055",
        "message": "MySQL is running\n"
      }
    ],
    "supported_scales_from": 1,
    "supported_scales_to": 1,
    "tags": [
      "service",
      "database",
      "embedded"
    ],
    "type": "embedded",
    "usage_rates": [

    ],
    "version": "5.1",
    "website": "http://www.mysql.com"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Showing cartridge mysql-5.1 for ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/cartridge/mysql-5.1 

Update cartridge configuration

PUT /broker/rest/application/:id/cartridge/:name
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
additional_gear_storageAdditional filesystem storage in gigabytes on each gear having cartridge mysql-5.1No
scales_fromMinimum number of gears having cartridge mysql-5.1No
scales_toMaximum number of gears having cartridge mysql-5.1No
Request
{
  "additional_gear_storage": 10,
  "scales_to": 4
}
Response
{
  "api_version": 1.6,
  "data": {
    "activation_time": "2014-04-29T21:01:40Z",
    "added_time": "2014-04-30T03:59:33Z",
    "additional_gear_storage": 10,
    "automatic_updates": true,
    "base_gear_storage": 1,
    "collocated_with": [

    ],
    "creation_time": "2014-04-29T21:01:40Z",
    "current_scale": 1,
    "description": "MySQL is a multi-user, multi-threaded SQL database server.",
    "display_name": "MySQL 5.1",
    "gear_profile": "small",
    "help_topics": {
      "Building with MySQL": "https://www.openshift.com/developers/mysql"
    },
    "license": "GPL",
    "license_url": "",
    "maintained_by": "redhat",
    "name": "mysql-5.1",
    "properties": [
      {
        "name": "username",
        "type": "cart_data",
        "description": "Root user on mysql database",
        "value": "adminARVX63r"
      },
      {
        "name": "password",
        "type": "cart_data",
        "description": "Password for root user on mysql database",
        "value": "fprhFceMAcF8"
      },
      {
        "name": "database_name",
        "type": "cart_data",
        "description": "MySQL DB name",
        "value": "myapp"
      },
      {
        "name": "connection_url",
        "type": "cart_data",
        "description": "MySQL DB connection URL",
        "value": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/"
      }
    ],
    "scales_from": 1,
    "scales_to": 1,
    "scales_with": "haproxy-1.4",
    "status_messages": null,
    "supported_scales_from": 1,
    "supported_scales_to": 1,
    "tags": [
      "service",
      "database",
      "embedded"
    ],
    "type": "embedded",
    "usage_rates": [

    ],
    "version": "5.1",
    "website": "http://www.mysql.com"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Showing cartridge mysql-5.1 for application myapp under domain mydomain"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1...click to see full response including links
Example using curl command
curl -X PUT -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/cartridge/mysql-5.1  --data-urlencode additional_gear_storage=10  --data-urlencode scales_to=4 

Stop cartridge

POST /broker/rest/application/:id/cartridge/:name/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesstopN/A
Request
{
  "event": "stop"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      },
      "mysql-5.1": {
        "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/",
        "username": "adminARVX63r",
        "password": "fprhFceMAcF8",
        "database_name": "myapp",
        "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/"
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 2,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
 ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/cartridge/mysql-5.1/events  --data-urlencode event=stop 

Start cartridge

POST /broker/rest/application/:id/cartridge/:name/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesstartN/A
Request
{
  "event": "start"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      },
      "mysql-5.1": {
        "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/",
        "username": "adminARVX63r",
        "password": "fprhFceMAcF8",
        "database_name": "myapp",
        "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/"
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 2,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
 ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/cartridge/mysql-5.1/events  --data-urlencode event=start 

Restart cartridge

POST /broker/rest/application/:id/cartridge/:name/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesrestartN/A
Request
{
  "event": "restart"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      },
      "mysql-5.1": {
        "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/",
        "username": "adminARVX63r",
        "password": "fprhFceMAcF8",
        "database_name": "myapp",
        "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/"
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 2,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
 ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/cartridge/mysql-5.1/events  --data-urlencode event=restart 

Reload cartridge

POST /broker/rest/application/:id/cartridge/:name/events
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
eventeventYesreloadN/A
Request
{
  "event": "reload"
}
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      },
      "mysql-5.1": {
        "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/",
        "username": "adminARVX63r",
        "password": "fprhFceMAcF8",
        "database_name": "myapp",
        "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/"
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 2,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
 ...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/cartridge/mysql-5.1/events  --data-urlencode event=reload 

Delete cartridge

DELETE /broker/rest/application/:id/cartridge/:name
Response
{
  "api_version": 1.6,
  "data": {
    "aliases": [

    ],
    "app_url": "http://myapp-mydomain.dev.rhcloud.com/",
    "auto_deploy": true,
    "build_job_url": null,
    "building_app": null,
    "building_with": null,
    "creation_time": "2014-04-30T03:58:40Z",
    "deployment_branch": "master",
    "deployment_type": "git",
    "domain_id": "mydomain",
    "embedded": {
      "haproxy-1.4": {
      },
      "mysql-5.1": {
        "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/",
        "username": "adminARVX63r",
        "password": "fprhFceMAcF8",
        "database_name": "myapp",
        "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/"
      }
    },
    "framework": "ruby-1.9",
    "gear_count": 2,
    "gear_profile": "small",
    "git_url": "ssh://[email protected]/~/git/myapp.git/",
    "health_check_path": "health",
    "id": "536074f0194e4cdfd100000c",
    "initial_git_url": null,
    "keep_deployments": 1,
    "members": [
      {
        "explicit_role": null,
        "from": [
          {
            "type": "domain",
            "role": "admin"
          }
        ],
        "id": "536074d1194e4cdc2a000001",
        "links": {
          "GET": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "GET",
            "optional_params": [

            ],
            "rel": "Get member",
            "required_params": [

            ]
          },
          "UPDATE": {
            "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/member/536074d1194e4cdc2a000001",
            "method": "PUT",
            "optional_params": [

            ],
            "rel": "Update member",
            "required_params": [
              {
                "description": "New role for member",
                "invalid_options": [

                ],
 ...click to see full response including links
Example using curl command
curl -X DELETE -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/cartridge/mysql-5.1 

Alias

This section provides information on the API resource that allow a client to manage application aliases and SSL certificates for OpenShift applications. The table below describes each parameter associated with an OpenShift application with aliases and SSL certificates added.
NameDescription
idName of application alias.
certificate_added_atThe date and time when the SSL certificate was added.
has_private_ssl_certificateIndicates whether an SSL certificate has been added to the specified application.

Create new alias

POST /broker/rest/application/:id/aliases
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
idAlias for applicationYesN/A
ssl_certificateContent of SSL CertificateNo
private_keyPrivate key for the certificate. Required if adding a certificateNo
pass_phraseOptional passphrase for the private keyNo
Request
{
  "id": "myalias",
  "ssl_certificate": "-----BEGIN CERTIFICATE-----\nMIIDoDCCAogCCQDzF8AJCHnrbjANBgkqhkiG9w0BAQUFADCBkTELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJl\nZGhhdDESMBAGA1UECwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAm\nBgkqhkiG9w0BCQEWGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wHhcNMTMwMjE5\nMjExMTQ4WhcNMTQwMjE5MjExMTQ4WjCBkTELMAkGA1UEBhMCVVMxCzAJBgNVBAgM\nAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJlZGhhdDESMBAGA1UE\nCwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAmBgkqhkiG9w0BCQEW\nGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB\nDwAwggEKAoIBAQDAEbH4MCi3iIDP1HS+/Xwu8SjdSc5WJX6htV7hJpmFZ8HohV/8\nba0v6aM9IJIIt+sIe2J62t/9G3leOdIHBxeACN4fV2l/iA/fvxvlnFKeD7sHm9Oc\nYj1H6YYJ57sIOf/oLDpJl6l3Rw8VC3+3W0/lzlVpA8qt7fpkiW7XQJCPplUSrdVC\n3okQ2T5NAod5+wVIOqELgE5bLX1LRs5VPsjytHkJ7rKXs55FHR3kpsoImn5xD0Ky\n6lRn8cIMolQoyN5HIGr8f5P+07hrHibve8jje/DKTssb5yEUAEmh6iGHQsRAnsUW\nQoIEUOLqQCu9re2No4G52Kl2xQIjyJF7rCfxAgMBAAEwDQYJKoZIhvcNAQEFBQAD\nggEBAGHrya/ZkiAje2kHsOajXMlO2+y1iLfUDcRLuEWpUa8sI5EM4YtemQrsupFp\n8lVYG5C4Vh8476oF9t8Wex5eH3ocwbSvPIUqE07hdmrubiMq4wxFVRYq7g9lHAnx\nl+bABuN/orbAcPcGAGg7AkXVoAc3Fza/ZcgMcw7NOtDTEss70V9OdgCfQUJL0KdO\nhCO8bQ1EaEiq6zEh8RpZe8mu+f/GYATX1I+eJUc6F6cn83oJjE9bqAVzk7TzTHeK\nEBKN50C14wWtXeG7n2+ugaVO+0xnvHeUrQBLHSRyOHqxXrQQ5XmzcaBiyI0f2IQM\nHst1BVXyX0n/L/ZoYYsv5juJmDo=\n-----END CERTIFICATE-----",
  "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAwBGx+DAot4iAz9R0vv18LvEo3UnOViV+obVe4SaZhWfB6IVf\n/G2tL+mjPSCSCLfrCHtietrf/Rt5XjnSBwcXgAjeH1dpf4gP378b5ZxSng+7B5vT\nnGI9R+mGCee7CDn/6Cw6SZepd0cPFQt/t1tP5c5VaQPKre36ZIlu10CQj6ZVEq3V\nQt6JENk+TQKHefsFSDqhC4BOWy19S0bOVT7I8rR5Ce6yl7OeRR0d5KbKCJp+cQ9C\nsupUZ/HCDKJUKMjeRyBq/H+T/tO4ax4m73vI43vwyk7LG+chFABJoeohh0LEQJ7F\nFkKCBFDi6kArva3tjaOBudipdsUCI8iRe6wn8QIDAQABAoIBAG/on4JVRRQSw8LU\nLiWt+jI7ryyoOUH2XL8JtzuGSwLwvomlVJT2rmbxQXx3Qr8zsgziHzIn30RRQrkF\nBXu0xRuDjzBBtSVqeJ1Mc4uoNncEAVxgjb5bewswZDnXPCGB8bosMtX4OPRXgdEo\nPwTtfjMOsrMaU3hd5Xu4m81tQA2BvwOlx8aYDyH0jeTnervc5uRGbeTBQG4Bu40E\nrWNmXvgNq2EzTAwbbN6Ma97gw9KgXnM4Nlh29Fxb5TBeUU9lkzuTZAZIDXKIm7AG\nUwMbj/A038yAumYQtThTE/3e4W3rn7F2Vko900bC4aAC1KQOAzjIeQqzqkVxWTWq\n4SUFQAECgYEA/ODwifOTuI6hdZK6JRgc4wp6Rc0fkqHuxLzABXoIGuSVlWyimqIN\nZySAkpo5EW6DNraRJxNCOBmWeGPEhHGrea+JPiPEwCK0F7SxvSmg3jzNzw3Es31T\necET7eDwuSOY9v4XDzLyiXXkEUUReD7Ng2hEYL+HaQrl5jWj4lxgq/ECgYEAwnCb\nKrz7FwX8AqtFAEi6uUrc12k1xYKQfrwSxbfdK2vBBUpgB71Iq/fqP+1BittEljDG\n8f4jEtMBFfEPhLzGIHaI3UiHUHXS4GetA77TRgR8lnKKpj1FcMIY2iKU479707O5\nQ08pgWRUDQ8BVg2ePgbo5QjLMc/rv7UF3AHvPAECgYB/auAIwqDGN6gHU/1TP4ke\npWLi1O55tfpXSzv+BnUbB96PQgPUop7aP7xBIlBrBiI7aVZOOBf/qHT3CF421geu\n8tHWa7NxlIrl/vgn9lfGYyDYmXlpb1amXLEsBVGGF/e1TGZWFDe9J5fZU9HvosVu\n1xTNIvSZ6xHYI2MGZcGYIQKBgEYeebaV5C7PV6xWu1F46O19U9rS9DM//H/XryVi\nQv4vo7IWuj7QQe7SPsXC98ntfPR0rqoCLf/R3ChfgGsr8H8wf/bc+v9HHj8S5E/f\ndy1e3Nccg2ej3PDm7jNsGSlwmmUkAQGHAL7KwYzcBm1UB+bycvZ1j2FtS+UckPpg\nMDgBAoGALD8PkxHb4U4DtbNFSYRrUdvS9heav/yph3lTMfifNkOir36io6v8RPgb\nD2bHKKZgmYlTgJrxD45Er9agC5jclJO35QRU/OfGf3GcnABkBI7vlvUKADAo65Sq\nweZkdJnbrIadcvLOHOzkKC9m+rxFTC9VoN1dwK2zwYvUXfa1VJA=\n-----END RSA PRIVATE KEY-----",
  "pass_phrase": "abcd"
}
Response
{
  "api_version": 1.6,
  "data": {
    "certificate_added_at": "2014-04-30T00:00:00Z",
    "has_private_ssl_certificate": true,
    "id": "myalias"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Added myalias to application myapp"
    }
  ],
  "status": "created",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "alias",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/aliases  --data-urlencode id=myalias  --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
QoIEUOLqQCu9re2No4G52Kl2xQIjyJF7rCfxAgMBAAEwDQYJKoZIhvcNAQEFBQAD
ggEBAGHrya/ZkiAje2kHsOajXMlO2+y1iLfUDcRLuEWpUa8sI5EM4YtemQrsupFp
8lVYG5C4Vh8476oF9t8Wex5eH3ocwbSvPIUqE07hdmrubiMq4wxFVRYq7g9lHAnx
l+bABuN/orbAcPcGAGg7AkXVoAc3Fza/ZcgMcw7NOtDTEss70V9OdgCfQUJL0KdO
hCO8bQ1EaEiq6zEh8RpZe8mu+f/GYATX1I+eJUc6F6cn83oJjE9bqAVzk7TzTHeK
EBKN50C14wWtXeG7n2+ugaVO+0xnvHeUrQBLHSRyOHqxXrQQ5XmzcaBiyI0f2IQM
Hst1BVXyX0n/L/ZoYYsv5juJmDo=
-----END CERTIFICATE-----  --data-urlencode private_key=-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAwBGx+DAot4iAz9R0vv18LvEo3UnOViV+obVe4SaZhWfB6IVf
/G2tL+mjPSCSCLfrCHtietrf/Rt5XjnSBwcXgAjeH1dpf4gP378b5ZxSng+7B5vT
nGI9R+mGCee7CDn/6Cw6SZepd0cPFQt/t1tP5c5VaQPKre36ZIlu10CQj6ZVEq3V
Qt6JENk+TQKHefsFSDqhC4BOWy19S0bOVT7I8rR5Ce6yl7OeRR0d5KbKCJp+cQ9C
supUZ/HCDKJUKMjeRyBq/H+T/tO4ax4m73vI43vwyk7LG+chFABJoeohh0LEQJ7F
FkKCBFDi6kArva3tjaOBudipdsUCI8iRe6wn8QIDAQABAoIBAG/on4JVRRQSw8LU
LiWt+jI7ryyoOUH2XL8JtzuGSwLwvomlVJT2rmbxQXx3Qr8zsgziHzIn30RRQrkF
BXu0xRuDjzBBtSVqeJ1Mc4uoNncEAVxgjb5bewswZDnXPCGB8bosMtX4OPRXgdEo
PwTtfjMOsrMaU3hd5Xu4m81tQA2BvwOlx8aYDyH0jeTnervc5uRGbeTBQG4Bu40E
rWNmXvgNq2EzTAwbbN6Ma97gw9KgXnM4Nlh29Fxb5TBeUU9lkzuTZAZIDXKIm7AG
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 

List application aliases

GET /broker/rest/application/:id/aliases
Response
{
  "api_version": 1.6,
  "data": [
    {
      "certificate_added_at": "2014-04-30T00:00:00Z",
      "has_private_ssl_certificate": true,
      "id": "myalias",
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get alias",
          "required_params": [

          ]
        },
        "UPDATE": {
          "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
          "method": "PUT",
          "optional_params": [
            {
              "default_value": null,
              "description": "Optional passphrase for the private key",
              "name": "pass_phrase",
              "type": "string",
              "valid_options": [

              ]
            }
          ],
          "rel": "Update alias",
          "required_params": [
            {
              "description": "Content of SSL Certificate",
              "invalid_options": [

              ],
              "name": "ssl_certificate",
              "type": "string",
              "valid_options": [

              ]
            },
            {
              "description": "Private key for the certificate.  Required if adding a certificate",
              "invalid_options": [

              ],
              "name": "private_key",
              "type": "string",
              "valid_options": [

              ]
            }
          ]
        },
        "DELETE": {
          "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias",
          "method": "DELETE",
          "optional_params": [

          ],
          "rel": "Delete alias",
          "required_params": [

          ]
        }
      }
    }
  ],
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Listing aliases ...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/aliases 

Get alias

GET /broker/rest/application/:id/alias/:id
Response
{
  "api_version": 1.6,
  "data": {
    "certificate_added_at": "2014-04-30T00:00:00Z",
    "has_private_ssl_certificate": true,
    "id": "myalias"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Showing alias myalias for application myapp under domain mydomain"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "alias",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias 

Update alias

PUT /broker/rest/application/:id/alias/:id
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
ssl_certificateContent of SSL CertificateYesN/A
private_keyPrivate key for the certificate. Required if adding a certificateYesN/A
pass_phraseOptional passphrase for the private keyNo
Request
{
  "ssl_certificate": "-----BEGIN CERTIFICATE-----\nMIIDoDCCAogCCQDzF8AJCHnrbjANBgkqhkiG9w0BAQUFADCBkTELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJl\nZGhhdDESMBAGA1UECwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAm\nBgkqhkiG9w0BCQEWGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wHhcNMTMwMjE5\nMjExMTQ4WhcNMTQwMjE5MjExMTQ4WjCBkTELMAkGA1UEBhMCVVMxCzAJBgNVBAgM\nAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJlZGhhdDESMBAGA1UE\nCwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAmBgkqhkiG9w0BCQEW\nGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB\nDwAwggEKAoIBAQDAEbH4MCi3iIDP1HS+/Xwu8SjdSc5WJX6htV7hJpmFZ8HohV/8\nba0v6aM9IJIIt+sIe2J62t/9G3leOdIHBxeACN4fV2l/iA/fvxvlnFKeD7sHm9Oc\nYj1H6YYJ57sIOf/oLDpJl6l3Rw8VC3+3W0/lzlVpA8qt7fpkiW7XQJCPplUSrdVC\n3okQ2T5NAod5+wVIOqELgE5bLX1LRs5VPsjytHkJ7rKXs55FHR3kpsoImn5xD0Ky\n6lRn8cIMolQoyN5HIGr8f5P+07hrHibve8jje/DKTssb5yEUAEmh6iGHQsRAnsUW\nQoIEUOLqQCu9re2No4G52Kl2xQIjyJF7rCfxAgMBAAEwDQYJKoZIhvcNAQEFBQAD\nggEBAGHrya/ZkiAje2kHsOajXMlO2+y1iLfUDcRLuEWpUa8sI5EM4YtemQrsupFp\n8lVYG5C4Vh8476oF9t8Wex5eH3ocwbSvPIUqE07hdmrubiMq4wxFVRYq7g9lHAnx\nl+bABuN/orbAcPcGAGg7AkXVoAc3Fza/ZcgMcw7NOtDTEss70V9OdgCfQUJL0KdO\nhCO8bQ1EaEiq6zEh8RpZe8mu+f/GYATX1I+eJUc6F6cn83oJjE9bqAVzk7TzTHeK\nEBKN50C14wWtXeG7n2+ugaVO+0xnvHeUrQBLHSRyOHqxXrQQ5XmzcaBiyI0f2IQM\nHst1BVXyX0n/L/ZoYYsv5juJmDo=\n-----END CERTIFICATE-----",
  "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAwBGx+DAot4iAz9R0vv18LvEo3UnOViV+obVe4SaZhWfB6IVf\n/G2tL+mjPSCSCLfrCHtietrf/Rt5XjnSBwcXgAjeH1dpf4gP378b5ZxSng+7B5vT\nnGI9R+mGCee7CDn/6Cw6SZepd0cPFQt/t1tP5c5VaQPKre36ZIlu10CQj6ZVEq3V\nQt6JENk+TQKHefsFSDqhC4BOWy19S0bOVT7I8rR5Ce6yl7OeRR0d5KbKCJp+cQ9C\nsupUZ/HCDKJUKMjeRyBq/H+T/tO4ax4m73vI43vwyk7LG+chFABJoeohh0LEQJ7F\nFkKCBFDi6kArva3tjaOBudipdsUCI8iRe6wn8QIDAQABAoIBAG/on4JVRRQSw8LU\nLiWt+jI7ryyoOUH2XL8JtzuGSwLwvomlVJT2rmbxQXx3Qr8zsgziHzIn30RRQrkF\nBXu0xRuDjzBBtSVqeJ1Mc4uoNncEAVxgjb5bewswZDnXPCGB8bosMtX4OPRXgdEo\nPwTtfjMOsrMaU3hd5Xu4m81tQA2BvwOlx8aYDyH0jeTnervc5uRGbeTBQG4Bu40E\nrWNmXvgNq2EzTAwbbN6Ma97gw9KgXnM4Nlh29Fxb5TBeUU9lkzuTZAZIDXKIm7AG\nUwMbj/A038yAumYQtThTE/3e4W3rn7F2Vko900bC4aAC1KQOAzjIeQqzqkVxWTWq\n4SUFQAECgYEA/ODwifOTuI6hdZK6JRgc4wp6Rc0fkqHuxLzABXoIGuSVlWyimqIN\nZySAkpo5EW6DNraRJxNCOBmWeGPEhHGrea+JPiPEwCK0F7SxvSmg3jzNzw3Es31T\necET7eDwuSOY9v4XDzLyiXXkEUUReD7Ng2hEYL+HaQrl5jWj4lxgq/ECgYEAwnCb\nKrz7FwX8AqtFAEi6uUrc12k1xYKQfrwSxbfdK2vBBUpgB71Iq/fqP+1BittEljDG\n8f4jEtMBFfEPhLzGIHaI3UiHUHXS4GetA77TRgR8lnKKpj1FcMIY2iKU479707O5\nQ08pgWRUDQ8BVg2ePgbo5QjLMc/rv7UF3AHvPAECgYB/auAIwqDGN6gHU/1TP4ke\npWLi1O55tfpXSzv+BnUbB96PQgPUop7aP7xBIlBrBiI7aVZOOBf/qHT3CF421geu\n8tHWa7NxlIrl/vgn9lfGYyDYmXlpb1amXLEsBVGGF/e1TGZWFDe9J5fZU9HvosVu\n1xTNIvSZ6xHYI2MGZcGYIQKBgEYeebaV5C7PV6xWu1F46O19U9rS9DM//H/XryVi\nQv4vo7IWuj7QQe7SPsXC98ntfPR0rqoCLf/R3ChfgGsr8H8wf/bc+v9HHj8S5E/f\ndy1e3Nccg2ej3PDm7jNsGSlwmmUkAQGHAL7KwYzcBm1UB+bycvZ1j2FtS+UckPpg\nMDgBAoGALD8PkxHb4U4DtbNFSYRrUdvS9heav/yph3lTMfifNkOir36io6v8RPgb\nD2bHKKZgmYlTgJrxD45Er9agC5jclJO35QRU/OfGf3GcnABkBI7vlvUKADAo65Sq\nweZkdJnbrIadcvLOHOzkKC9m+rxFTC9VoN1dwK2zwYvUXfa1VJA=\n-----END RSA PRIVATE KEY-----",
  "pass_phrase": "abcd"
}
Response
{
  "api_version": 1.6,
  "data": {
    "certificate_added_at": "2014-04-30T00:00:00Z",
    "has_private_ssl_certificate": true,
    "id": "myalias"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Updated myalias to application myapp"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "alias",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X PUT -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias  --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
QoIEUOLqQCu9re2No4G52Kl2xQIjyJF7rCfxAgMBAAEwDQYJKoZIhvcNAQEFBQAD
ggEBAGHrya/ZkiAje2kHsOajXMlO2+y1iLfUDcRLuEWpUa8sI5EM4YtemQrsupFp
8lVYG5C4Vh8476oF9t8Wex5eH3ocwbSvPIUqE07hdmrubiMq4wxFVRYq7g9lHAnx
l+bABuN/orbAcPcGAGg7AkXVoAc3Fza/ZcgMcw7NOtDTEss70V9OdgCfQUJL0KdO
hCO8bQ1EaEiq6zEh8RpZe8mu+f/GYATX1I+eJUc6F6cn83oJjE9bqAVzk7TzTHeK
EBKN50C14wWtXeG7n2+ugaVO+0xnvHeUrQBLHSRyOHqxXrQQ5XmzcaBiyI0f2IQM
Hst1BVXyX0n/L/ZoYYsv5juJmDo=
-----END CERTIFICATE-----  --data-urlencode private_key=-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAwBGx+DAot4iAz9R0vv18LvEo3UnOViV+obVe4SaZhWfB6IVf
/G2tL+mjPSCSCLfrCHtietrf/Rt5XjnSBwcXgAjeH1dpf4gP378b5ZxSng+7B5vT
nGI9R+mGCee7CDn/6Cw6SZepd0cPFQt/t1tP5c5VaQPKre36ZIlu10CQj6ZVEq3V
Qt6JENk+TQKHefsFSDqhC4BOWy19S0bOVT7I8rR5Ce6yl7OeRR0d5KbKCJp+cQ9C
supUZ/HCDKJUKMjeRyBq/H+T/tO4ax4m73vI43vwyk7LG+chFABJoeohh0LEQJ7F
FkKCBFDi6kArva3tjaOBudipdsUCI8iRe6wn8QIDAQABAoIBAG/on4JVRRQSw8LU
LiWt+jI7ryyoOUH2XL8JtzuGSwLwvomlVJT2rmbxQXx3Qr8zsgziHzIn30RRQrkF
BXu0xRuDjzBBtSVqeJ1Mc4uoNncEAVxgjb5bewswZDnXPCGB8bosMtX4OPRXgdEo
PwTtfjMOsrMaU3hd5Xu4m81tQA2BvwOlx8aYDyH0jeTnervc5uRGbeTBQG4Bu40E
rWNmXvgNq2EzTAwbbN6Ma97gw9KgXnM4Nlh29Fxb5TBeUU9lkzuTZAZIDXKIm7AG
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 

Delete alias

DELETE /broker/rest/application/:id/alias/:id
Response
{
  "api_version": 1.6,
  "data": {
    "certificate_added_at": "2014-04-30T00:00:00Z",
    "has_private_ssl_certificate": true,
    "id": "myalias"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Updated myalias to application myapp"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "alias",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X DELETE -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/alias/myalias 

Environment variable

This resource provides the mean for adding user-defined environment variables set in an application deployment scope. Basically the user will be able to set environment variables during app creation, cartridge addition or even on existing applications. Environment variables set by the user will be persistent and replicated through all gears of the app, including new gears added in scaling events for example.
Think for example usernames and passwords, url's for SMTP hosts, API client id's and authorization tokens, etc. You don't want to set for example an access token for the Instagram API in config files in your git repo, specially if your app is open source. So if your app interacts with the Instagram API you could set the access token values on environment variables (and make your app read it from env vars).
NameDescription
nameName of the environment variable
valueValue of the environment variable

Add an environment variable

POST /broker/rest/application/:id/environment-variables
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
nameName of the environment variableYesN/A
valueValue of the environment variableYesN/A
Request
{
  "name": "FOO",
  "value": "bar"
}
Response
{
  "api_version": 1.6,
  "data": {
    "name": "FOO",
    "value": "bar"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Added environment variable 'FOO' to application myapp"
    }
  ],
  "status": "created",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "environment-variable",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/environment-variables  --data-urlencode name=FOO  --data-urlencode value=bar 

Add/update/delete one or more environment variables

PATCH /broker/rest/application/:id/environment-variables
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
nameName of the environment variable to add/updateNo
valueValue of the environment variableNo
environment_variablesAdd/Update/Delete application environment variables, e.g. Add/Update: [{'name':'FOO', 'value':'123'}, {'name':'BAR', 'value':'abc'}], {Delete: [{'name':'FOO'}, {'name':'BAR'}]}No
Request
{
  "environment_variables": [
    {
      "name": "FOO",
      "value": "123"
    },
    {
      "name": "BAR",
      "value": "abc"
    }
  ]
}
Example using curl command
curl -X PATCH -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/environment-variables  --data-urlencode environment_variables=[{"name"=>"FOO", "value"=>"123"}, {"name"=>"BAR", "value"=>"abc"}] 

List all environment variables

GET /broker/rest/application/:id/environment-variables
Response
{
  "api_version": 1.6,
  "data": [
    {
      "links": {
        "GET": {
          "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/environment-variable/FOO",
          "method": "GET",
          "optional_params": [

          ],
          "rel": "Get environment variable",
          "required_params": [

          ]
        },
        "UPDATE": {
          "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/environment-variable/FOO",
          "method": "PUT",
          "optional_params": [

          ],
          "rel": "Update environment variable",
          "required_params": [
            {
              "description": "Value of the environment variable",
              "invalid_options": [

              ],
              "name": "value",
              "type": "string",
              "valid_options": [

              ]
            }
          ]
        },
        "DELETE": {
          "href": "https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/environment-variable/FOO",
          "method": "DELETE",
          "optional_params": [

          ],
          "rel": "Delete environment variable",
          "required_params": [

          ]
        }
      },
      "name": "FOO",
      "value": "xbar"
    }
  ],
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Listing environment variables for application myapp"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "environment-variables",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/environment-variables 

Get environment variable

GET /broker/rest/application/:id/environment-variable/FOO
Response
{
  "api_version": 1.6,
  "data": {
    "name": "FOO",
    "value": "bar"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Showing environment variable 'FOO' for application myapp"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "environment-variable",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/environment-variable/FOO 

Update environment variable

PUT /broker/rest/application/:id/environment-variable/FOO
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
valueValue of the environment variableYesN/A
Request
{
  "value": "xbar"
}
Response
{
  "api_version": 1.6,
  "data": {
    "name": "FOO",
    "value": "xbar"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Updated environment variable 'FOO' in application myapp"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "environment-variable",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X PUT -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/environment-variable/FOO  --data-urlencode value=xbar 

Delete environment variable

DELETE /broker/rest/application/:id/environment-variable/FOO
Response
{
  "api_version": 1.6,
  "data": {
    "name": "FOO",
    "value": "xbar"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Updated environment variable 'FOO' in application myapp"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "environment-variable",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X DELETE -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/environment-variable/FOO 

Gear group

Describes an set of gears which run the same cartridges and share scaling limits. All cartridges in the gear group scale together.

Get application gear groups

GET /broker/rest/application/:id/gear_groups
Response
{
  "api_version": 1.6,
  "data": [
    {
      "additional_gear_storage": 0,
      "base_gear_storage": 1,
      "cartridges": [
        {
          "name": "haproxy-1.4",
          "display_name": "Web Load Balancer",
          "tags": [
            "web_proxy",
            "scales",
            "embedded"
          ]
        },
        {
          "name": "ruby-1.9",
          "display_name": "Ruby 1.9",
          "tags": [
            "service",
            "ruby",
            "web_framework"
          ]
        }
      ],
      "gear_profile": "small",
      "gears": [
        {
          "id": "536074f0194e4cdfd100000c",
          "state": "started",
          "ssh_url": "ssh://[email protected]"
        }
      ],
      "id": "536074f0194e4cdfd100000e",
      "name": "536074f0194e4cdfd100000e",
      "scales_from": 1,
      "scales_to": -1
    }
  ],
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Showing gear groups for application 'myapp' with domain 'mydomain'"
    },
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "result",
      "text": "started\n"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "gear_groups",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/gear_groups

Descriptor

The descriptor contains all the metadata necessary to describe the application.

Get application descriptor

GET /broker/rest/application/:id/descriptor
Response
{
  "api_version": 1.6,
  "data": "---\nName: myapp\nRequires:\n- haproxy-1.4\n- ruby-1.9\n",
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Show descriptor for application 'myapp' for domain 'mydomain'"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "descriptor",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/descriptor

Deployment

The deployment resource contains information on each application deployment. The table below describes each parameter associated with an OpenShift application deployment.
NameDescription
idDeployment ID
created_atCreation time
hot_deployIndicates whether this was a hot deployment
force_clean_buildIndicates whether a clean build should be performed
refGit ref (tag, branch, commit id)
artifact_urlA binary deployment artifact
activationsArray of activations

Update deployments (special permissions is required to update deployments)

POST /broker/rest/application/:id/deployments
Request Parameters
NameDescriptionRequired Valid OptionsDefault Value
deploymentsAn array of deploymentsYesN/A
Response
{
  "api_version": 1.6,
  "data": {
    "activations": [
      "2014-04-30T04:01:20Z"
    ],
    "created_at": "2014-04-30T04:01:17Z",
    "force_clean_build": false,
    "hot_deploy": false,
    "id": "a2d52134",
    "ref": "master",
    "sha1": "198e8d1"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Added a2d52134 to application myapp"
    }
  ],
  "status": "created",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "deployment",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X POST -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/deployments 

List all deployments

GET /broker/rest/application/:id/deployments
Response
{
  "api_version": 1.6,
  "data": [
    {
      "activations": [
        "2014-04-30T04:01:20Z"
      ],
      "created_at": "2014-04-30T04:01:17Z",
      "force_clean_build": false,
      "hot_deploy": false,
      "id": "a2d52134",
      "ref": "master",
      "sha1": "198e8d1"
    }
  ],
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Listing deployments for application myapp under domain mydomain"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6,
    1.7
  ],
  "type": "deployments",
  "version": "1.6"
}...click to see full response including links
Example using curl command
curl -X GET -u [email protected]:password https://openshift.redhat.com/broker/rest/application/536074f0194e4cdfd100000c/deployments