Quick Start

Set up your environment and deploy your first application on Oracle Application Container Cloud using the REST API by performing the following tasks.

Step 1: Obtain Account Information

From your account administrator, obtain the appropriate account credentials to enable you to use the Oracle Application Container Cloud. Specifically, you will need:
  • Username and password

  • The URL of your Oracle Application Container Cloud instance, which is listed in the welcome email you receive with your trial or purchased subscription.

  • The identity domain for your subscription to Oracle Application Container Cloud.

Step 2: Install cURL

You can use the cURL command-line tool to access the Oracle Application Container Cloud REST API.

To install cURL:
  1. In your browser, navigate to the cURL Home Page.

  2. Locate the SSL-enabled version of the cURL software that corresponds to your operating system, download the ZIP file, and install the software.

Step 3: Deploy the Sample Welcome Application

The following example shows how to deploy a sample Java application by submitting a POST request using cURL. Because there is no archive binary specified, the welcome application is deployed.
curl -i -X POST -H "Authorization:joe@example.com:joePassword" \
 -H "X-ID-TENANT-NAME:ExampleIdentityDomain" \
 -H "Content-Type: multipart/form-data" \
 -F "name=ApaaSApplicationName" -F "runtime=java" \
 -F "subscription=Hourly" \
 https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain

The response body will include information about the application, including the ID of the deployed application (ExampleAppId in next step).

Step 4: Review the Details of Your First Application

The following example shows how to view the details of an application by submitting a GET request on the REST resource using cURL:

curl -i -X GET -H "Authorization:joe@example.com:joePassword" \
  -H "X-ID-TENANT-NAME:ExampleIdentityDomain" \
  https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/ExampleAppId

Step 5: Deploy Your First Application

To deploy an application using the REST API, first create your archive (a .zip or .tgz file plus, optionally, a non-zipped manifest file in the same directory) and place it in your Oracle Cloud Storage Service account.

This example shows how to deploy a Java application called MyFirstApp by submitting a POST request using cURL. The archiveURL points to the location of your archive within your storage service account.

curl -X POST -u joe@example.com:password \
-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=mydomain/binaries/myapp.zip" \
-F "notes=notes for deployment" \
https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain

As you can see from the example, you have the option of supplying manifest.json separately or within the zipped archive (or both). If you do specify a manifest.json on the command line, that file will be given priority if there is also a manifest.json in the zipped archive.

More generally, any option on the command line (such as the subscription or name) takes precedence over the same option in a metadata file, if there is a difference.