OpenShift Online 2.0 REST API Guide en US
OpenShift Online 2.0 REST API Guide en US
Reference documentation for OpenShift Online Representational State Transfer Application Programming Interface (REST API) Edition 1.0
Reference documentation for OpenShift Online Representational State Transfer Application Programming Interface (REST API) Edition 1.0
Legal Notice Copyright 2013 Red Hat. T his document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, OpenShift, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux is the registered trademark of Linus T orvalds in the United States and other countries. Java is a registered trademark of Oracle and/or its affiliates. XFS is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL is a registered trademark of MySQL AB in the United States, the European Union and other countries. Node.js is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project. All other trademarks are the property of their respective owners. Abstract T his document describes how to use the Representational State T ransfer (REST ) API for OpenShift Online.
Table of Contents
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5. . . . . . . . . . 1. Document Conventions 5 1.1. T ypographic Conventions 5 1.2. Pull-quote Conventions 6 1.3. Notes and Warnings 7 2. Getting Help 7 2.1. Do You Need Help? 7 2.2. We Need Feedback! 8 Chapter . . . . . . . . . 1. . . .Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9. . . . . . . . . . 1.1. About OpenShift API 9 1.2. About Representational State T ransfer (REST ) 9 Chapter . . . . . . . . . 2. . . .General . . . . . . . . .API . . . .Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 ............ 2.1. Authentication 10 2.2. Version 10 2.3. Resource Links 12 2.4. Response Information 17 2.5. Messages 17 2.6. Response T ype 18 2.7. Status Codes 18 . . . . . . . . . 3. Chapter . . .API . . . .Entry . . . . . .Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 ............ Chapter . ........4 . ...User . . . . . Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 ............ 4.1. View User Information 26 4.2. Parent and Child Accounts 29 4.2.1. Delete Child Account 29 Chapter . . . . . . . . . 5. . . .Subscription . . . . . . . . . . . . . Plans .................................................................. 31 ........... 5.1. List Plans 31 5.2. Get Plan Information 34 5.3. Change Plan 37 Chapter . . . . . . . . . 6. . . .SSH . . . . .Keys .......................................................................... 39 ........... 6.1. Add SSH Key 39 6.2. List User SSH Keys 40 6.3. Get SSH Key Information 41 6.4. Update SSH Key 42 6.5. Delete SSH Key 44 Chapter . . . . . . . . . 7. . . .Authorizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 . .6. . . . . . . . . . 7.1. Add an Authorization 46 7.2. List Authorizations 48 7.3. Get Authorization Information 49 7.4. Update an Authorization 50 7.5. Delete an Authorization 51 Chapter . . . . . . . . . 8. . . .Domains ............................................................................... 53 ........... 8.1. Create a Domain 53 8.2. List Domains 54 8.3. List Domains by Owner 55 8.4. Get Domain Information 57 8.5. Update Domain 58
58 60
Chapter . . . . . . . . . 9. . . .Members ............................................................................... 63 ........... 9.1. List Members of a Domain 63 9.2. Add or Remove Domain Members 64 9.3. List Members of an Application 65 Chapter . . . . . . . . . 10. . . . . Quickstarts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 ............ 10.1. List Quickstarts 67 10.2. Show Quickstart 68 10.3. Search Quickstarts 69 Chapter . . . . . . . . . 11. . . . . Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 ............ 11.1. Resolve DNS 71 11.2. Create an Application 72 11.3. List Applications for a User 76 11.4. List Applications for a Domain 78 11.5. List Applications and Cartridges 80 11.6. Get Application Information 82 11.7. Get Application and Cartridge Information 84 11.8. Make an Application Highly Available (HA) 88 11.9. Start Application 89 11.10. Stop Application 91 11.11. Force Stop Application 93 11.12. Restart Application 95 11.13. Scale Up Application 97 11.14. Scale Down Application 99 11.15. T idy Application Framework 101 11.16. Reload Application 103 11.17. T rigger T hread Dump 105 11.18. Delete Application 107 Chapter . . . . . . . . . 12. . . . . Application . . . . . . . . . . . . Aliases . . . . . . . . and . . . . .SSL . . . . Certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 ............. 12.1. Add Application Alias 108 12.2. List Application Aliases 111 12.3. Get Application Alias Information 112 12.4. Update Application Alias 113 12.5. Delete Application Alias 116 Chapter . . . . . . . . . 13. . . . .Cartridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 ............. 13.1. List Cartridges 119 13.2. Embedded Cartridges 121 13.2.1. Add Embedded Cartridge 121 13.2.2. List Embedded Cartridges 124 13.2.3. Get Cartridge Information 126 13.2.4. Update Cartridge Configuration 128 13.2.5. Get Cartridge Status 131 13.2.6. Start Cartridge 132 13.2.7. Stop Cartridge 134 13.2.8. Restart Cartridge 136 13.2.9. Reload Cartridge 138 13.2.10. Delete Cartridge 140 Chapter . . . . . . . . . 14 . . . .. Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 . . .1. . . . . . . . . . 14.1. List Application Deployments 141 14.2. Deploy an Application 142 14.3. Activate a Deployment of an Application 144
Table of Contents
Chapter . . . . . . . . . 15. . . . . Environment . . . . . . . . . . . . . .Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 . . .7. . . . . . . . . . 15.1. Add Environment Variable 147 15.2. List Environment Variables 148 15.3. Get Environment Variable Information 149 15.4. Update Environment Variable 150 15.5. Delete Environment Variable 151 Chapter . . . . . . . . . 16. . . . . Gear . . . . . .Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 ............. 16.1. Get Application Gear Groups 153 Supported . . . . . . . . . . . .SSH . . . . .Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 ............. A.1. T ypes of SSH Keys Supported 156 . . . . . . . . . .History Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 .............
Preface
Preface
1. Document Conventions
T his manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information. In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. T he Liberation Fonts set is also used in HT ML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later include the Liberation Fonts set by default.
Character Map from the main menu bar. Next, choose Search Find from the Character Map menu bar, type the name of the character in the Search field and click Next. T he character you sought will be highlighted in the Character T able . Double-click this highlighted character to place it in the T ext to copy field and then click the Copy button. Now switch back to your document and choose Edit Paste from the gedit menu bar. T he above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all distinguishable by context. Mono-spaced Bold Italic or Proportional Bold Italic Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example: T o connect to a remote machine using ssh, type ssh username@ domain.name at a shell prompt. If the remote machine is exam ple.com and your username on that machine is john, type ssh john@ exam ple.com . T he m ount -o rem ount file-system command remounts the named file system. For example, to remount the /hom e file system, the command is m ount -o rem ount /hom e . T o see the version of a currently installed package, use the rpm -q package command. It will return a result as follows: package-version-release. Note the words in bold italics above: username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system. Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example: Publican is a DocBook publishing system.
Source-code listings are also set in m ono-spaced rom an but add syntax highlighting as follows:
Preface
package org.jboss.book.jca.ex1; import javax.naming.InitialContext; public class ExClient { public static void main(String args[]) throws Exception { InitialContext iniCtx = new InitialContext(); Object ref = iniCtx.lookup("EchoBean"); EchoHome home = (EchoHome) ref; Echo echo = home.create(); System.out.println("Created Echo"); System.out.println("Echo.echo('Hello') = " + echo.echo("Hello")); } }
Note
Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier.
Important
Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled Important will not cause data loss but may cause irritation and frustration.
Warning
Warnings should not be ignored. Ignoring warnings will most likely cause data loss.
2. Getting Help
2.1. Do You Need Help?
If you experience difficulty with a procedure or other information described in this documentation, visit the Red Hat Customer Portal at http://access.redhat.com where you can: search or browse through a knowledgebase of technical support articles about Red Hat products submit a support case to Red Hat Global Support Services (GSS) access other product documentation
You can also access the OpenShift web site at https://openshift.redhat.com/ to find blogs, FAQs, forums, and other sources of information. Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software and technology. You can find a list of publicly available mailing lists at https://www.redhat.com/mailman/listinfo. Click the name of any mailing list to subscribe to that list or to access the list archives.
Chapter 1. Introduction
Chapter 1. Introduction
1.1. About OpenShift API
OpenShift provides a Representational State T ransfer (REST ) Application Programming Interface (API). Applications created for OpenShift can access the API using the standard Hypertext T ransfer Protocol (HT T P). T he OpenShift API is structured as a resource, and provides links to all children and any related resources.
Note
T he legacy API has been removed, and is no longer supported. All customers are advised to use the current OpenShift REST API. Report a bug
Using Python
import base64 base64string = base64.encodestring('%s:%s' % (username, password))[:-1] request.add_header("Authorization", "Basic %s" % base64string)
Using cURL T he cURL library supports basic authentication using the --user option, as shown in the example below.
Report a bug
2.2. Version
Every OpenShift REST API call returns the current API version, and other versions that are supported. T he example below shows how to use the cURL command to return the API version.
$ curl -k "https://openshift.redhat.com/broker/rest/api"
T he response for this command is shown below in both XML and JSON syntax. XML Response
10
<response> <status>ok</status> <version>1.6</version> <supported-api-versions> <supported-api-version>1.0</supported-api-version> <supported-api-version>1.1</supported-api-version> <supported-api-version>1.2</supported-api-version> <supported-api-version>1.3</supported-api-version> <supported-api-version>1.4</supported-api-version> <supported-api-version>1.5</supported-api-version> <supported-api-version>1.6</supported-api-version> </supported-api-versions> </response>
JSON Response
{ "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4 1.5 1.6 ], "version": "1.6" }
T o request a specific API version, the client must include the HT T P header with the response request. Examples in both XML and JSON syntax are provided below. XML Clients
Accept: application/xml; version=1.5
JSON Clients
Accept: application/json; version=1.5
If the version requested by the client is not supported, the server responds with the HT T P status code 406, as shown in the examples below in XML and JSON syntax. XML Response for Unsupported Version
11
<response> <messages> <message> <text>Requested API version 2.0 is not supported. 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6</text> <severity>error</severity> </message> </messages> <version>1.6</version> <supported-api-versions> <supported-api-version>1.0</supported-api-version> <supported-api-version>1.1</supported-api-version> <supported-api-version>1.2</supported-api-version> <supported-api-version>1.3</supported-api-version> <supported-api-version>1.4</supported-api-version> <supported-api-version>1.5</supported-api-version> <supported-api-version>1.6</supported-api-version> </supported-api-versions> <status>not_acceptable</status> </response>
Report a bug
12
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. T he client selects the links within these resources to navigate to the required resource. T he table below describes the elements contained in each resource link. T able 2.1. Resource Elements Element Name href m ethod required param eters optional param eters Description URL for resource link HT T P method to use with resource link: GET , PUT , POST , or DELET E An array of input parameters required from the client An array of optional input parameters
T he table below describes attributes associated with each required input parameter. T able 2.2. Required Parameter Attributes Name nam e type description valid options invalid options Description Name of parameter T ype of parameter, for example String, Integer, Array, or Boolean Brief description of the parameter An array of valid options, may be empty An array of invalid options, may be empty
T he table below describes attributes associated with each optional parameter. T able 2.3. Optional Parameter Attributes Name nam e type description valid options default value Description Name of parameter T ype of parameter, for example String, Integer, Array, or Boolean Brief description of the parameter An array of valid options, may be empty Default value for the optional parameter if not provided by the client
An example of an API representation in both XML and JSON syntax is shown below. XML Representation
13
<link> <optional-params/> <required-params> <param> <type>string</type> <valid-options/> <name>id</name> <description>Name of the domain</description> </param> </required-params> <href>https://openshift.redhat.com/broker/rest/domains</href> <rel>Create new domain</rel> <method>POST</method> </link>
JSON Representation
{ "required_params": [ { "type": "string", "valid_options": [], "description": "Name of the domain", "name": "id" } ], "method": "POST", "optional_params": [], "href": "https://openshift.redhat.com/broker/rest/domains", "rel": "Create new domain" }
Resource links from API responses can be hidden with the nolinks parameter. T he nolinks parameter can be included with all supported APIs and can be set to true or false. If the nolinks parameter is not included, it automatically defaults to false. If the nolinks parameter is included and set to true, the resource links are excluded from the API response resulting in a concise output and improved general processing speed. T he cURL command example below shows the API response for a GET method without the nolinks parameter:
14
$ curl -k -X GET https://openshift.redhat.com/broker/rest/user --user [email protected] { "api_version": 1.6, "data": { "capabilities": { "subaccounts": true, "gear_sizes": [ "small", "medium" ], "plan_upgrade_enabled": true, "private_ssl_certificates": true, "inherit_on_subaccounts": [ "gear_sizes" ] }, "consumed_gears": 2, "created_at": "2013-08-14T19:12:59Z", "id": "520bd6bbdbd93c3dee00000d", "links": { "ADD_KEY": { "href": "https://openshift.redhat.com/broker/rest/user/keys", "method": "POST", "optional_params": [], "rel": "Add new SSH key", "required_params": [ { "description": "Name of the key", "invalid_options": [], "name": "name", "type": "string", "valid_options": [] }, { "description": "Type of Key", "invalid_options": [], "name": "type", "type": "string", "valid_options": [ "ssh-rsa", "ssh-dss", "[email protected]", "[email protected]", "[email protected]", "[email protected]" ] }, { "description": "The key portion of an rsa key (excluding ssh-rsa and comment)", "invalid_options": [], "name": "content", "type": "string", "valid_options": [] } ] }, "LIST_KEYS": { "href": "https://openshift.redhat.com/broker/rest/user/keys",
15
"method": "GET", "optional_params": [], "rel": "List SSH keys", "required_params": [] } }, "login": "[email protected]", "max_gears": 10, "plan_id": "free", "plan_state": "ACTIVE", "usage_account_id": null }, "messages": [], "status": "ok", "type": "user", "version": "1.6" }
T he cURL command example below shows the API response for a GET method with the nolinks parameter set to true:
$ curl -k -X GET https://openshift.redhat.com/broker/rest/user?nolinks=true -user " [UserName]:[Password]" { "data": { "capabilities": { "gear_sizes": [ "small", "medium" ], "plan_upgrade_enabled": true, "private_ssl_certificates": true, "subaccounts": false, "max_storage_per_gear": 5 }, "consumed_gears": 5, "created_at": "2013-02-07T22:48:58Z", "id": "51142f5adbd93ce16a0005b3", "login": "[email protected]", "max_gears": 16, "plan_id": "silver", "plan_state": "ACTIVE", "usage_account_id": "2526383" }, "messages": [], "status": "ok", "type": "user", }
T he cURL command example below shows the API response for a PUT method with the nolinks parameter set to true:
16
$ curl -k -X PUT https://openshift.redhat.com/broker/rest/user --user " [UserName]:[Password]" --data "plan_id=free" --data "nolinks=true" { "data": { "capabilities": { "plan_upgrade_enabled": true, "subaccounts": false, "gear_sizes": [ "small" ] }, "consumed_gears": 0, "created_at": "2013-05-29T23:18:16Z", "id": "51a68cb836905d42c3000016", "login": "user", "max_gears": 3, "plan_id": "free", "plan_state": "ACTIVE", "usage_account_id": "2223379" }, "errors": {}, "messages": [], "status": "ok", "type": "account", }
Report a bug
Report a bug
2.5. Messages
T he table below describes the parameters contained in each message from the API response. T he API can return zero or more messages.
17
T able 2.5. API Message Parameters Name severity text field exit code Description Message severity. Examples include debug, info, warning, error, and result T ext of the message Indicates the message is relevant to a particular field in the resource. Used for validation errors and can be null Exit code returned by the API. 0 if there are no issues
Note
Messages that return severity=result contain information that is passed to the user. Examples include database usernames and passwords. Report a bug
Using Ruby
headers = {"Accept" => "application/xml"}
Using Python
request.add_header("Accept", "application/xml")
Using cURL
curl -k "https://openshift.redhat.com/broker/rest/api" -H "Accept: application/xml"
Report a bug
18
T able 2.6. HT T P Status Codes Code 200 201 204 301 400 401 403 404 406 T ext OK Created No content Moved Permanently Bad Request Unauthorized Forbidden Not Found Not Acceptable Description Standard response for successful HT T P requests. T he resource was successfully created. T he requested delete operation was successful. T he resource has moved, and all future requests should be made to the new URI. Invalid request due to bad syntax. Authentication has failed, or was not provided. T he request is understood, but server is refusing to respond. T he requested resource cannot be found. T he content from the requested resource is not acceptable according to the Accept headers. Possibly due to version requested, or it no longer being supported. T he request could not be processed because of conflict in the request. T he resource is no longer available, and will not be available again. T he request was well formed, but was not followed due to semantic errors. A generic error message when something is broken. Server was acting as a gateway or proxy, and received an invalid response. T he server is currently unavailable; possibly down for maintenance. T he server was acting as a gateway or proxy and did not receive a timely response.
Conflict Gone Unprocessable Entity Internal Server Error Bad Gateway Service Unavailable Gateway T imeout
Report a bug
19
JSON Response T he OpenShift API resources are returned. Unnecessary information has been left out for brevity.
20
{ "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": [], "rel": "Create new domain", "required_params": [ { "description": "Name of the domain", "invalid_options": [ "amentra", "aop", ........ "wise", "xnio" ], "name": "name", "type": "string", "valid_options": [] } ] }, "LIST_DOMAINS": { "href": "https://openshift.redhat.com/broker/rest/domains", "method": "GET", "optional_params": [], "rel": "List all domains you have access to", "required_params": [] }, "LIST_DOMAINS_BY_OWNER": { "href": "https://openshift.redhat.com/broker/rest/domains", "method": "GET", "optional_params": [], "rel": "List domains", "required_params": [ { "description": "Return only the domains owned by the
21
specified user id or identity. Use @self to refer to the current user.", "invalid_options": [], "name": "owner", "type": "string", "valid_options": [ "@self", "*" ] } ] }, "SHOW_DOMAIN": { "href": "https://openshift.redhat.com/broker/rest/domain/:name", "method": "GET", "optional_params": [], "rel": "Retrieve a domain by its name", "required_params": [ { "description": "Unique name of the domain", "invalid_options": [], "name": ":name", "type": "string", "valid_options": [] } ] }, "SHOW_APPLICATION_BY_DOMAIN": { "href": "https://openshift.redhat.com/broker/rest/domain/:domain_name/application/:name", "method": "GET", "optional_params": [], "rel": "Retrieve an application by its name and domain", "required_params": [ { "description": "Unique name of the domain", "invalid_options": [], "name": ":domain_name", "type": "string", "valid_options": [] }, { "description": "Name of the application", "invalid_options": [], "name": ":name", "type": "string", "valid_options": [] } ] }, "LIST_CARTRIDGES": { "href": "https://openshift.redhat.com/broker/rest/cartridges", "method": "GET", "optional_params": [], "rel": "List cartridges", "required_params": [] }, "LIST_APPLICATIONS": { "href": "https://openshift.redhat.com/broker/rest/applications", "method": "GET", "optional_params": [],
22
"rel": "List application", "required_params": [] }, "SHOW_APPLICATION": { "href": "https://openshift.redhat.com/broker/rest/application/:id", "method": "GET", "optional_params": [], "rel": "List application", "required_params": [ { "description": "Unique identifier of the application", "invalid_options": [], "name": ":id", "type": "string", "valid_options": [] } ] }, "LIST_AUTHORIZATIONS": { "href": "https://openshift.redhat.com/broker/rest/user/authorizations", "method": "GET", "optional_params": [], "rel": "List authorizations", "required_params": [] }, "SHOW_AUTHORIZATION": { "href": "https://openshift.redhat.com/broker/rest/user/authorization/:id", "method": "GET", "optional_params": [], "rel": "Retrieve authorization :id", "required_params": [ { "description": "Unique identifier of the authorization", "invalid_options": [], "name": ":id", "type": "string", "valid_options": [] } ] }, "ADD_AUTHORIZATION": { "href": "https://openshift.redhat.com/broker/rest/user/authorizations", "method": "POST", "optional_params": [ { "default_value": "userinfo", "description": "Select one or more scopes that this authorization will grant access to:\n\n* session\n Grants a client the authority to perform all API actions against your account. Valid for 1 day.\n* read\n Allows the client to access resources you own without making changes. Does not allow access to view authorization tokens. Valid for about 1 month.\n* userinfo\n Allows a client to view your login name, unique id, and your user capabilities. Valid for about 1 month.\n* domain/:id/view\n Grant read-only access to a single domain. Valid for about 1 month.\n* domain/:id/edit\n Grant edit access to a single domain and all its applications. Valid for about 1 month.\n* domain/:id/admin\n Grant full administrative access to a single domain and all its applications. Valid for about 1 month.\n* application/:id/view\n Grant read-only access to a single application. Valid for about 1 month.\n* application/:id/edit\n Grant edit access to a single application. Valid for about
23
1 month.\n* application/:id/admin\n Grant full administrative access to a single application. Valid for about 1 month.", "name": "scope", "type": "string", "valid_options": [ "session", "read", "userinfo", "domain/:id/view", "domain/:id/edit", "domain/:id/admin", "application/:id/view", "application/:id/edit", "application/:id/admin" ] }, { "default_value": null, "description": "A description to remind you what this authorization is for.", "name": "note", "type": "string", "valid_options": [] }, { "default_value": -1, "description": "The number of seconds before this authorization expires. Out of range values will be set to the maximum allowed time.", "name": "expires_in", "type": "integer", "valid_options": [] }, { "default_value": false, "description": "Attempt to locate and reuse an authorization that matches the scope and note and has not yet expired.", "name": "reuse", "type": "boolean", "valid_options": [ true, false ] } ], "rel": "Add new authorization", "required_params": [] }, "LIST_QUICKSTARTS": { "href": "https://www.openshift.com/api/v1/quickstarts/promoted.json", "method": "GET", "optional_params": [], "rel": "List quickstarts", "required_params": [] }, "SHOW_QUICKSTART": { "href": "https://www.openshift.com/api/v1/quickstarts/:id", "method": "GET", "optional_params": [], "rel": "Retrieve quickstart with :id",
24
"required_params": [ { "description": "Unique identifier of the quickstart", "invalid_options": [], "name": ":id", "type": "string", "valid_options": [] } ] }, "SEARCH_QUICKSTARTS": { "href": "https://www.openshift.com/api/v1/quickstarts.json", "method": "GET", "optional_params": [], "rel": "Search quickstarts", "required_params": [ { "description": "The search term to use for the quickstart", "invalid_options": [], "name": "search", "type": "string", "valid_options": [] } ] } }, "messages": [], "status": "ok", "type": "links", "version": "1.6" }
Report a bug
25
T he table below further describes each available capability for the user. Name plan_upgrade_enabled subaccounts gear_sizes m ax_storage_per_gear private_ssl_certificat es Report a bug Description Indicates whether the user is on an upgraded plan. Indicates whether the user has the ability to create subaccounts. Available gear sizes depending on the type of plan. Maximum storage in gigabytes available per gear to the specified user. Subscription plan of the specified user.
JSON Response T he API returns the user information resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 4, User Information for more information
26
27
{ "api_version": 1.6, "data": { "capabilities": { "subaccounts": true, "gear_sizes": [ "small", "medium" ], "plan_upgrade_enabled": true, "private_ssl_certificates": true, "inherit_on_subaccounts": [ "gear_sizes" ] }, "consumed_gears": 2, "created_at": "2013-08-14T19:12:59Z", "id": "520bd6bbdbd93c3dee00000d", "links": { "ADD_KEY": { "href": "https://openshift.redhat.com/broker/rest/user/keys", "method": "POST", "optional_params": [], "rel": "Add new SSH key", "required_params": [ { "description": "Name of the key", "invalid_options": [], "name": "name", "type": "string", "valid_options": [] }, { "description": "Type of Key", "invalid_options": [], "name": "type", "type": "string", "valid_options": [ "ssh-rsa", "ssh-dss", "[email protected]", "[email protected]", "[email protected]", "[email protected]" ] }, { "description": "The key portion of an rsa key (excluding ssh-rsa and comment)", "invalid_options": [], "name": "content", "type": "string", "valid_options": [] } ] }, "LIST_KEYS": { "href": "https://openshift.redhat.com/broker/rest/user/keys", "method": "GET", "optional_params": [],
28
"rel": "List SSH keys", "required_params": [] } }, "login": "[email protected]", "max_gears": 10, "plan_id": "free", "plan_state": "ACTIVE", "usage_account_id": null }, "messages": [], "status": "ok", "type": "user", "version": "1.6" }
Report a bug
Note
Parent accounts cannot be deleted. T herefore, the API returns an error message if you attempt to delete a parent account. Method and URL Structure Method DELET E Request Parameters Not applicable cURL Command Example
$ curl -k -X DELETE https://openshift.redhat.com/broker/rest/user -d --user child_user:password
29
Report a bug
30
T he table below further describes each available capability based on the subscription plan. Name subaccounts m ax_gears gear_sizes Description Indicates whether the user has the ability to create subaccounts. Maximum number of available gears for the subscribed plan. Available gear sizes depending on the type of plan.
m ax_untracked_addtl_storage_per_ Maximum additional filesystem storage per gear that will NOT be tracked for the user. gear m ax_tracked_addtl_storage_per_g ear plan_upgrade_enabled private_ssl_certificates Report a bug Maximum additional filesystem storage per gear that will be tracked for the user. Indicates whether the user is on an upgraded plan. Subscription plan of the specified user.
31
JSON Response T he API returns the plans resource with additional resource links. See Chapter 5, Subscription Plans for more information on all plan parameters.
32
{ "api_version": 1.6, "data": [ { "capabilities": { "subaccounts": false, "max_gears": 3, "gear_sizes": [ "small" ], "plan_upgrade_enabled": true }, "id": "free", "links": { "GET_FREE_PLAN": { "href": "https://openshift.redhat.com/broker/rest/plans/free", "method": "GET", "optional_params": [], "rel": "Get free plan", "required_params": [] } }, "name": "Free", "plan_no": 10332742, "usage_rates": null }, { "capabilities": { "subaccounts": false, "max_gears": 16, "gear_sizes": [ "small", "medium" ], "max_untracked_addtl_storage_per_gear": 5, "max_tracked_addtl_storage_per_gear": 0, "plan_upgrade_enabled": true, "private_ssl_certificates": true }, "id": "silver", "links": { "GET_SILVER_PLAN": { "href": "https://openshift.redhat.com/broker/rest/plans/silver", "method": "GET", "optional_params": [], "rel": "Get silver plan", "required_params": [] } }, "name": "Silver", "plan_no": 10332743, "usage_rates": { "gear": { "small": { "usd": 0.04, "cad": 0.04, "eur": 0.03, "duration": "hour" },
33
"medium": { "usd": 0.1, "cad": 0.1, "eur": 0.08, "duration": "hour" } }, "storage": { "gigabyte": { "usd": 0, "cad": 0, "eur": 0, "duration": "month" } }, "cartridge": { "jbosseap-6": { "usd": 0.03, "cad": 0.03, "eur": 0.02, "duration": "hour" } } } } ], "messages": [], "status": "ok", "type": "plans", "version": "1.6" }
Report a bug
JSON Response T he API returns detailed information about the specified plan, and shows resources and capabilities
34
available to the user. See Chapter 5, Subscription Plans for more information on all plan parameters.
35
{ "api_version": 1.6, "data": { "capabilities": { "subaccounts": false, "max_gears": 16, "gear_sizes": [ "small", "medium" ], "max_untracked_addtl_storage_per_gear": 5, "max_tracked_addtl_storage_per_gear": 0, "plan_upgrade_enabled": true, "private_ssl_certificates": true }, "id": "silver", "links": { "GET_SILVER_PLAN": { "href": "https://openshift.redhat.com/broker/rest/plans/silver", "method": "GET", "optional_params": [], "rel": "Get silver plan", "required_params": [] } }, "name": "Silver", "plan_no": 10332743, "usage_rates": { "gear": { "small": { "usd": 0.04, "cad": 0.04, "eur": 0.03, "duration": "hour" }, "medium": { "usd": 0.1, "cad": 0.1, "eur": 0.08, "duration": "hour" } }, "storage": { "gigabyte": { "usd": 0, "cad": 0, "eur": 0, "duration": "month" } }, "cartridge": { "jbosseap-6": { "usd": 0.03, "cad": 0.03, "eur": 0.02, "duration": "hour" } } } },
36
Report a bug
Note
An upgraded OpenShift Online account is required to upgrade an account to the Silver plan with this REST API call. Go to www.openshift.com for more information on available subscription plans. Method and URL Structure Method PUT Request Parameters Name plan_id Description Plan identifier; for example, silver T ype String Require d Yes Valid Options free ; silver Default Value Not applicable Resource URL /broker/rest/user
JSON Response T he API returns the user information resource and related resource links. See Chapter 4, User Information for more information on all user information parameters.
37
{ "data": { "capabilities": { "plan_upgrade_enabled": true, "subaccounts": false, "gear_sizes": [ "small", "medium" ], "private_ssl_certificates": true, "max_storage_per_gear": 5 }, "consumed_gears": 1, "created_at": "2013-05-16T23:43:25Z", "id": "51956f1d686f90a138000001", "login": "[email protected]", "max_gears": 16, "plan_id": "silver", "plan_state": "ACTIVE", "usage_account_id": "2540629" }, "errors": {}, "messages": [], "status": "ok", "type": "account", }
Report a bug
38
Report a bug
content
String
Yes
Not applicable
Request
{ "name": "mykey", "type": "ssh-rsa", "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtW QcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+B MOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1 LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M +n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3" }
39
$ curl -k -X POST https://openshift.redhat.com/broker/rest/user/keys --user [email protected]:password --data-urlencode name=mysshkey --data-urlencode type=ssh-rsa --data-urlencode content=AAAAB3NzaC1yc2EhyuiBIwAAAQEA14PDPWsaZMDspZNK7ABsppzwy++Ih2tRwjBkxzC2K EcQi7v8IcyODb7qLJ72tgx3G90zRm7vQ6wuyy7rkYLIvTYiDnchy68ikjyt7wuBuSCgFcHLUdon7xn 7VrskjhMN4pae6bjaY1+o4Knpfm3N72+9q/6+T52QIWCE1+Ku6UYYuOGy8qWynddw24bp4jGEKAXq TXcALuBoukC3uB+hrxvZYH1fbek6aEAQPYzO6sGqJqV1UoF0ascelhtyui8kadrKPr/5uJsPS+kGZ guU16ykQb2k9K03JMSfvPP4rLe50Q9G4dSZFbUOQXdC3n13CqvsEVzizUGl0HyT8MhRqw==
JSON Response T he API returns the key resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 6, SSH Keys for more information on all SSH key parameters.
{ "api_version": 1.6, "data": { "content": "AAAAB3NzaC1yc2EhyuiBIwAAAQEA14PDPWsaZMDspZNK7ABsppzwy++Ih2tRwjBkxzC2KEcQi7v8IcyOD b7qLJ72tgx3G90zRm7vQ6wuyy7rkYLIvTYiDnchy68ikjyt7wuBuSCgFcHLUdon7xn7VrskjhMN4pae6bja Y1+o4Knpfm3N72+9q/6+T52QIWCE1+Ku6UYYuOGy8qWynddw24bp4jGEKAXqTXcALuBoukC3uB+hrxvZYH 1fbek6aEAQPYzO6sGqJqV1UoF0ascelhtyui8kadrKPr/5uJsPS+kGZguU16ykQb2k9K03JMSfvPP4rLe5 0Q9G4dSZFbUOQXdC3n13CqvsEVzizUGl0HyT8MhRqw", "name": "mykey", "type": "ssh-rsa" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Created SSH key mykey" } ], "status": "created", "type": "key", "version": "1.6" }
Report a bug
40
JSON Response T he API returns the key resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 6, SSH Keys for more information on all SSH key parameters.
{ "api_version": 1.6, "data": [ { "content": "AAAAB3NzaC1yc2gyiketIwAAAQEA3DyqVJYGQRvbyc9TZAumxU3C5v2cBF5YCJMRobDpXWAdG6Ls4pWp k/10CwiJDQcWa8Oeq3HajnAJfalz8rGXXHp9UA9YNp4vrzYDgLkCzS5jHJzMIu7aIJS6WrFB1i1nZwnIyf thyBmSX8C8bWK3+FeZYqwmXy++t4uoZIYJ5RTffW8/1w3sgt47juikR6qzzSDh1Bks+GW5i1FxQD7PeuIZ FJlAJyJLtiAPfbazX3YrroiPRL9YnB/QTpLg2jGeTtlC2UPhofbwMqAqaVpjCShHTZRW+aPGGB95BuwZMz OR2huioplkVRE7uhLsn3kFrsUBtu0SzPSSZ5fUQjeMUQ==", "name": "default", "type": "ssh-rsa" } ], "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Found 1 ssh keys" } ], "status": "ok", "type": "keys", "version": "1.6" }
Report a bug
41
JSON Response T he API returns the key resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 6, SSH Keys for more information on all SSH key parameters.
{ "api_version": 1.6, "data": { "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtW QcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+B MOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1 LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M +n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3", "name": "mysshkey", "type": "ssh-rsa" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Found SSH key 'mysshkey'" } ], "status": "ok", "type": "key", "version": "1.6" }
Report a bug
42
content
String
Yes
Not applicable
Not applicable
Request
{ "type": "ssh-rsa", "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtW QcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+B MOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1 LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M +n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3" }
Note
It is recommended to URL encode the key contents because it may contain non alphanumeric characters. JSON Response T he API returns the key resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 6, SSH Keys for more information on all SSH key parameters.
43
{ "api_version": 1.6, "data": { "content": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtW QcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+B MOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1 LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M +n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3", "name": "mykey", "type": "ssh-rsa" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Updates SSH key mysshkey for [email protected]" } ], "status": "ok", "type": "key", "version": "1.6" }
Report a bug
JSON Response
44
{ "api_version": 1.6, "data": null, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Deleted SSH key mysshkey" } ], "status": "ok", "type": null, "version": "1.6" }
T he API returns an error message if the SSH key to be deleted is not found.
{ "api_version": 1.6, "data": null, "messages": [ { "exit_code": 118, "field": null, "severity": "error", "text": "User ssh key 'fakekey' not found." } ], "status": "not_found", "type": null, "version": "1.6" }
Report a bug
45
Chapter 7. Authorizations
T his 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. T he table below describes each parameter associated with an OpenShift authorization token. Name id scope Description Unique OpenShift login that created this authorization token. Scope of the authorization token to determine type of access. Scopes that are supported by a server are described in the ADD_AUT HORIZAT ION resource link and may be different for each server. A reminder description of what the authorization is for. T otal time in seconds before this authorization expires. Out of range values will be set to the maximum allowed time. Remaining time in seconds before this authorization expires. Attempt to locate and reuse an authorization that matches the scope and note and has not yet expired. Authorization string that contains user credentials.
T he table below describes the available scope options that determine the type of access a user is granted with an authorization. Name session read userinfo Report a bug Description Grants a client the authority to perform all API actions against an account. Valid for one day. Access to the API is read-only, while authorization endpoints cannot be read. Only read access to the /user API resource is provided.
46
Chapter 7. Authorizations
Name scope
T ype String
Required No
Valid Options session ; read ; userinfo ; dom ain/:id/vie w; dom ain/:id/edi t; dom ain/:id/adm in ; application/:i d/view; application/:i d/edit; application/:i d/adm in Not applicable
note
Reminder description of authorization Number of seconds before authorization expires Attempt to locate and reuse an authorization matching scope and note and has not expired
String
No
Not applicable
expires_i n
String
No
Not applicable
-1. For invalid values, the default value is determined by the server false
reuse
Boolea n
No
true ; false
Request
{ "scope": "userinfo", "note": "This is my UPDATED note to myself", "expires_in": -1, "reuse": false }
JSON Response T he related resource links returned by the API have been left out for brevity. See Chapter 7, Authorizations for more information on all authorization parameters.
47
{ "api_version": 1.6, "data": { "created_at": "2013-08-21T02:02:10Z", "expires_in": 2592000, "expires_in_seconds": 2592000, "id": "52141fa2e499b2229e00009b", "identity": "[email protected]", "note": "This is my UPDATED note to myself", "scopes": "userinfo", "token": "6c85ff7f619a964e260ee6def3fc5829128dbba3f8bc11a5d89178e0d6e7a163" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Create authorization" } ], "status": "created", "type": "authorization", "version": "1.6" }
Report a bug
JSON Response T he API returns the authorizations resource with related resource links which have been left out for brevity. No resource links are returned if the user account does not contain any authorizations. See Chapter 7, Authorizations for more information on all authorization parameters.
48
Chapter 7. Authorizations
{ "api_version": 1.6, "data": [ { "created_at": "2013-08-22T02:30:47Z", "expires_in": 86400, "expires_in_seconds": 6870, "id": "521577d703ef64a3120000de", "identity": "[email protected]", "note": "OpenShift Console (from 66.187.239.10 on Firefox)", "scopes": "session", "token": "187bd89d1f5172af567eb12631c45gt7415dca5c2b7jy56970b3f3a911df4697" } ], "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "List authorizations" } ], "status": "ok", "type": "authorizations", "version": "1.6" }
Report a bug
JSON Response T he API returns information about the specified authorization and related resource links which have been left out for brevity. See Chapter 7, Authorizations for more information on all authorization parameters.
49
{ "api_version": 1.6, "data": { "created_at": "2013-08-21T02:02:10Z", "expires_in": 2592000, "expires_in_seconds": 2592000, "id": "52141fa2e499b2229e00009b", "identity": "[email protected]", "note": "This is my UPDATED note to myself", "scopes": "userinfo", "token": "6c85ff7f619a964e260ee6def3fc5829128dbba3f8bc11a5d89178e0d6e7a163" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Display authorization" } ], "status": "ok", "type": "authorization", "version": "1.6" }
Report a bug
50
Chapter 7. Authorizations
T he API returns the authorizations resource with related resource links which have been left out for brevity. See Chapter 7, Authorizations for more information on all authorization parameters.
{ "api_version": 1.6, "data": { "created_at": "2013-08-21T02:02:10Z", "expires_in": 2592000, "expires_in_seconds": 2592000, "id": "52141fa2e499b2229e00009b", "identity": "[email protected]", "note": "This is a note to myself", "scopes": "userinfo", "token": "6c85ff7f619a964e260ee6def3fc5829128dbba3f8bc11a5d89178e0d6e7a163" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Change authorization" } ], "status": "ok", "type": "authorization", "version": "1.6" }
Report a bug
51
{ "api_version": 1.6, "data": null, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Authorization 52141fa2e499b2229e00009b is revoked." } ], "status": "ok", "type": null, "version": "1.6" }
Report a bug
52
Chapter 8. D omains
Chapter 8. Domains
T his 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. T herefore, the syntax for the application name is ApplicationName-DomainName.rhcloud.com. T he table below describes each parameter associated with an OpenShift domain. Name nam e suffix allowed_gear_size s Report a bug Description Name of the domain Domain suffix Array of zero or more gear sizes allowed on this domain
Request
{ "name": "mydomain", "allowed_gear_sizes": "small" }
JSON Response
53
T he API returns the domain resource with related resource links which have been left out for brevity. See Chapter 8, Domains for more information on all domain parameters.
{ "api_version": 1.6, "data": { "allowed_gear_sizes": [ "small" ], "creation_time": "2013-11-07T00:28:13Z", "id": "527ade9d7f9c48d371000009", "members": [ { "explicit_role": null, "from": [ { "type": "owner", "role": "admin" } ], "id": "527ade897f9c48d371000001", "login": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "mydomain", "suffix": "rhcloud.com" }, "messages": [ { "exit_code": 0, "field": null, "index": null, "severity": "info", "text": "Created domain with name mydomain" } ], "status": "created", ], "type": "domain", "version": "1.6" }
Report a bug
54
Chapter 8. D omains
JSON Response T he API returns a list of all domains that you have access to. T he related resource links returned by the API have been left out for brevity.
{ "api_version": 1.6, "data": [ { "allowed_gear_sizes": [ "small", "medium", "c9" ], "creation_time": "2013-08-20T07:21:50Z", "links": { }, "members": [ { "explicit_role": null, "from": [ { "type": "owner", "role": "admin" } ], "id": "520bd6bbdbd93c3dee00000d", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "mydomain", "suffix": "rhcloud.com" } ], "messages": [], "status": "ok", "type": "domains", "version": "1.6" }
Report a bug
Description Get a list of domains owned by a particular user, specified with the owner parameter. If no owner is specified, it automatically defaults to self. Method and URL Structure Method GET Request Parameters Name owner Description List domains owned by specified user, or @self for current user T ype String Required Yes Valid Options User Input; @ self Default Value Not applicable URL Structure /broker/rest/domains
Request
{ "owner": "@self" }
JSON Response T he API returns a list of domains owned by the specified user. T he related resource links returned by the API have been left out for brevity.
56
Chapter 8. D omains
{ "api_version": 1.6, "data": [ { "allowed_gear_sizes": [ "small", "medium", "c9" ], "creation_time": "2013-08-20T07:21:50Z", "links": { }, "members": [ { "explicit_role": null, "from": [ { "type": "owner", "role": "admin" } ], "id": "520bd6bbdbd93c3dee00000d", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "mydomain", "suffix": "rhcloud.com" } ], "messages": [], "status": "ok", "type": "domains", "version": "1.6" }
Report a bug
57
JSON Response T he API returns the domain resource with related resource links which have been left out for brevity. See Chapter 8, Domains for more information on all domain resource parameters.
$ curl -k -X GET https://openshift.redhat.com/broker/rest/domains/mydomain -user [email protected]:password { "api_version": 1.6, "data": { "allowed_gear_sizes": [ "small" ], "creation_time": "2013-08-21T01:58:41Z", "members": [ { "explicit_role": null, "from": [ { "type": "owner", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "mydomain", "suffix": "rhcloud.com" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Found domain mydomain" } ], "status": "ok", "type": "domain", "version": "1.6" }
Report a bug
58
Chapter 8. D omains
Method and URL Structure Method PUT Request Parameters Name nam e allowed_g ear_sizes Description Name of domain Array of zero or more gear sizes allowed on this domain T ype String String Required Yes No Valid Options Not applicable Not applicable Default Value Not applicable Not applicable URL Structure /broker/rest/domains/:name
Request
{ "name": "mydomainX", "allowed_gear_sizes": "small" }
JSON Response T he API returns the domain resource with related resource links which have been left out for brevity. See Chapter 8, Domains for more information on all domain parameters.
59
{ "api_version": 1.6, "data": { "allowed_gear_sizes": [ "small" ], "creation_time": "2013-11-07T00:28:13Z", "id": "527ade9d7f9c48d371000009", "members": [ { "explicit_role": null, "from": [ { "type": "owner", "role": "admin" } ], "id": "527ade897f9c48d371000001", "login": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "mydomainx", "suffix": "rhcloud.com" }, "messages": [ { "exit_code": 0, "field": null, "index": null, "severity": "info", "text": "Changed namespace to 'mydomainx'." } ], "status": "ok", ], "type": "domain", "version": "1.6" }
Report a bug
60
Chapter 8. D omains
Note
T he API will exit with an error message if there are applications within the domain to be deleted. T herefore, all applications must be deleted before deleting a domain. Setting the force parameter to true will automatically delete all applications under that domain, and then delete the domain.
Warning
Deleting a domain with the force parameter set to true will delete all applications created within that domain. T his operation cannot be reversed. Method and URL Structure Method DELET E Request Parameters Name force Description Force delete domain T ype Boolean Require d No Valid Options true ; false Default Value false URL Structure /broker/rest/domains/:name
JSON Response If there are applications under the domain to be deleted, the API exits with an error message.
{ "api_version": 1.6, "data": null, "messages": [ { "exit_code": 128, "field": null, "severity": "error", "text": "Domain contains applications. Delete applications first or set force to true." } ], "status": "unprocessable_entity", "type": null, "version": "1.6" }
In this case, delete all applications that exist under the domain or set the force parameter to true to
61
automatically delete the applications as part of the domain delete process. Report a bug
62
Chapter 9. Members
Chapter 9. Members
9.1. List Members of a Domain
Description Get a list of members that belong to the specified domain. Method and URL Structure Method GET Request Parameters Not applicable cURL Command Example
$ curl -k -X GET https://openshift.redhat.com/broker/rest/domains/mydomain/members --user [email protected]:password
JSON Response T he API returns a list of all members belonging to the specified domain.
63
{ "api_version": 1.6, "data": [ { "explicit_role": null, "from": [ { "type": "owner", "role": "admin" } ], "id": "521bf803656c674541000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Found 1 member." } ], "status": "ok", "type": "members", "version": "1.6" }
Report a bug
64
Chapter 9. Members
Request
{ "role": "view", "login": "[email protected]" }
JSON Response T he sample JSON response below shows that a new domain member has been added.
{ "api_version": 1.6, "data": { "explicit_role": "view", "id": "526097602587c8242100006b", "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", "type": "member", "version": "1.6" }
Report a bug
65
JSON Response T he API returns a list of all members belonging to the specified application.
{ "api_version": 1.6, "data": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "521bf803656c674541000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Found 1 member." } ], "status": "ok", "type": "members", "version": "1.6" }
Report a bug
66
JSON Response T he API returns a list of all quickstarts that are available. See Chapter 10, Quickstarts for more information on all quickstart parameters.
67
{ "data": [ { "quickstart": { "id": "13145", "href": "https://www.openshift.com/quickstarts/drupal-7", "name": "Drupal 7", "updated": "1365011911", "summary": "An open source content management platform written in PHP powering millions of websites and applications. It is built, used, and supported by an active and diverse community of people around the world. This quickstart will download and install the most recent stable version of Drupal and then generate a new site for you. Your administrative username and password will default to admin/openshift_changeme, so don't forget to alter them once you log in!\n\nWithout sharing a filesystem, Drupal can't be web scaled, but the README.md describes a workaround that will allow you to scale if you don't need direct file upload into Drupal.\n\nCreating this quickstart may take several minutes. You may need to restart the application once the database is configured. NOTE: If you want to run the Drupal cron tasks, please install the cron cartridge.", "body": "<p>An open source content management platform written in PHP powering millions of websites and applications. It is built, used, and supported by an active and diverse community of people around the world. This quickstart will download and install the most recent stable version of Drupal and then generate a new site for you. Your administrative username and password will default to admin/openshift_changeme, so don't forget to alter them once you log in!</p>\n\n<p>Without sharing a filesystem, Drupal can't be web scaled, but the <a href=\"https://github.com/openshift/drupalquickstart/blob/master/README.md\">README.md</a> describes a workaround that will allow you to scale if you don't need direct file upload into Drupal.</p>\n\n<p>Creating this quickstart may take several minutes. You may need to restart the application once the database is configured. NOTE: If you want to run the Drupal cron tasks, please install the cron cartridge.</p>", "cartridges": "php-*, mysql-*", "website": "http://drupal.org/", "tags": "cms, drupal, instant_app, not_scalable, php", "language": "PHP", "initial_git_url": "https://github.com/openshift/drupalquickstart.git", "provider": "openshift" } }, ] }
Report a bug
68
Request Parameters Name id Description Unique identifier of the quickstart T ype String Required Yes Valid Options Not applicable Default Value Not applicable
Report a bug
69
T ype String
Required Yes
JSON Response T he API returns information about all quickstarts that match the specified search string. See Chapter 10, Quickstarts for more information on all quickstart parameters.
{ "data": [ { "quickstart": { "id": "12724", "href": "https://www.openshift.com/quickstarts/wordpress-3x", "name": "WordPress 3.x", "updated": "1365011887", "summary": "A semantic personal publishing platform written in PHP with a MySQL back end, focusing on aesthetics, web standards, and usability. Currently using version 3.5.1.\n\nThe first time you access the app you'll be asked to set a username and password and give your blog a name. Be sure to track security updates from upstream.", "body": "<p>A semantic personal publishing platform written in PHP with a MySQL back end, focusing on aesthetics, web standards, and usability. Currently using version 3.5.1.</p>\n\n<p>The first time you access the app you'll be asked to set a username and password and give your blog a name. Be sure to track security updates from upstream.</p>", "cartridges": "php-*, mysql-*", "website": "http://wordpress.org", "tags": "blog, cms, instant_app, not_scalable", "language": "PHP", "initial_git_url": "git://github.com/openshift/wordpressexample.git", "provider": "openshift" } } ] }
Report a bug
70
71
JSON Response If the DNS is resolvable the API returns the response shown below. If the DNS is not resolvable an error message is returned.
{ "api_version": 1.6, "data": true, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Resolved DNS myapplication-mydomain.rhcloud.com" } ], "status": "ok", "type": "boolean", "version": "1.6" }
Report a bug
Request Parameters Name nam e cartridges Description Name of application Array of one or more cartridge names T ype String Array Require d Yes No Valid Options Not applicable nodejs-0.6 ; nodejs-0.10 ; python-3.3 ; python-2.7 ; python-3.3 ; python-2.7 ; python-2.6 ; zend-5.6 ; ruby1.9 ; ruby-1.8 ; jenkins-1 ; jbossews-2.0 ; jbossews-1.0 ; Default Value Not applicable Not applicable
72
perl-5.10 ; php5.3 ; jbosseap6 ; diy-0.1 ; jbossas-7 scale gear_size initial_git _url Mark application as scalable Cartridge gear size URL to Git source code repository that is the basis for this application Name of cartridge Boolea n String String No No No true ; false sm all ; m edium URL; empty false sm all Not applicable
cartridges[ ][nam e]
String
No
nodejs-0.6 ; nodejs-0.10 ; python-3.3 ; python-2.7 ; python-2.6 ; zend-5.6 ; ruby1.9 ; ruby-1.8 ; jenkins-1 ; jbossews-2.0 ; jbossews-1.0 ; perl-5.10 ; php5.3 ; jbosseap6 ; diy-0.1 ; jbossas-7 sm all ; m edium
Not applicable
cartridges[ ][gear_size ]
Gear size of each individual cartridge. If gear_size is not specified, default gear size is used depending on user input URL to a downloadable cartridge; multiple URLs may be specified Add or update application environment variables
String
No
Not applicable
cartridges[ ][url]
String
No
Not applicable
Not applicable
String
No
Not applicable
Not applicable
Request
{ "name": "myapp", "cartridges": "ruby-1.9", "scale": "true", "gear_size": "small", "initial_git_url": "" }
73
In the above cURL command example, the gear_size parameter is applied to all cartridges that are added to the specified application. However, the cURL example below shows how to apply the gear_size parameter to individual cartridges when adding multiple cartridges to an application.
$ curl -k -X POST https://openshift.redhat.com/broker/rest/domain/mydomain/applications --user [email protected]:password --data-urlencode name=mysecondapp --data-urlencode cartridges=[][name]=jbosseap-6 --data-urlencode cartridges[][gear_size]=medium --data-urlencode cartridges[][name]=mysql-5.1 --data-urlencode cartridges[][gear_size]=small
JSON Response T he API returns information about the newly created application with related resource links which have been left out for brevity. See Chapter 11, Applications for more information on all application parameters.
74
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapp-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "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": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapp", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application myapp was created." }, { "exit_code": 0, "field": null, "severity": "warning", "text": "HAProxy instance is started\n" } ], "status": "created", "type": "application",
75
"version": "1.6" }
Report a bug
JSON Response T he API returns a list of all applications for the specified user. T he related resource links returned by the API have been left out for brevity. See Chapter 11, Applications for a description of each response parameter associated with an application.
76
{ "api_version": 1.6, "data": [ { "aliases": [], "app_url": "http://myapp-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-20T07:21:50Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": {}, "mysql-5.1": { "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/", "username": "adminxcYKabL", "password": "IgsS3_wQYF38", "database_name": "myapp", "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/" } }, "framework": "php-5.3", "gear_count": 2, "gear_profile": "medium", "git_url": "ssh://[email protected]/~/git/myapp.git/", "health_check_path": "health_check.php", "id": "5213190e2587c8817a000121", "initial_git_url": null, "links": { }, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "520bd6bbdbd93c3dee00000d", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapp", "scalable": true, "ssh_url": "ssh://[email protected]" } ], "messages": [ { "exit_code": 0, "field": null, "severity": "info",
77
Report a bug
JSON Response T he API returns a list of all applications under the specified domain. T he related resource links returned by the API have been left out for brevity. See Chapter 11, Applications for a description of each response parameter associated with an application.
78
{ "api_version": 1.6, "data": [ { "aliases": [], "app_url": "http://myapp-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-20T07:21:50Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": {}, "mysql-5.1": { "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/", "username": "adminxcYKabL", "password": "IgsS3_wQYF38", "database_name": "myapp", "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/" } }, "framework": "php-5.3", "gear_count": 2, "gear_profile": "medium", "git_url": "ssh://[email protected]/~/git/myapp.git/", "health_check_path": "health_check.php", "id": "5213190e2587c8817a000121", "initial_git_url": null, "links": { }, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "520bd6bbdbd93c3dee00000d", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapp", "scalable": true, "ssh_url": "ssh://[email protected]" } ], "messages": [ { "exit_code": 0, "field": null, "severity": "info",
79
Report a bug
JSON Response T he API returns a list of all applications and embedded cartridges. T he related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for a description of each response parameter associated with an application.
80
{ "api_version": 1.6, "data": [ { "aliases": [], "app_url": "http://myapp-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "cartridges": [ { "additional_gear_storage": 0, "base_gear_storage": 1, "collocated_with": [ "haproxy-1.4" ], "current_scale": 1, "description": "PHP is a general-purpose server-side scripting language originally designed for Web development to produce dynamic Web pages. Popular development frameworks include: CakePHP, Zend, Symfony, and Code Igniter.", "display_name": "PHP 5.3", "gear_profile": "medium", "help_topics": {}, "license": "The PHP License, version 3.0", "license_url": "http://www.php.net/license/3_0.txt", "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "520bd6bbdbd93c3dee00000d", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapp", "scalable": true, "ssh_url": "ssh://[email protected]" } ], "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Found 1 applications." } ], "status": "ok", "type": "applications", "version": "1.6" }
81
Report a bug
JSON Response T he API returns information about the specified application and related resource links which have been left out for brevity. See Chapter 11, Applications for more information on all application parameters.
82
{ "api_version": 1.6, "data": [ { "aliases": [], "app_url": "http://myapp-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-20T07:29:39Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": {}, "mysql-5.1": { "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/", "username": "adminF3x1YFi", "password": "vja3unpGDueg", "database_name": "myapp", "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/" } }, "framework": "php-5.3", "gear_count": 2, "gear_profile": "medium", "git_url": "ssh://[email protected]/~/git/myapp.git/", "health_check_path": "health_check.php", "id": "52131ae36cec0e0d5f00012b", "initial_git_url": null, "links": { "GET": { "href": "https://openshift.redhat.com/broker/rest/applications/52131ae36cec0e0d5f00012b", "method": "GET", "optional_params": [], "rel": "Get application", "required_params": [] }, }, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "52054aef03ef64101000000d", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapp", "scalable": true, "ssh_url": "ssh://52131ae36cec0e0d5f00012b@myapp-
83
mydomain.rhcloud.com" } ], "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Found 1 applications." } ], "status": "ok", "type": "applications", "version": "1.6" }
Report a bug
JSON Response T he API returns information about the specified application and its embedded cartridges. T he related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
84
{ "api_version": 1.6, "data": { "aliases": [], "app_url": "http://myapp-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "cartridges": [ { "additional_gear_storage": 0, "base_gear_storage": 1, "collocated_with": [ "haproxy-1.4" ], "current_scale": 1, "description": "PHP is a general-purpose server-side scripting language originally designed for Web development to produce dynamic Web pages. Popular development frameworks include: CakePHP, Zend, Symfony, and Code Igniter.", "display_name": "PHP 5.3", "gear_profile": "medium", "help_topics": {}, "license": "The PHP License, version 3.0", "license_url": "http://www.php.net/license/3_0.txt", "links": { "GET": { "href": "https://openshift.redhat.com/broker/rest/applications/5213190e2587c8817a000121/car tridges/php-5.3", "method": "GET", "optional_params": [], "rel": "Get cartridge", "required_params": [] }, "UPDATE": { "href": "https://openshift.redhat.com/broker/rest/applications/5213190e2587c8817a000121/car tridges/php-5.3", "method": "PUT", "optional_params": [ { "default_value": null, "description": "Additional filesystem storage in gigabytes on each gear having cartridge php-5.3", "name": "additional_gear_storage", "type": "integer", "valid_options": [] }, { "default_value": null, "description": "Minimum number of gears having cartridge php-5.3", "name": "scales_from", "type": "integer", "valid_options": [] }, { "default_value": null, "description": "Maximum number of gears having
85
cartridge php-5.3", "name": "scales_to", "type": "integer", "valid_options": [] } ], "rel": "Update cartridge configuration", "required_params": [] }, ........ "name": "php-5.3", "properties": [ { "name": "OPENSHIFT_TMP_DIR", "type": "environment", "description": "Directory to store application temporary files." }, ........ ], "scales_from": 1, "scales_to": -1, "scales_with": "haproxy-1.4", "status_messages": null, "supported_scales_from": 1, "supported_scales_to": -1, "tags": [ "service", "php", "web_framework" ], "type": "standalone", "url": null, "usage_rates": [], "version": "5.3", "website": "http://www.php.net" }, { "additional_gear_storage": 0, "base_gear_storage": 1, "collocated_with": [ "php-5.3" ], "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": "OpenShift Web Balancer", "gear_profile": "medium", "help_topics": {}, "license": "GPLv2+", "license_url": "http://www.gnu.org/licenses/gpl-2.0.html", "links": { "GET": { "href": "https://openshift.redhat.com/broker/rest/applications/5213190e2587c8817a000121/car tridges/haproxy-1.4", "method": "GET", "optional_params": [],
86
"rel": "Get cartridge", "required_params": [] }, ........ "name": "mysql-5.1", "properties": [ { "name": "username", "type": "cart_data", "description": "Root user on mysql database", "value": "adminxcYKabL" }, { "name": "password", "type": "cart_data", "description": "Password for root user on mysql database", "value": "IgsS3_wQYF38" }, { "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", "url": null, "usage_rates": [], "version": "5.1", "website": "http://www.mysql.com" } ], ........ "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" }
87
], "id": "520bd6bbdbd93c3dee00000d", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapp", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application 'myapp' found" } ], "status": "ok", "type": "application", "version": "1.6" }
Report a bug
Description Event
T ype String
Required Yes
88
Report a bug
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
89
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application myapplication has started" }, { "exit_code": 0, "field": null, "severity": "warning", "text": "HAProxy instance is started\n" } ], "status": "ok",
90
Report a bug
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
91
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application myapplication has stopped" }, { "exit_code": 0, "field": null, "severity": "warning", "text": "HAProxy instance is stopped\n" } ], "status": "ok",
92
Report a bug
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity.See Chapter 11, Applications for more information on all application parameters.
93
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application myapplication has forcefully stopped" } ], "status": "ok", "type": "application", "version": "1.6" }
Report a bug
94
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
95
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application myapplication has restarted" }, { "exit_code": 0, "field": null, "severity": "warning", "text": "Restarted HAProxy instance\n" } ], "status": "ok",
96
Report a bug
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
97
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { } }, "framework": "ruby-1.9", "gear_count": 2, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application myapplication has scaled up" } ], "status": "ok", "type": "application", "version": "1.6" }
T he API returns an error message if a user has reached the maximum number of gears allowed for their
98
Report a bug
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
99
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application myapplication has scaled down" } ], "status": "ok", "type": "application", "version": "1.6" }
T he API returns an error message if an application cannot be scaled down any further, as shown in the
100
Report a bug
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
101
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application myapplication called tidy" } ], "status": "ok", "type": "application", "version": "1.6" }
Report a bug
102
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
103
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application myapplication called reload" }, { "exit_code": 0, "field": null, "severity": "warning", "text": "Reloaded HAProxy instance\n" } ], "status": "ok",
104
Report a bug
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
105
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "" }, { "exit_code": 0, "field": null, "severity": "result", "text": "Success\nThe thread dump file will be available via: rhc tail myapplication -f /var/lib/openshift/534253991015616165707776/ruby//logs//error_log-20130821-* -o '-n 250'\n"
106
Report a bug
JSON Response
{ "api_version": 1.6, "data": null, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application 534253991015616165707776 is deleted." } ], "status": "ok", "type": null, "version": "1.6" }
Report a bug
107
has_private_ssl_certificat Indicates whether an SSL certificate has been added to the specified application. e Report a bug
Request Parameters Name id ssl_certific ate private_key pass_phrase Description Alias for application Content of SSL certificate Required private key for SSL certificate Optional passphrase for private key T ype String String String String Required Yes No No No Valid Options Not applicable Not applicable Not applicable Not applicable Default Value Not applicable Not applicable Not applicable Not applicable
Request
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6hdZK6JRgc4wp6Rc0fkqHuxLzABXoIGuSVlWyimqIN\nZySAkpo5EW6DNraRJxN COBmWeGPEhHGrea+JPiPEwCK0F7SxvSmg3jzNzw3Es31T\necET7eDwuSOY9v4XDzLyiXXkEUUReD7Ng2 hEYL+HaQrl5jWj4lxgq/ECgYEAwnCb\nKrz7FwX8AqtFAEi6uUrc12k1xYKQfrwSxbfdK2vBBUpgB71Iq/ fqP+1BittEljDG\n8f4jEtMBFfEPhLzGIHaI3UiHUHXS4GetA77TRgR8lnKKpj1FcMIY2iKU479707O5\n Q08pgWRUDQ8BVg2ePgbo5QjLMc/rv7UF3AHvPAECgYB/auAIwqDGN6gHU/1TP4ke\npWLi1O55tfpXSzv +BnUbB96PQgPUop7aP7xBIlBrBiI7aVZOOBf/qHT3CF421geu\n8tHWa7NxlIrl/vgn9lfGYyDYmXlpb1 amXLEsBVGGF/e1TGZWFDe9J5fZU9HvosVu\n1xTNIvSZ6xHYI2MGZcGYIQKBgEYeebaV5C7PV6xWu1F46O 19U9rS9DM//H/XryVi\nQv4vo7IWuj7QQe7SPsXC98ntfPR0rqoCLf/R3ChfgGsr8H8wf/bc+v9HHj8S5 E/f\ndy1e3Nccg2ej3PDm7jNsGSlwmmUkAQGHAL7KwYzcBm1UB+bycvZ1j2FtS+UckPpg\nMDgBAoGALD 8PkxHb4U4DtbNFSYRrUdvS9heav/yph3lTMfifNkOir36io6v8RPgb\nD2bHKKZgmYlTgJrxD45Er9agC 5jclJO35QRU/OfGf3GcnABkBI7vlvUKADAo65Sq\nweZkdJnbrIadcvLOHOzkKC9m+rxFTC9VoN1dwK2z wYvUXfa1VJA=\n-----END RSA PRIVATE KEY-----", "pass_phrase": "abcd" }
When adding an alias an SSL certificate can also be uploaded to allow secure HT T PS communication with an application. T o upload an SSL certificate include the required private key with or without the optional private key passphrase. T his can be done by cutting and pasting the contents of the SSL certificate and the key.
109
$ curl -k -X POST https://openshift.redhat.com/broker/rest/applications/534253991015616165707776 /aliases --user [email protected] --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 8lVYG5C4Vh8476oF9t8Wex5eH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WyimqIN 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
JSON Response T he API returns the aliases resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 12, Application Aliases and SSL Certificates for all parameters associated with application aliases.
110
{ "api_version": 1.6, "data": { "certificate_added_at": "2013-08-20T00:00:00Z", "has_private_ssl_certificate": true, "id": "myalias" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Added myalias to application myapplication" } ], "status": "created", "type": "alias", "version": "1.6" }
Report a bug
Note
A GET request to an application also returns a list of associated aliases for that particular application . See Section 11.6, Get Application Information for more information. Method and URL Structure Method GET URL Structure /broker/rest/application/:id/aliases
JSON Response T he API returns a list of all aliases and SSL certificates for the specified application. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 12, Application Aliases and SSL Certificates for a description of each response parameter
111
Report a bug
Note
A GET request to an application also returns a list of associated aliases for that particular application . See Section 11.6, Get Application Information for more information. Method and URL Structure Method GET URL Structure /broker/rest/application/:id/aliases/:id
JSON Response T he API returns information about the specified alias. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 12, Application Aliases and SSL
112
Certificates for a description of each response parameter associated with application aliases.
{ "api_version": 1.6, "data": { "certificate_added_at": "2013-08-20T00:00:00Z", "has_private_ssl_certificate": true, "id": "myalias" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Showing alias myalias for application myapplication under domain mydomain" } ], "status": "ok", "type": "alias", "version": "1.6" }
Report a bug
Request Parameters Name ssl_certific ate private_key pass_phrase Description Content of SSL certificate Required private key for SSL certificate Optional passphrase for private key T ype String String String Required Yes Yes No Valid Options Not applicable Not applicable Not applicable Default Value Not applicable Not applicable Not applicable
Request
113
{ "ssl_certificate": "-----BEGIN CERTIFICATE----\nMIIDoDCCAogCCQDzF8AJCHnrbjANBgkqhkiG9w0BAQUFADCBkTELMAkGA1UEBhMC\nVVMxCzAJBgNVB AgMAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJl\nZGhhdDESMBAGA1UECwwJb3BlbnNo aWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAm\nBgkqhkiG9w0BCQEWGWluZm9Ab3BlbnNoaWZ0LnJlZGh hdC5jb20wHhcNMTMwMjE5\nMjExMTQ4WhcNMTQwMjE5MjExMTQ4WjCBkTELMAkGA1UEBhMCVVMxCzAJBgN VBAgM\nAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNV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f/qHT3CF421geu\n8tHWa7NxlIrl/vgn9lfGYyDYmXlpb1 amXLEsBVGGF/e1TGZWFDe9J5fZU9HvosVu\n1xTNIvSZ6xHYI2MGZcGYIQKBgEYeebaV5C7PV6xWu1F46O 19U9rS9DM//H/XryVi\nQv4vo7IWuj7QQe7SPsXC98ntfPR0rqoCLf/R3ChfgGsr8H8wf/bc+v9HHj8S5 E/f\ndy1e3Nccg2ej3PDm7jNsGSlwmmUkAQGHAL7KwYzcBm1UB+bycvZ1j2FtS+UckPpg\nMDgBAoGALD 8PkxHb4U4DtbNFSYRrUdvS9heav/yph3lTMfifNkOir36io6v8RPgb\nD2bHKKZgmYlTgJrxD45Er9agC 5jclJO35QRU/OfGf3GcnABkBI7vlvUKADAo65Sq\nweZkdJnbrIadcvLOHOzkKC9m+rxFTC9VoN1dwK2z wYvUXfa1VJA=\n-----END RSA PRIVATE KEY-----", "pass_phrase": "abcd" }
cURL Command Example When updating an application alias to upload a new SSL certificate, include the contents of the SSL certificate and the associated private key with or without the optional private key passphrase.
114
$ curl -k -X PUT https://openshift.redhat.com/broker/rest/application/534253991015616165707776/ aliases/myalias --user [email protected] --data-urlencode ssl_certificate=----BEGIN CERTIFICATE----MIIDoDCCAogCCQDzF8AJCHnrbjANBgkqhkiG9w0BAQUFADCBkTELMAkGA1UEBhMC VVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJl ZGhhdDESMBAGA1UECwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAm BgkqhkiG9w0BCQEWGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wHhcNMTMwMjE5 MjExMTQ4WhcNMTQwMjE5MjExMTQ4WjCBkTELMAkGA1UEBhMCVVMxCzAJBgNVBAgM AkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJlZGhhdDESMBAGA1UE CwwJb3Blbn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YI2MGZcGYIQKBgEYeebaV5C7PV6xWu1F46O19U9rS9DM//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
JSON Response T he API returns the aliases resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 12, Application Aliases and SSL Certificates for all parameters associated with application aliases.
115
{ "api_version": 1.6, "data": { "certificate_added_at": "2013-08-20T00:00:00Z", "has_private_ssl_certificate": true, "id": "myalias" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Updated myalias to application myapplication" } ], "status": "ok", "type": "alias", "version": "1.6" }
Report a bug
JSON Response
116
{ "api_version": 1.6, "data": null, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Removed myalias from application myapplication" } ], "status": "ok", "type": null, "version": "1.6" }
Report a bug
117
scales_to
Note
T he scales_from and scales_to parameters can be set separately, or in the same REST API call. If the scales_from value is greater than the scales_to value, the broker logic automatically interchanges the two values.
118
Embedded Cartridges Embedded cartridges provide extended functionality to OpenShift applications. Examples include MySQL, PostgreSQL, and Jenkins Client. T he table below describes each parameter associated with only embedded cartridges. Name additional_gear_stora ge base_gear_storage collocated_with gear_profile properties Description Set additional filesystem storage in gigabytes for the gear profile that the cartridge is running on. Default basic storage in gigabytes associated with the gear profile that the cartridge is running on. Array of names of other cartridges that share the same gear(s) with the cartridge. Size of the gears grouped in this profile that the cartridge is running on; all gears in a group will have the same gear_profile . List of environment variables and property values exposed by the cartridge and usable in application code.
Report a bug
JSON Response T he API returns the cartridge resource with a list of all available OpenShift cartridges. Information on other available cartridges has been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
119
{ "api_version": 1.6, "data": [ { "current_scale": 0, "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/gettingstarted-with-cron-jobs-on-openshift" }, "license": "ASL 2.0", "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt", "name": "cron-1.4", "scales_from": 1, "scales_to": 1, "scales_with": "haproxy-1.4", "supported_scales_from": 1, "supported_scales_to": 1, "tags": [ "embedded" ], "type": "embedded", "usage_rates": [], "version": "1.4", "website": "http://www.openshift.com/" }, { "current_scale": 0, "description": "Web based MySQL admin tool. Requires the MySQL cartridge to be installed first.", "display_name": "phpMyAdmin 3.4", "help_topics": {}, "license": "GPLv2", "license_url": "", "name": "phpmyadmin-3", "scales_from": 1, "scales_to": 1, "scales_with": "haproxy-1.4", "supported_scales_from": 1, "supported_scales_to": 1, "tags": [ "embedded" ], "type": "embedded", "usage_rates": [], "version": "3", "website": "http://www.phpmyadmin.net/" }, { "current_scale": 0, "description": "Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js is perfect for data-intensive real-time applications that run across distributed devices.", "display_name": "Node.js 0.10", "help_topics": { "Developer Center": "https://www.openshift.com/developers" },
120
"license": "MIT License", "license_url": "https://raw.github.com/joyent/node/v0.6/LICENSE", "name": "nodejs-0.6", "scales_from": 1, "scales_to": -1, "scales_with": "haproxy-1.4", "supported_scales_from": 1, "supported_scales_to": -1, "tags": [ "service", "javascript", "nodejs", "web_framework" ], "type": "standalone", "usage_rates": [], "version": "0.6", "website": "http://www.nodejs.org/" }, ], "status": "ok", "type": "cartridges", "version": "1.6" }
Report a bug
Request Parameters Name nam e Description Name of cartridge; note that valid options may be different from those shown here T ype String Required Yes Valid Options m ongodb-2.2 ; cron-1.4 ; m ysql-5.1 ; postgresql-9.2 ; haproxy-1.4 ; 10gen-m m sagent-0.1 ; Default Value Not applicable
121
phpm yadm in-4 ; m etrics-0.1 ; rockm ongo-1.1 ; jenkinsclient-1 colocate_ with scales_fr om scales_to Component to colocate with Minimum number of gears to run component Maximum number of gears to run component Additional GB of storage request on gears running this component Cartridge gear size URL to a downloadable cartridge Add or update application environment variables String String No No ruby-1.9 ; haproxy-1.4 Not applicable Not applicable Not applicable
String
No
Not applicable
Not applicable
additiona l_storage
String
No
Not applicable
Not applicable
gear_size url
String String
No No
String
No
Not applicable
Not applicable
JSON Response T he API returns the embedded cartridge resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
122
{ "api_version": 1.6, "data": { "additional_gear_storage": 0, "base_gear_storage": 1, "collocated_with": [ "ruby-1.9", "haproxy-1.4" ], "current_scale": 1, "description": "MySQL is a multi-user, multi-threaded SQL database server.", "display_name": "MySQL Database 5.1", "gear_profile": "small", "help_topics": { }, "license": "GPL", "license_url": "", "name": "mysql-5.1", "properties": [ { "name": "username", "type": "cart_data", "description": "Root user on mysql database", "value": "adminthGnHLU" }, { "name": "password", "type": "cart_data", "description": "Password for root user on mysql database", "value": "dPFjWLrUjfxC" }, { "name": "database_name", "type": "cart_data", "description": "MySQL DB name", "value": "myapplication" }, { "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", "url": null, "usage_rates": [ ],
123
"version": "5.1", "website": "http://www.mysql.com" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Added mysql-5.1 to application myapplication" }, { "exit_code": 0, "field": null, "severity": "debug", "text": "\n\nmysql-5.1: Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT\n" },
Report a bug
Note
List of all embedded cartridges can also be retrieved with the LIST _APPLICAT IONS resource. See Section 11.5, List Applications and Cartridges for more information. Method and URL Structure Method GET Resource URL /broker/rest/application/:id/cartridges
JSON Response T he API returns a list of all embedded cartridges that have been added to the specified application. Related resource links and other cartridges returned by the API have been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
124
{ "api_version": 1.6, "data": [ { "additional_gear_storage": 10, "base_gear_storage": 1, "collocated_with": [ "haproxy-1.4" ], "current_scale": 1, "description": "Ruby is a dynamic, reflective, general-purpose objectoriented programming language. Popular development frameworks include Ruby on Rails and Sinatra.", "display_name": "Ruby 1.9", "gear_profile": "small", "help_topics": { }, "license": "Ruby BSDL", "license_url": "http://www.ruby-lang.org/en/about/license.txt", "links": { "GET": { "href": "https://openshift.redhat.com/broker/rest/application/527ade9d7f9c48d37100000a/car tridge/ruby-1.9", "method": "GET", "optional_params": [ ], "rel": "Get cartridge", "required_params": [ ] }, "UPDATE": { "href": "https://openshift.redhat.com/broker/rest/application/527ade9d7f9c48d37100000a/car tridge/ruby-1.9", "method": "PUT", "optional_params": [ { "default_value": null, "description": "Additional filesystem storage in gigabytes on each gear having cartridge ruby-1.9", "name": "additional_gear_storage", "type": "integer", "valid_options": [ ] }, { "default_value": null, "description": "Minimum number of gears having cartridge ruby-1.9", "name": "scales_from", "type": "integer", "valid_options": [ ] }, { "default_value": null,
125
"description": "Maximum number of gears having cartridge ruby-1.9", "name": "scales_to", "type": "integer", "valid_options": [ ] } ], "rel": "Update cartridge configuration", "required_params": [ ........
Report a bug
JSON Response T he API returns the embedded cartridge resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
126
{ "api_version": 1.6, "data": { "additional_gear_storage": 0, "base_gear_storage": 1, "collocated_with": [ "ruby-1.9", "haproxy-1.4" ], "current_scale": 1, "description": "MySQL is a multi-user, multi-threaded SQL database server.", "display_name": "MySQL Database 5.1", "gear_profile": "small", "help_topics": { }, "license": "GPL", "license_url": "", "name": "mysql-5.1", "properties": [ { "name": "username", "type": "cart_data", "description": "Root user on mysql database", "value": "adminthGnHLU" }, { "name": "password", "type": "cart_data", "description": "Password for root user on mysql database", "value": "dPFjWLrUjfxC" }, { "name": "database_name", "type": "cart_data", "description": "MySQL DB name", "value": "myapplication" }, { "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", "url": null, "usage_rates": [ ],
127
"version": "5.1", "website": "http://www.mysql.com" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Showing cartridge mysql-5.1 for application myapplication under domain mydomain" } ], "status": "ok", "type": "cartridge", "version": "1.6" }
Report a bug
Note
An upgraded plan is required to configure additional gear storage. Visit www.openshift.com and log into your account to view plan upgrade options. Method and URL Structure Method PUT Resource URL /broker/rest/application/:id/cartridges/:name
Request Parameters Name additional_gear_stor age scales_from scales_to Description Additional filesystem storage (GB) Min number of gears Max number of gears T ype Integer Require d No Valid Options Not applicable Default Value Not applicable Not applicable Not applicable
Integer Integer
No No
Request
128
{ "additional_gear_storage": 10 }
JSON Response T he API returns the embedded cartridge resource with related resource links, and the updated values for the parameters that were changed. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
129
{ "api_version": 1.6, "data": { "additional_gear_storage": 10, "base_gear_storage": 1, "collocated_with": [ "ruby-1.9", "haproxy-1.4" ], "current_scale": 1, "description": "MySQL is a multi-user, multi-threaded SQL database server.", "display_name": "MySQL Database 5.1", "gear_profile": "small", "help_topics": { }, "license": "GPL", "license_url": "", "name": "mysql-5.1", "properties": [ { "name": "username", "type": "cart_data", "description": "Root user on mysql database", "value": "adminthGnHLU" }, { "name": "password", "type": "cart_data", "description": "Password for root user on mysql database", "value": "dPFjWLrUjfxC" }, { "name": "database_name", "type": "cart_data", "description": "MySQL DB name", "value": "myapplication" }, { "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", "url": null, "usage_rates": [ ],
130
"version": "5.1", "website": "http://www.mysql.com" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Showing cartridge mysql-5.1 for application myapplication under domain mydomain" } ], "status": "ok", "type": "cartridge", "version": "1.6" }
T he API returns an error message if the user account does not allow additional gear storage.
{ "api_version": 1.6, "data": null, "messages": [ { "exit_code": 164, "field": null, "severity": "error", "text": "You are not allowed to request additional gear storage" } ], "status": "unprocessable_entity", "type": null, "version": "1.6" }
Report a bug
131
JSON Response T he API returns the status_m essages string as an array for the specified cartridge in an application. Unnecessary information and related resource links returned by the API have been removed for brevity.
Report a bug
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
132
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { }, "mysql-5.1": { "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/", "username": "adminthGnHLU", "password": "dPFjWLrUjfxC", "database_name": "myapplication", "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/" } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Added start on mysql-5.1 for application myapplication"
133
Report a bug
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
134
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { }, "mysql-5.1": { "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/", "username": "adminthGnHLU", "password": "dPFjWLrUjfxC", "database_name": "myapplication", "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/" } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Added stop on mysql-5.1 for application myapplication"
135
Report a bug
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
136
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { }, "mysql-5.1": { "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/", "username": "adminthGnHLU", "password": "dPFjWLrUjfxC", "database_name": "myapplication", "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/" } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Added restart on mysql-5.1 for application myapplication"
137
Report a bug
Description Event
T ype String
Required Yes
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
138
{ "api_version": 1.6, "data": { "aliases": [ ], "app_url": "http://myapplication-mydomain.rhcloud.com/", "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-08-21T01:58:41Z", "domain_id": "mydomain", "embedded": { "haproxy-1.4": { }, "mysql-5.1": { "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/", "username": "adminthGnHLU", "password": "dPFjWLrUjfxC", "database_name": "myapplication", "info": "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/" } }, "framework": "ruby-1.9", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health", "id": "534253991015616165707776", "initial_git_url": null, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "5213a826e499b22f15000001", "name": "[email protected]", "owner": true, "role": "admin", "type": "user" } ], "name": "myapplication", "scalable": true, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Added reload on mysql-5.1 for application myapplication"
139
Report a bug
JSON Response
{ "api_version": 1.6, "data": null, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Removed mysql-5.1 from application myapplication" } ], "status": "ok", "type": null, "version": "1.6" }
Report a bug
14 0
JSON Response T he API returns a list of deployments for the specified application. See Chapter 14, Deployment for more information on all application deployment parameters.
14 1
{ "api_version": 1.6, "data": [ { "activations": [ "2013-10-09T20:07:35Z" ], "created_at": "2013-10-09T20:07:23Z", "force_clean_build": false, "hot_deploy": false, "id": "4e2d9a82", "ref": "master", "sha1": "86a5e8d" } ], "messages": [ { "exit_code": 0, "field": null, "index": null, "severity": "info", "text": "Listing deployments for application myapplication under domain mydomain" } ], "status": "ok", "type": "deployments", "version": "1.6" }
Report a bug
artifact_u URL from where the deployment artifact rl is to be downloaded hot_deplo Indicates whether
String
No
Not applicable
Not applicable
String
No
true ; false
false
14 2
y force_cle an_build
this is a hot deployment Indicates whether a clean build is to be performed String No true ; false false
Request
{ "ref": "master", "hot_deploy": false, "force_clean_build": false }
JSON Response T he API returns the deployment resource. See Chapter 14, Deployment for more information on all deployment parameters.
{ "api_version": 1.6, "data": { "activations": [ "2013-10-09T20:07:16Z" ], "created_at": "2013-10-09T20:07:03Z", "force_clean_build": false, "hot_deploy": false, "id": "4e2d9a82", "ref": "master", "sha1": "86a5e8d" }, "messages": [ { "exit_code": 0, "field": null, "index": null, "severity": "info", "text": "Added 4e2d9a82 to application myapplication" } ], "status": "created", "type": "deployment", "version": "1.6" }
Report a bug
14 3
Request
{ "event": "activate", "deployment_id": "f36f59c0" }
JSON Response T he API returns the application resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 11, Applications for more information on all application parameters.
14 4
{ "api_version": 1.6, "data": { "aliases": [], "app_url": "http://myapplication-mydomain.rhcloud.com/", "auto_deploy": true, "build_job_url": null, "building_app": null, "building_with": null, "creation_time": "2013-11-14T01:18:46Z", "deployment_branch": "master", "deployment_type": "git", "domain_id": "mydomain", "embedded": {}, "framework": "php-5.3", "gear_count": 1, "gear_profile": "small", "git_url": "ssh://[email protected]/~/git/myapplication.git/", "health_check_path": "health_check.php", "id": "528424f6dbd93c204d000001", "initial_git_url": null, "keep_deployments": 10, "links": { "GET": { "href": "https://openshift.redhat.com/broker/rest/application/528424f6dbd93c204d000001", "method": "GET", "optional_params": [], "rel": "Get application", "required_params": [] }, }, "members": [ { "explicit_role": null, "from": [ { "type": "domain", "role": "admin" } ], "id": "520bd6bbdbd93c3dee00000d", "login": "[email protected]", "owner": true, "role": "admin", "type": "user" }, ], "name": "myapplication", "scalable": false, "ssh_url": "ssh://[email protected]" }, "messages": [ { "exit_code": 0, "field": null,
14 5
"index": null, "severity": "info", "text": "Deployment ID 56e71f70 on application myapplication has been activated" } ], "status": "ok", "type": "application", "version": "1.6" }
Report a bug
14 6
value
String
No
Not applicable
Not applicable
Request
{ "name": "MY_ENV_VAR", "value": "myvalue" }
JSON Response
14 7
T he API returns the environment variables resource with related resource links which have been left out for brevity. See Chapter 15, Environment Variables for more information on all parameters for environment variables.
{ "api_version": 1.6, "data": { "name": "MY_ENV_VAR", "value": "myvalue" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Added environment variable 'MY_ENV_VAR' to application myapp" } ], "status": "created", "type": "environment-variable", "version": "1.6" }
Environment variables can also be added during application creation or when adding a cartridge to an application. See Section 11.2, Create an Application for more information on adding environment variables when creating an application. See Section 13.2.1, Add Embedded Cartridge for more information on adding environment variables when adding a cartridge to an application. Report a bug
14 8
JSON Response T he API returns the environment variables resource with a list of all available environment variables for the specified application. Unnecessary information and other resource links have been removed for brevity. See Chapter 15, Environment Variables for more information on all parameters for environment variables.
{ "api_version": 1.6, "data": { "name": "MY_ENV_VAR", "value": "myvalue" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Showing environment variable 'MY_ENV_VAR' for application myapp" } ], "status": "ok", "type": "environment-variable", "version": "1.6" }
Report a bug
JSON Response T he API returns information about the specified environment variable. Unnecessary information and other resource links have been removed for brevity. See Chapter 15, Environment Variables for more information on all parameters for environment variables.
14 9
{ "api_version": 1.6, "data": { "name": "MY_ENV_VAR", "value": "myvalue" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Showing environment variable 'MY_ENV_VAR' for application myapp" } ], "status": "ok", "type": "environment-variable", "version": "1.6" }
Report a bug
Request
{ "value": "mynewvalue" }
JSON Response
150
T he API returns the environment variables resource with related resource links which have been left out for brevity. See Chapter 15, Environment Variables for more information on all parameters for environment variables.
{ "api_version": 1.6, "data": { "name": "MY_ENV_VAR", "value": "mynewvalue" }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Updated environment variable 'MY_ENV_VAR' in application myapp" } ], "status": "ok", "type": "environment-variable", "version": "1.6" }
Report a bug
JSON Response
151
{ "api_version": 1.6, "data": null, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Removed environment variable 'MY_ENV_VAR' from application myapp" } ], "status": "ok", "type": null, "version": "1.6" }
Report a bug
152
Note
Section 13.2.2, List Embedded Cartridges provides information on how to view scaling and storage policies for scaled cartridges. Method and URL Structure Method GET URL Structure /broker/rest/application/:id/gear_groups
Note
If the scales_from value is set higher than the m ax_gear limit for your subscription plan, the API returns an error message. T his is because OpenShift will attempt to scale up to the scales_from value. If an application demands more resources, and a higher minimum scaling limit is required that exceeds your current subscription plan, the plan must be upgraded. Log onto your account at www.openshift.com, and go to the Your Plan page to view upgrade options. JSON Response T he API returns a list of all gear groups for the specified application. See Chapter 13, Cartridges for more information on all cartridge parameters.
153
{ "api_version": 1.6, "data": [ { "additional_gear_storage": 0, "base_gear_storage": 1, "cartridges": [ { "name": "php-5.3", "display_name": "PHP 5.3", "tags": [ "service", "php", "web_framework" ] }, { "name": "haproxy-1.4", "display_name": "OpenShift Web Balancer", "tags": [ "web_proxy", "scales", "embedded" ] } ], "gear_profile": "medium", "gears": [ { "id": "5213190e2587c8817a000121", "state": "idle", "ssh_url": "ssh://[email protected]", "port_interfaces": [ { "_id": "52168d8bdbd93c568d00006b", "cartridge_name": "php-5.3", "external_address": "75.101.235.82", "external_port": "57666", "internal_address": "127.9.159.129", "internal_port": "8080" } ] } ], "id": "5213190e2587c8817a00012c", "name": "5213190e2587c8817a00012c", "scales_from": 1, "scales_to": -1 }, { "additional_gear_storage": 0, "base_gear_storage": 1, "cartridges": [ { "connection_url": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/", "username": "adminxcYKabL", "password": "IgsS3_wQYF38", "database_name": "myapp",
154
"name": "mysql-5.1", "display_name": "MySQL Database 5.1", "tags": [ "service", "database", "embedded" ] } ], "gear_profile": "medium", "gears": [ { "id": "52131a1d2587c86695000520", "state": "started", "ssh_url": "ssh://52131a1d2587c86695000520@52131a1d2587c86695000520-mydomain.rhcloud.com", "port_interfaces": [ { "_id": "52168d8bdbd93c568d00006c", "cartridge_name": "mysql-5.1", "external_address": "75.101.235.82", "external_port": "50226", "internal_address": "127.6.183.129", "internal_port": "3306" } ] } ], "id": "52131a1d2587c86695000527", "name": "52131a1d2587c86695000527", "scales_from": 1, "scales_to": 1 } ], "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Showing gear groups for application 'myapp' with domain 'mydomain'" } ], "status": "ok", "type": "gear_groups", "version": "1.6" }
Report a bug
155
156
Revision History
Revision History
Revision 1.0.36-0.4 05 Rebuild with Publican 4.0.0 T hu Nov 28 2013 Rdiger Landmann
Revision 1.0.36-0 T ue Nov 26 2013 Add information about deploying applications with artifact_url.
Bilhar Aulakh
Revision 1.0.35-0 T hu Nov 7 2013 Bilhar Aulakh Add Member API resource. Add Deployment API resource. Add information on specifying gear_size when creating an application or adding a cartridge. Revision 1.0.33-1 Fri Sep 20 2013 Add API resources to manage environment variables. Add API resource to tidy application framework. Add API resource to trigger thread dump. Updated all screen samples and references for API v1.6. Revision 1.0.31-0 T ue Aug 06 2013 Add Authorizations resource. Add Quickstarts resource. BZ 987665: Fix URL in cURL examples in Add SSH Key section. Revision 1.0.29-3 T hu Jun 13 2013 Publish book for OpenShift Online. Bilhar Aulakh
Bilhar Aulakh
Bilhar Aulakh
157