Create or Update a CLI-Only Application
/paas/service/apaas/api/v1.1/cliapps/{identityDomainId}
Request
- multipart/form-data
-
identityDomainId: string
Name of the identity domain for the Oracle Application Container Cloud Service acount
-
mode(optional): string
Restart mode for application instances. The only allowed option is
rolling
for a rolling restart. Omit this parameter for a concurrent restart.
-
archiveURL(optional): string
Location of the application archive file in Oracle Storage Cloud Service, in the format app-name/file-name
-
authType(optional): string
Uses Oracle Identity Cloud Service to control who can access your Java SE 7 or 8, Node.js, or PHP application. Allowed values are 'basic' and 'oauth'.
-
deployment(optional): string
Name of the optional deployment file, which specifies memory, number of instances, and service bindings
-
manifest(optional): string
Name of the manifest file, required if this file is not packaged with the application
-
name: string
Name of the application. For updating, must match the name of an existing application.
-
notes(optional): string
Comments on the application deployment
-
notificationEmail(optional): string
Email address to which application deployment status updates are sent.
-
region(optional): string
Name of the region where the application is to be provisioned. Required only on Oracle Cloud Infrastructure.
-
repository(optional): string
Repository of the application. The only allowed value is 'dockerhub'.
-
runtime(optional): string
Runtime environment: java (the default), javaee, node, php, python, ruby, golang, or dotnet. For application creation only.
-
subscription(optional): string
Subscription, either hourly (the default) or monthly. For application creation only.
-
tags(optional): array
List of tags that can be associated with the application.
Response
- application/json
202 Response
object
-
appId(optional):
string
ID of the application
-
appURL(optional):
string
URL of the created application
-
createdBy(optional):
string
Name of user who created the application
-
createdTime(optional):
string
Creation time of the application
-
currentOngoingActivity(optional):
string
Activity status
-
identityDomain(optional):
string
Identity Domain of the application
-
lastModifiedTime(optional):
string
Modification time of the application
-
latestDeployment(optional):
array latestDeployment
Shows all deployments currently in progress.
-
name(optional):
string
Name of the application
-
status(optional):
string
Status of the application
-
subscriptionType(optional):
string
Type of subscription, Hourly or Monthly
array
object
-
deploymentId(optional):
string
Deployment ID. Use this ID to manage a specific deployment.
-
deploymentStatus(optional):
string
Status of the deployment
-
deploymentURL(optional):
string
Deployment URL. Use this URL to get a description of the application deployment.
400 Response
404 Response
429 Response
500 Response
Examples
The following example shows how to create an Oracle Application Cloud Service application by submitting a POST 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 POST -u joe@example.com:Welcome1! \ -H "X-ID-TENANT-NAME:ExampleIdentityDomain" \ -H "Content-Type: multipart/form-data" \ -F "name=MyFirstApp" -F "runtime=java" -F "subscription=Monthly" \ -F "manifest=@manifest.json" -F "deployment=@deployment.json" \ -F "archiveURL=MyFirstApp/myapp.zip" \ -F "notificationEmail=jane@example.com" -F "authType=oauth"\ -F "notes=notes for deployment" -F "repository=dockerhub" \ https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/cliapps/ExampleIdentityDomain
If you are deploying a Cloud Foundry application, you can include a manifest.yml
file instead of a manifest.json
file. See Preparing a Cloud Foundry Application for Deployment.
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": "7" }, "command": "sh target/bin/start", "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 https://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": "NEW", "createdBy": "weblogic", "creationTime": "2015-09-25T02:46:54.165-0700", "lastModifiedTime": "2015-09-25T02:46:53.943-0700", "subscriptionType": "MONTHLY", "instances": [], "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": "Creating Application", "appURL": "http://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/MyFirstApp", "message": [] }