OutSystems でAPI に接続されたエンタープライズアプリケーションを作成

杉本和也
杉本和也
リードエンジニア
CData Connect AI を使用してOutSystems からAPI に接続し、API のデータをリアルタイムで使用してカスタムエンタープライズアプリを構築します。

OutSystems は、企業がオムニチャネルのエンタープライズアプリケーションを開発、展開、管理するためのツールを提供するローコードプラットフォームです。CData Connect AI と組み合わせると、ビジネスアプリケーション用にAPI のデータにクラウド上でアクセスできます。この記事では、Connect AI にAPI の仮想データベースを作成し、OutSystems でAPI のデータから単純なアプリを構築する方法を説明します。

Connect AI からAPI に接続する

CData Connect AI は直感的なクリック操作ベースのインターフェースを使ってデータソースに接続します。
  1. Connect AI にログインし、 Add Connection をクリックします。 Adding a Connection
  2. Add Connection パネルから「API」を選択します。 データソースを選択
  3. 必要な認証情報を入力し、API に接続します。

    To connect to your API, configure the following properties on the Global Settings page:

    • In Authentication, select the Type and fill in the required properties
    • In Headers, add the required HTTP headers for your API
    • In Pagination, select the Type and fill in the required properties

    After the configuring the global settings, navigate to the Tables to add tables. For each table you wish to add:

    1. Click "+ Add"
    2. Set the Name for the table
    3. Set Request URL to the API endpoint you wish to work with
    4. (Optional) In Parameters, add the required URL Parameters for your API endpoint
    5. (Optional) In Headers, add the required HTTP headers for the API endpoint
    6. In Table Data click " Configure"
    7. Review the response from the API and click "Next"
    8. Select which element to use as the Repeated Elements and which elements to use as Columns and click "Next"
    9. Preview the tabular model of the API response and click "Confirm"
    コネクションの設定(Salesforce の例)
  4. Create & Test をクリックします。
  5. Add API Connection ページのPermissions タブに移動し、ユーザーベースのアクセス許可を更新します。 権限の更新

パーソナルアクセストークンを追加する

OAuth 認証をサポートしないサービス、アプリケーション、プラットフォーム、フレームワークから接続する場合、パーソナルアクセストークン(Personal Access Token, PAT)を認証に使用できます。きめ細かくアクセスを管理するために、サービスごとに個別のPAT を作成するのがベストプラクティスです。

  1. User Profile ページでPersonal Access Token セクションにスクロールし、 Create PAT をクリックします。
  2. PAT の名前を入力して Create をクリックします。 新しいPAT を作成
  3. パーソナルアクセストークンは作成時にしか表示されないため、必ずコピーして安全に保存してください。

コネクションが構成されたら、OutSystems からAPI に接続できるようになります。

OutSystems からAPI に接続する

以下のステップでは、OutSystems からCData Connect AI に接続して新しいAPI のデータベース接続を作成する方法の概要を説明します。

  1. OutSystems Service Studio を開きます。
  2. 歯車アイコン をクリックし、Service Center のEnvironment Management を開きます。 Opening the Service Center
  3. Administration をクリックして「Database Connections」を選択します。
  4. 「New Database Connection」をクリックします。
  5. データベース接続を設定します。
    • Name:接続の名称(例:CData Connect AI API)
    • DBMS:SQL Server またはAzure SQL
    • Username:Connect AI ユーザー(例:[email protected]
    • Password:Connect AI ユーザーのPAT
    • Servertds.cdata.com,14333
    • Schema:API コネクションの名前(例: API1)
    Connecting to the Connect AI
  6. 「Test Connection」をクリックします。
  7. 「Create」をクリックします。

API テーブルまたはビューを拡張モジュールのエンティティにマップする

API のデータベース接続を作成したら、テーブルまたはビューをOutSystems のエンティティにマップする拡張機能を作成できます。作成していない場合は、Service Studio でアプリケーションを作成します。

  1. Service Studio を開き、既存のアプリケーションを開きます。
  2. 「Add Module」をクリックし、「Module Name」(例:api_db_extension)を設定し、「Module Type」を「Extension」に設定して、「Create Module」をクリックします。 Creating a new extension module
  3. Integration Studio で、環境に接続します。
  4. 拡張ツリーで「Entities」を右クリックし、「Connect to External Table or View...」を選択します。 Connecting to external tables or views
  5. ウィザードのステップに従って、使用するテーブルおよびビューを選択します。
  6. Integration Studio で「1-Click Publish」をクリックします。
  7. 「1-Click Publish」ウィザードでプロセスが完了したら、「Configure」をクリックします。
    • Service Center で、拡張機能の論理データベース名を、拡張機能が使用するデータベース接続に関連付け、「Apply」をクリックします。 Configuring the external extension
  8. アプリケーションで「Manage Dependencies...」をクリックします。
  9. 拡張機能に依存関係を追加し、アプリケーションで使用するエンティティを選択します。 Adding a dependency to the extension

これで、標準のOutSystems エンティティと同じように、API のデータにアクセスして操作できます。

詳細と無償トライアル

Connect AI とOutSystems を使用すると、API に接続されたアプリケーションを簡単に構築できます。今すぐOutSystems のAPI のデータで作業を開始するには、Connect AI の無償トライアルにサインアップしてください。

はじめる準備はできましたか?

CData Connect AI の詳細、または無料トライアルにお申し込みください:

無料トライアル お問い合わせ