Accessing REST APIs

To access REST APIs, do the following:
  1. Confirm your version of Narrative Reporting. 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 Oracle Narrative Reporting. 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 username:password -X POST -d request_body https://server:port/epm/rest/<version>/reports

    curl -i -u username:password -X GET https://server:port/epm/rest/<version>/reportPackages

    • username:password is the user name and password that REST API uses to access the server.
    • server:port identifies the server that hosts the service and the port that this server uses to communicate with REST APIs.
    • version is the version number of Oracle Narrative Reporting. For example for this release, v1 is the version number.