Create an Application
/paas/service/apaas/api/v1.1/apps/{identityDomainId}
Request
- multipart/form-data
-
identityDomainId: string
Name of the identity domain for the Oracle Application Container Cloud Service acount
-
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
-
gitPassword(optional): string
The password of your GitHub repository, required if your repository is private.
-
gitRepoUrl(optional): string
URL of your GitHub repository.
This parameter is supported only for Java SE, Java EE, and Node.js applications.
-
gitUserName(optional): string
The user name of your GitHub repository, required if your repository is private.
-
manifest(optional): string
Name of the manifest file, required if this file is not packaged with the application
-
name: string
Name of the 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'.
This parameter is required for Python, Go, Ruby, and .Net applications.
-
runtime(optional): string
Runtime environment: java (the default), javaee, node, php, python, ruby, golang, or dotnet
-
subscription(optional): string
Subscription, either hourly (the default) or monthly
-
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
Examples of Creating an Application on Oracle Cloud Infrastructure Classic
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" \ -F "tags=[{'key': 'owner', 'value': 'Some owner'}, {'key':'env', 'value":'prod'}]" \ https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain
The following example shows how to create an Oracle Application Cloud Service Java application from a GitHub repository. The gitUserName
and gitPassword
parameters are required if your repository is private.
curl -X POST -u joe@example.com:password\ https://apaas.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain \ -H "Cache-Control: no-cache" \ -H "content-type: multipart/form-data;" \ -F "name=MyJavaApp" \ -F "runtime=java" \ -F "subscription=MONTHLY" \ -F "deployment=@Local-path-to-deployment-json\deployment.json" \ -F "gitRepoUrl=https://github.com/YourGitProject/hello-world-war.git" \ -F "manifest=@Local-path-to-manifest-json\manifest.json" \ -F "gitUserName=YourUserName" \ -F "gitPassword=YourPassword"
Example of Manifest File
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 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 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.
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" }] }
For more information about what values to use in the manifest and deployment files, see Creating Meta Data Files.
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": [] }