Show Table of Contents
11.9. Update an Application
Description
Update an application.
Method and URL Structure
| Method | Resource URL |
|---|---|
PUT | /broker/rest/application/:id |
Request Parameters
| Name | Description | Required | Default Value |
|---|---|---|---|
auto_deploy | Indicates whether an application should build and deploy automatically whenever git push is executed | No | |
deployment_type | Indicates whether an application is configured for binary or Git based deployments | No | |
deployment_branch | If automatic deployment is enabled, this indicates from which branch automatic deployment occurs | No | |
keep_deployments | Indicates how many total deployments are preserved; must be greater than zero | No |
See Section A.6, “Applications” for more information about the valid options applicable to these request parameters.
Request
{
"auto_deploy": true,
"deployment_type": "git"
}
cURL Command Example
$ curl -X PUT https://openshift.redhat.com/broker/rest/application/527ade9d7f9c48d37100000a --user user@myemail.com:password --data-urlencode auto_deploy=true --data-urlencode deployment_type=git
JSON Response
The API returns the deployment resource. See Chapter 11, Applications for more information on all deployment parameters.
{
"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-07T00:28:13Z",
"deployment_branch": "master",
"deployment_type": "git",
"domain_id": "mydomain",
"embedded": {
"haproxy-1.4": {
}
},
"framework": "ruby-2.0",
"gear_count": 1,
"gear_profile": "small",
"git_url": "ssh://527ade9d7f9c48d37100000a@myapplication-mydomain.rhcloud.com/~/git/myapplication.git/",
"health_check_path": "health",
"id": "527ade9d7f9c48d37100000a",
"initial_git_url": null,
"keep_deployments": 1,
"members": [
{
"explicit_role": null,
"from": [
{
"type": "domain",
"role": "admin"
}
],
"id": "527ade897f9c48d371000001",
"login": "user@myemail.com",
"owner": true,
"role": "admin",
"type": "user"
}
],
"name": "myapplication",
"scalable": true,
"ssh_url": "ssh://527ade9d7f9c48d37100000a@myapplication-mydomain.rhcloud.com"
},
"messages": [
{
"exit_code": 0,
"field": null,
"index": null,
"severity": "info",
"text": "Application myapplication was updated."
}
],
"status": "ok",
"supported_api_versions": [
1.0,
1.1,
1.2,
1.3,
1.4,
1.5,
1.6
],
"type": "application",
"version": "1.6"
}

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.