Previous Next

Use cURL

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

To use cURL to access the Oracle BI Publisher REST API:

  • Install cURL, as described in Quick Start.

  • Invoke cURL and specify one or more of the command-line options described in this table.

    This table summarizes the cURL options used in the command examples.

    cURL Option

    Description

    -d Identifies the request document, in JSON format, on the local machine. For example:

    -d @mydatafile.json

    -F Identifies form data, in JSON format, on the local machine. For example:

    -F @myformdatafile.json

    -H Defines one or both of the following:
    • Content-Type: Media type of the body of the request

    • Accept: Media type of the body of the request

    -i Displays response header information.
    -u Specifies the user name and password for the Oracle BI Publisher account. For example:

    -u jsmith:mypassword1

    -X Indicates the type of request. For example:

    -X DELETE

For example:

curl --u <username><password> -H "<request-header>:<value>" -X GET http://<host>:<port>/xmlpserver/services/rest/v1/reports/<reportPath>

To fetch a report definition located at /Sample Lite/Published Reporting/Reports/Balance Letter:

curl --u jsmith:mypassword1 -H "Accept:application/json" -X GET http://example.com/xmlpserver/services/rest/v1/reports/%2FSample%20Lite%2FPublished%20Reporting%2FReports%2FBalance%20Letter