Quick Start

Use the information in this topic to help you get started with Oracle Analytics Cloud REST APIs.

Prerequisites

Prerequisite More Information
Subscribe to Oracle Analytics Cloud Subscribe to Oracle Analytics Cloud
Sign in to Oracle Analytics Cloud Access Oracle Analytics Cloud

Task 1: Obtain Account Information

From your Oracle Cloud account administrator, obtain the appropriate account credentials to enable you to use Oracle Analytics Cloud REST APIs. Specifically, you will need:
  • User name and password for Oracle Analytics Cloud.

  • URL of your Oracle Analytics Cloud instance.

  • Appropriate application role in Oracle Analytics Cloud. The application role you require depends on the REST API operation you want to perform and is the same as the application role required to perform the same operation in the UI. For example:
    • Catalog: Requires DV Content Author
    • Connections: Requires DV Content Author
    • Datasets: Requires DV Content Author
    • Data flows: Requires DV Content Author
    • Sequences: Requires DV Content Author
    • Safe Domains: Requires BI Service Administrator
    • Snapshots: Requires BI Service Administrator
    • System: Requires BI Service Administrator

In addition, to use snapshots REST APIs you need:

  • Access to Oracle Cloud Infrastructure (OCI) Object Storage and permissions to create a bucket where you can store snapshots. Specifically, you need the following permissions on the storage bucket where the snapshots are stored:
    • OBJECT_CREATE
    • OBJECT_OVERWRITE
  • An Oracle Cloud Infrastructure API signing key that authorizes you (or another user) to access OCI Object Storage where snapshots are stored. See How to Generate an API Signing Key.

    You must pass this signing key in the payload for some snapshot APIs. Before you add it to the payload, you must Base64 encode the private key (ociPrivateKeyWrapped). For example, to generate a Base64 encoded string from your private key:

    On Mac: cat myprivate-key.pem | base64 -o mywrapped-private-key.pem

    On Linux: cat myprivate-key.pem | base64 -w 0 > mywrapped-private-key.pem

    Note: Ensure that the private key file that you encode includes -----BEGIN and -----END tags.

  • Other information required to access OCI Object Storage. For example, the region, tenancy Oracle Cloud ID (OCID), and user OCID. See Where to Get the Tenancy's OCID and User's OCID.

Task 2: Understand the Send Request URL

Use the following URL to send requests using the Oracle Analytics Cloud REST API:

https://subdomain.domain.com/path/resource-path

Where:
  • subdomain.domain.com - Host (and port) where Oracle Analytics Cloud is running. For example: myoac-idabcd0efghj-ia.analytics.ocp.oraclecloud.com

  • resource-path: Relative path that defines the resource (REST endpoint). See All REST Endpoints.

Example cURL Commands

The following table shows examples of GET and POST operations using cURL:

Operation cURL Command

Use GET to retrieve information about your Oracle Analytics Cloud instance.

curl -i --header 'Authorization: Bearer <token>' --request GET 'https://myoac-idabcd0efghj-ia.analytics.ocp.oraclecloud.com/api/20210901/system'

Use POST to create and register a snapshot.

curl -i --header 'Authorization: Bearer <token>' --request POST 'https://myoac-idabcd0efghj-ia.analytics.ocp.oraclecloud.com/api/20210901/snapshots' -d @example_request_payload.json