Basic Authentication
To authenticate a request using Basic Authentication, pass the Base64-encoded login credentials of a registered user in theAuthorization header of the request. Follow this guidance when passing the credentials:
- The username is the email address of the user, e.g.
user@cdata.com. - The password is a Personal Access Token (PAT) that you generate from the Settings page.
- If your application or service does not automatically Base64-encode the string, follow these steps to encode it manually:
- Separate the username and PAT with a colon, for example,
user@cdata.com:token. - Use Base64 to encode the colon-separated string.
- Separate the username and PAT with a colon, for example,
OAuth 2.0 Client Credentials
サービスアカウントは OAuth 2.0 Client Credentials フローで認証されます。この方式は、人間のユーザーを介さずにスクリプト、ジョブ、外部サービスを認証する場合に使用します。事前にサービスアカウントを作成し、Users ページから Client Id と Client Secret をコピーしておく必要があります。 Step 1: ベアラートークンをリクエストするaccess_token の値が含まれます。
Step 2: Connect AI API を呼び出す
以降のリクエストでは、トークンを Bearer 認証情報として渡します。例えば、クエリを実行する場合: