cURL Access
The examples in this document use cURL to access the Oracle Visual Builder 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.
-
In your browser, navigate to the cURL home page at http://curl.haxx.se and click Download in the left navigation menu.
-
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.
-
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.
-
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 |
---|---|
|
Specifies the request body, or data, either directly or by referring to a JSON file on the local machine. |
|
Specifies form data, either directly or by referring to a JSON file on the local machine. |
|
Defines the content type of the request data. |
|
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. |
|
Specifies the access token for the Oracle Visual Builder account. See Authenticate. |
|
Indicates the type of request (for example, GET, POST, and so on). |
Example
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}'