Quick Start

You can make many types of HTTP requests with Oracle CPQ REST APIs to view, create, update, or delete data. Oracle CPQ Rest APIs use Hypertext Transfer Protocol Secure (HTTPS) to send data between a web browser and a website. HTTPS is encrypted in order to increase security of data transfer.

  • Refer to Supported CPQ REST Versions to view current Oracle CPQ REST API versions.

    Note: Beginning in Oracle CPQ 21A, we will support the current REST version and the two previous REST versions. Older (three versions back and earlier) REST versions may continue to function; however, Oracle will not address new issues that arise. We recommend you plan for this transition.

  • Refer to CPQ REST Version Updates to learn about new and changed endpoints for Oracle CPQ REST API versions.

The following tasks outline sending requests to an Oracle CPQ REST API service.

Prerequisites

Prerequisite More Information
Select a REST Client REST Clients
Set up authentication REST API Authentication

Task 1: Obtain Your Oracle CPQ Account Information

To make a REST HTTP request, you need to gather a few bits of information, including:

  • REST Server URL - Typically, the URL of your Oracle CPQ service.

    For example, https://sitename.oracle.com

  • User name and password - An Oracle CPQ service user with permissions to access the resources you're using.

    You can find the REST Server URL, user name, and password in the welcome email sent to your Oracle CPQ service administrator.

Task 2: Configure Your Client

With the information gathered so far, you're ready to configure your client to send a REST HTTP request.

  1. Construct the request URL. All REST calls to Oracle CPQ must be made to a URL endpoint using the following format:

    https://<siteurl>/rest/<restVersion>/<resource-path>

    • The <server> is the REST Server URL of the Oracle CPQ site.
    • The <restVersion> is the REST API version.

      For example, "v15"

    • The <resource-path> is the relative path or endpoint to the REST resource you're working with. For available endpoints, refer to All REST Endpoints. For example, the following resource path is for the "Status" data table.

      /datatables/Status

    Combine the REST Server URL, rest version, and the Data Tables REST resource path from the example above, and your request URL is complete. Refer to the appropriate REST API definition to identify requirements for each API.

    https://sitename.oracle.com/rest/v15/datables/Status 
  2. Provide your account information. Include your user name and password in the client. For example, if you are using cURL, you can specify your account information using the -u cURL command as follows:

    -u <username:password>

  3. Set the media type. Media type defines the structure of the HTTP payloads exchanged between the server and the client. For example, if you're using cURL, you can specify a resource item media type using the header -H command as follows:

    -H 'content-type: application/json'

When you're done, the complete cURL command should look like this:

curl -u <username:password> \
-X GET https://sitename.oracle.com/rest/v15/datatables/Status  \
-H 'content-type: application/json'

Task 3: Send an HTTP Request

You're almost done. Now that your authentication and authorization are set, you're ready to send a test HTTP request. Continuing with our example, we want to get the properties for the Status data table object in REST. You can do this using the action in cURL:

curl -u username:password \ 
-X GET https://sitename.oracle.com/rest/v15/dstatables/Status \
-H 'content-type: application/json'

If your request for information about the Status data table is successful, you receive a response with a body similar to the following abbreviated example. If your request fails, and you're using cURL, review the response comments, adjust your request, and then try again. If you're using other REST clients, review the failure Status Codes, and then try again.

{
  "id": "36263638",
  "dateModified": "08/10/2017 11:17 AM",
  "links": [{
      "rel": "parent",
      "href": "https://sitename.oracle.com/rest/v15/datatables"
    }, {
      "rel": "self",
      "href": "https://sitename.oracle.com/rest/v15/datatables/Status"
    }
  ],
  "name": "Status",
  "description": "The list of all possible values for transaction and transaction line status attributes.",
  "hasUndeployedChanges": false,
  "deployedDate": "08/10/2017 11:17 AM",
  "dateCreated": "07/02/2014 10:08 AM",
  "folder": {
    "name": "[Default]",
    "variableName": "_default",
    "links": [{
        "rel": "related",
        "href": "https://sitename.oracle.com/rest/v15/dataTableFolders/_default"
      }
    ],
  },
  "isLive": false
}