在创建从 Oracle Analytics Cloud 到数据源的 REST 端点的连接之前,应创建包含连接详细信息的压缩 JSON 文件。
您可以从 Oracle Analytics 公共库下载 JSON 模板。将连接详细信息存储在基于模板的 JSON 文件中,然后将 JSON 文件压缩成 ZIP 格式。您还可以下载一系列 SaaS 和 PaaS 应用程序的示例 JSON 文件。
与 REST 端点连接的 JSON 模板格式
{ "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" } }
与 Survey Monkey REST 端点连接的 JSON 示例
{ "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" } }
关于 OAuth2 验证
在开始之前,请确保您的目标数据源支持 OAuth2 验证;并非所有数据源都支持 OAuth2。
使用下载的模板之一创建 JSON 文件时,请在 authentication-type
字段中指定适当的验证类型。
OAuth2 类型 | 对于 authentication-type 字段有效的值 |
OAuth2 代码 | OAuth2Code |
OAuth2 密码身份证明 | OAUTH2PasswordGrant |
OAuth2 隐式 | OAUTH2ImplicitGrant |
OAuth2 客户端身份证明 | OAUTH2ClientCredentials |
在此示例中,通过使用 "OAUTH2PasswordGrant" 作为 authentication-type
值,指定了 OAuth2 密码身份证明验证方法。
.png 的说明
有关创建 JSON 文件的其他提示