Scale Application Instances

put

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

Scales an application by changing the number of instances or the memory for each instance. Returns details about the instances.

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.
Body ()
The request body defines the details of the request.
Root Schema : schema
Type: string
Back to Top

Response

Supported Media Types

202 Response

Accepted
Body ()
The response body contains information about all application instances.
Root Schema : viewInstances-response
Type: object
The response body contains information about all application instances.
Show Source
Nested Schema : processes
Type: array
Process details of an application
Show Source
Nested Schema : viewProcesses
Type: object
The response body contains information about all application processes.
Show Source
Nested Schema : instances
Type: object
Instances of the application process
Show Source
Nested Schema : viewInstance
Type: object
Show Source
Back to Top

Examples

The following example shows how to scale application instances and memory 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 -i -X PUT -u joe@example.com:Welcome1! -H "X-ID-TENANT-NAME:ExampleIdentityDomain" \
-H "Content-Type:application/json" -d @scale.json \
https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/ExampleAppName/instances

Example of Request Body

The following example shows the contents of the request body in JSON format. This is the contents of the scale.json file listed in the cURL command.

{ 
   "memory": "2G",
   "instances": 2
}

Example of Response Header

The following shows an example of the response header.

Date:Thu,16Apr201508:43:38GMT
Location:https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/ExampleAppName/opStatus/157
Retry-After:5
Service-URI:https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/ExampleAppName
Transfer-Encoding:chunked
X-Frame-Options:DENY
X-Powered-By:Servlet/2.5JSP/2.1

Example of Response Body

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

{
"processes": [
         {
             "processName": "web",
             "instances": [
                 {
                     "name": "web.1",
                     "status": "RUNNING",
                     "instanceURI": "https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/ExampleAppName/instances/web.1"
                 }
             ]
         }
     ],
     "identityDomain": "ExampleIdentityDomain",
     "applicationDetails": "ExampleAppName"
 }
Back to Top