Update an Application

put

/paas/service/apaas/api/v1.1/apps/{identityDomainId}/{appName}

Updates an Oracle Application Container Cloud Service Application. In addition to the path parameters, you must provide additional parameters and a manifest file. You can specify additional optional parameters, such as memory, number of instances, and service bindings, in a deployment file. See the Examples tab for details.

Request

Supported Media Types
Path Parameters
Query Parameters
  • Restart mode for application instances. The only allowed option is rolling for a rolling restart. Omit this parameter for a concurrent restart.
Form Parameters
Back to Top

Response

Supported Media Types

202 Response

Accepted
Body ()
The response body contains information about the application.
Root Schema : viewApp-activity-response
Type: object
The response body contains information about the application.
Show Source
Nested Schema : instances
Type: array
Shows all instances currently running.
Show Source
Nested Schema : latestDeployment
Type: array
Shows all deployments currently in progress.
Show Source
Nested Schema : runningDeployment
Type: array
Shows all deployments currently running.
Show Source
Nested Schema : viewInstance
Type: object
Show Source
Nested Schema : viewDeploy
Type: object
Show Source

400 Response

Bad Request. Returned if there is bad input.

404 Response

Not Found. Returned if the application does not exist.

429 Response

Too Many Requests. Returned if the quota of instances has been exceeded.

500 Response

Server Error. Returned if a server error has occurred.
Back to Top

Examples

The following example shows how to update an Oracle Application Cloud Service application by submitting a PUT request on the REST resource using cURL. For more information about cURL, see Use cURL. For more information about endpoint URL structure, including how to determine your region, see Send Requests.

curl -X PUT -u joe@example.com:Welcome1! \
-H "X-ID-TENANT-NAME:ExampleIdentityDomain" \
-H "Content-Type: multipart/form-data" \
-F "manifest=@manifest.json" -F "deployment=@deployment.json" \
-F "archiveURL=MyFirstApp/myapp.zip" -F "notes=notes for deployment" \
https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/MyFirstApp

You can include the manifest file in your application archive (.zip or .tgz file) or specify it separately as in this example. If you do both, the manifest file specified in the cURL command takes precedence. The deployment file is optional unless:

  • You want to change the amount of memory or the number of application instances.

  • You need to specify service bindings to an Oracle Database Cloud Service database, an Oracle MySQL Cloud Service database, or an Oracle Java Cloud Service instance.

For more information about what values to use in the -F parameters, see Creating an Application. For more information about what values to use in the manifest and deployment files, see Creating Meta Data Files.

Example of Manifest File

The following example shows the contents of the manifest file in JSON format.

{
  "runtime": {
    "majorVersion": "8"
  },
  "command": "command to execute",
  "release": {
    "build": "150520.1154",
    "commit": "d8c2596364d9584050461",
    "version": "15.1.0"
  },
  "notes": "notes related to release",
  "mode": "rolling"
}

Example of Deployment File

The following example shows the contents of the deployment file in JSON format.

{
  "memory": "2G",
  "instances": "1", 
  "environment": {
    "NO_OF_CONNECTIONS":"25",
    "TWITTER_ID":"JAVA"
  },
  "services": [{
    "identifier": "ProdService",
    "name": "Jaas Service",
    "type": "JAAS"
    "username": "username",
    "password": "password" 
  }]
}

Example of Response Header

The following shows an example of the response header.

Date Fri, 25 Sep 2015 09:46:39 GMT 
 Location  http://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/MyFirstApp/opStatus/2001 
 Retry-After 5 
 Service-URI  http://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/MyFirstApp 
 Transfer-Encoding chunked 
 X-Frame-Options DENY 
 X-Powered-By Servlet/2.5 JSP/2.1

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
  "identityDomain": "ExampleIdentityDomain",
  "appId": "996b4bcd-89c3-4231-9c0d-2cd7322268e9",
  "name": "MyFirstApp",
  "status": "RUNNING",
  "createdBy": "weblogic",
  "creationTime": "2015-09-25T02:46:54.165-0700",
  "lastModifiedTime": "2015-09-25T02:46:53.943-0700",
  "subscriptionType": "MONTHLY",
  "instances": [],
  "runningDeployment": {
    "deploymentId": "e27d094b-4c73-42a9-a94d-9a76ec1eec26",
    "deploymentStatus": "READY",
    "deploymentURL": "http://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/MyFirstApp/deployments/e27d094b-4c73-42a9-a94d-9a76ec1eec26"
  },
  "lastestDeployment": {
    "deploymentId": "ee9714dc-a2d0-4d6e-8b3c-8f0d185577b2",
    "deploymentStatus": "READY",
    "deploymentURL": "http://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/MyFirstApp/deployments/ee9714dc-a2d0-4d6e-8b3c-8f0d185577b2"
  },
  "currentOngoingActivity": "Deploying Release",
  "appURL": "http://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/MyFirstApp",
  "webUrl": "http://MyFirstApp-apaasmaster-dev.apaas.demo.oraclecloudapps.com:8080",
  "message": []
}
Back to Top