Send Signed Requests

To send requests to the Digital Assistant REST APIs on Oracle Cloud Infrastructure (OCI), you must follow the guidelines at REST APIs in Oracle Cloud Infrastructure Documentation.

Note:

With Digital Assistant instances that are paired with a subscription to a Fusion-based Oracle Cloud Applications service, such as HCM Cloud or Sales Cloud, and 19.4.1 instances that were migrated to Oracle Cloud Infrastructure, you must send requests using IDCS OAuth. To learn how to verify that OAuth is enabled for your instance, and to learn how to send OAuth requests, see Send IDCS OAuth Requests.

You can send requests to any operation for which you have permission to access. See Permissions to learn which operations you can access based on your IAM group.

Prerequisites

Before you can send requests, you need the following:

Prerequisite More Information
Ensure that you're associated with an IAM group that has the necessary policy for accessing the operation. Permissions
Obtain the tenancy OCID and your user OCID. Required Keys and OCIDs
Get an RSA key pair in PEM format (minimum 2048 bits). How to Generate an API Signing Key
In the Infrastructure Console, upload the public key and note the key's fingerprint that the console displays. How to Upload the Public Key
config file. You need to create a config file, which lists the OCIDs, fingerprint, and path to the key file, as described at SDK and CLI Configuration File.

OCI Request Signing

With Oracle Cloud Infrastructure, requests must be signed as described in Request Signatures in Oracle Cloud Infrastructure Documentation. This means that you need to use a pre-request script to build a signature, which is derived from the following values.

  • Tenancy OCID
  • User OCID
  • RSA private key
  • Key fingerprint
  • Date
  • Request target (URL)
  • Host
  • Content type (for PUT, PATCH, and POST requests)
  • Content length (for PUT, PATCH, and POST requests)
  • Content SHA-256 checksum (x-content-sha256) (for PUT, PATCH, and POST requests)

Oracle provides libraries for signing requests. You can see JavaScript example code that shows how to use these libraries in the Send Signed Requests use case.