cURL Access

The examples within this document use cURL to demonstrate how to access the Oracle Coherence management REST API.

To use cURL to access the Oracle Coherence management REST API:

  • Install cURL, as described in Quick Start.

  • Invoke cURL and specify one or more of the command-line options defined in the following table, as required, to direct its execution

    cURL Option Description
    -d, --data @file.json Identifies the request document, in JSON format, on the local machine.
    -F, --form @file.json Identifies form data, in JSON format, on the local machine.
    -H Defines one or both of the following:
    • Content type of the request document

    • Custom header

    -i Displays response header information.
    -u, --user username:password Specifies the user name and password to access the cluster.
    -X Indicates the type of request (for example, GET, POST, and so on).

For example, to access the management REST API for standalone Coherence:

curl -i -X GET http://<host>:<port>/management/coherence/cluster

To access the management REST API for managed Coherence in a WebLogic Server domain:

curl -i -u <admin_username>:<admin_password> -X GET https://<admin_host>:<admin_port>/management/coherence/<version>/clusters