Specifying REST Endpoint Connection Details in a JSON File

Before you create a connection from Oracle Analytics Cloud to a data source's REST endpoints, create a zipped JSON file containing the connection details.

You can download a JSON template from the Oracle Analytics Public Library. Store the connection details in a JSON file based on the template, then compress the JSON file in ZIP format. You can also download example JSON files for a range of SaaS and PaaS applications.

JSON Template Format for Connection to REST Endpoints

{
    "name": "Connection name",
    "description": "Brief description",
    "baseURL": "URL, e.g. https://api.surveymonkey.com/v3",
    "endpoints": {
        "Endpoint 1": "Endpoint 1 URL, e.g. https://api.surveymonkey.com/v3/users/endpoint1",
        "Endpoint 2": "Endpoint 2 URL, e.g. https://api.surveymonkey.com/v3/question_bank/endpoint2",
        "Endpoint n": "Endpoint n URL, e.g. https://api.surveymonkey.com/v3/users/endpointn"
    },
    "authentication": {
        "type": "Authentication type"
    }
}

JSON Example for Connection to Survey Monkey REST Endpoints

{
    "name": "Survey Monkey Connection",
    "description": "Survey Monkey connection",
    "baseURL": "https://api.surveymonkey.com/v3",
    "endpoints": {
        "Users": "https://api.surveymonkey.com/v3/users/me",
        "Questions": "https://api.surveymonkey.com/v3/question_bank/questions"
    },
    "authentication": {
        "type": "HttpHeader"
    }
}

About OAuth2 Authentication

Before you start, make sure that your target data source supports OAuth2 authentication; not all data sources do support OAuth2.

When you create the JSON file using one of the downloaded templates, specify the appropriate authentication type in the authentication-type field.

In this example, the OAuth2 Password Credentials authentication method is specified using "OAUTH2PasswordGrant" as the authentication-type value.
Description of oauth2-json-example.png follows
Description of the illustration oauth2-json-example.png

Other tips on creating the JSON file

  • Remove unnecessary parameters and values from the file.
  • Make sure that the Authentication type value is set to noauth, BasicAuth, HttpHeader, or one of the OAuth2 settings in the table above.