cURL Access

The examples in this document use cURL to access the Oracle Visual Builder REST API.

To use cURL to access the Oracle Integration REST API:
  • Install cURL, as described in Quick Start.
  • In a command window, set the cURL environment variable, CURL_CA_BUNDLE, to the location of your local CA certificate bundle. For information about CA certificate verification using cURL, see: http://curl.haxx.se/docs/sslcerts.html.
  • Invoke cURL and specify one or more of the command-line options in the table, which is shown below in the Select Your cURL Options topic, to direct its execution. Include the full URL to the endpoint.

Task 1: Install cURL

To connect to the server securely, you must install a version of cURL that supports SSL and provides an SSL certificate authority (CA) certificate file or bundle to authenticate against the Verisign CA certificate. For more information about authentication, see Authenticate.

The following procedure demonstrates how to install cURL on a Windows 64-bit system.

  1. In your browser, navigate to the cURL home page at http://curl.haxx.se and click Download in the left navigation menu.

  2. On the cURL Releases and Downloads page, locate the SSL-enabled version of the cURL software that corresponds to your operating system, click the link to download the ZIP file, and install the software.

  3. Navigate to the cURL CA Certs page at http://curl.haxx.se/docs/caextract.html and download the ca-bundle.crt SSL CA certificate bundle in the folder where you installed cURL.

  4. Open a command window, navigate to the directory where you installed cURL, and set the cURL environment variable, CURL_CA_BUNDLE, to the location of an SSL certificate authority (CA) certificate bundle. For example:

    C:\curl> set CURL_CA_BUNDLE=ca-bundle.crt

You are now ready to send requests using cURL.

Task 2: Set Environment Variable for cURL

In a command window, set the cURL environment variable, CURL_CA_BUNDLE, to the location of your local CA certificate bundle. For example:

C:\curl> set CURL_CA_BUNDLE=ca-bundle.crt

For information about CA certificate verification using cURL, see http://curl.haxx.se/docs/sslcerts.html.

Task 3: Invoke cURL

Specify one or more cURL command-line options shown in the table to direct its execution. Include the full URL to the endpoint. See Send Requests.

Select Your cURL Options

cURL Option Description

-d, --data '{"name":"value"}' -d, --data @file.json

Specifies the request body, or data, either directly or by referring to a JSON file on the local machine.

-F, --form @file.json

Specifies form data, either directly or by referring to a JSON file on the local machine.

-H, --header

Defines the content type of the request data.

-i

Displays response header information.

-o path

Identifies the response output on the local machine. Use this option for export operations and to save a response to a file.

-H 'Authorization: Bearer access_token'

Specifies the access token for the Oracle Visual Builder account. See Authenticate.

-X, --request

Indicates the type of request (for example, GET, POST, and so on).

Example

Let's put it all together with an example. This cURL command uses several query parameters to filter the list of available applications.
curl -H 'Authorization: Bearer {token}' -X GET 'https://myinstance.com/ic/builder/resources/application/applist?appName=&orderBy=time&orderDir=desc&myApps=t&appsIAdmin=f&latestVersions=f&abcsProjectType=f&vbcsProjectType=t&maxProjectType=f&template=f&development=f&stage=f&live=f&liveLocked=f&obsolete=f&autoDeleted=f&softDeleted=f&offset=0&count=10' \
  -H $'Cookie: {cookie-data}'