Accessing REST APIs

To access REST APIs, do the following:
  1. Confirm your version of Oracle Enterprise Data Management Cloud. Contact your system administrator for assistance.

  2. Get the required function and data privileges to access the REST resources. Contact your security administrator for assistance.

  3. Select the tool to access the REST APIs. Use an internet-accessible application or programming platform that supports protocols to transfer data.

    The following table lists some tools for accessing REST APIs.

    Tool Description

    cURL

    An open source, command-line tool that you can use to transfer data from or to a server using a supported protocol, such as HTTP or HTTPS.

    Web browser

    Support for REST APIs varies across browsers. You may have to install plug-ins or extensions on some browsers. For example, Advanced REST Client is a browser extension that supports initiating and testing REST APIs.

    Programming language

    Programming languages such as Java, Groovy, Ruby, Perl, PHP, or .NET can send a REST API call. Some platforms may require use of a third-party library. For details, see the documentation for your platform.

  4. Obtain the REST URL to use. Refer to the Tasks in the REST API documentation for the appropriate Oracle Applications Cloud service. Use the Request tab to understand the parameters and the Examples tab to review an example request.

  5. Structure the request call to a REST resource.

    Example cURL commands:

    curl -u identitydomain.username:password -X POST -d request_body https://server:port/epm/rest/v1/applications/{applicationId}/connections

    curl -i -u identitydomain.username:password -X GET https://server:port/epm/rest/v1/applications/{applicationId}/connections

    • identitydomain.username:password is the domain, user name, and password that REST API uses to access Enterprise Data Management Cloud.

    • server:port identifies the server that hosts the service and the port that this server uses to communicate with REST APIs.

cURL Command Example

The following example shows how to retrieve the list of connections for an application by submitting a get request on the REST resource using cURL.

curl --user myidentitydomain.epm_cloud_user:mypassword -X GET \
  https://servername.fa.us2.oraclecloud.com/epm/rest/v1/applications/e63e92c4-4727-4999-97f2-50498cb40ec7/connections

Request Body Example

The following shows an example of the request body in JSON format.

{
  "items": [
    {
      "id": "445e92f5-e232-4100-b709-a875c06cf294",
      "name": "Corporate Planning Server",
      "description": "",
      "connectionDetails": "{\"url\":\"http://epbcsserver/\",\"domain\":\"myidentitydomain\",\"username\":\"user\",\"password\":\"daa64d99-9c88-4109-a75b-c9756b7d0796\"}",
      "primary": true,
      "links": [
        {
          "rel": "self",
          "href": "https://servername.fa.us2.oraclecloud.com/epm/rest/v1/applications/e63e92c4-4727-4999-97f2-50498cb40ec7/connections/445e92f5-e232-4100-b709-a875c06cf294"
        },
        {
          "rel": "connectionResources",
          "href": "https://servername.fa.us2.oraclecloud.com/epm/rest/v1/applications/e63e92c4-4727-4999-97f2-50498cb40ec7/connections/445e92f5-e232-4100-b709-a875c06cf294/resources",
          "templated": true,
          "method": "GET"
        }
      ]
    },
    {
      "id": "b0228ab4-0078-4e17-a7b3-9becf5e77c68",
      "name": "Backup Planning Server",
      "description": "",
      "connectionDetails": "{\"url\":\"http://backupserver/epbcs\",\"domain\":\"identitydomain\",\"username\":\"sampleUser\",\"password\":\"daa64d99-9c88-4109-a75b-c9756b7d0796\"}",
      "primary": false,
      "links": [
        {
          "rel": "self",
          "href": "https://servername.fa.us2.oraclecloud.com/epm/rest/v1/applications/e63e92c4-4727-4999-97f2-50498cb40ec7/connections/b0228ab4-0078-4e17-a7b3-9becf5e77c68"
        },
        {
          "rel": "connectionResources",
          "href": "https://servername.fa.us2.oraclecloud.com/epm/rest/v1/applications/e63e92c4-4727-4999-97f2-50498cb40ec7/connections/b0228ab4-0078-4e17-a7b3-9becf5e77c68/resources",
          "templated": true,
          "method": "GET"
        }
      ]
    }
  ],
  "links": [
    {
      "rel": "self",
      "href": "https://servername.fa.us2.oraclecloud.com/epm/rest/v1/applications/e63e92c4-4727-4999-97f2-50498cb40ec7/connections"
    }
  ],
  "hasMore": false,
  "totalResults": 2,
  "limit": 0,
  "count": 2
}