製品ガイド
基本
自動化ガイド
統合ガイド
テンプレート
Open API
機能リファレンス
自動化トリガー
自動化アクション
サードパーティ統合
ノードリソース
データベースビュー
データベースフィールド
ダッシュボードウィジェット
ミッション
AI ウィザード
フォーミュラ
空間
リリースノート
Videos

title: OpenAPI Quick Start slug: help/en/guide/developer/openapi sidebar_position: 10 sidebar_label: Quick Start

OpenAPI Quick Start

Bika.ai OpenAPI

Quick Start

Bika.ai's offical JavaScript use beautiful Object-Oriented Programming (OOP) style for your better use.

npm install bika.ai
<em># or</em>
yarn add bika.ai
pnpm add bika.ai

Examples to use Bika.ai offical Node.js SDK. (TypeScript example)

Get Spaces:

import { Bika } from 'bika.ai';

const bika = new Bika({apiKey: '__PASTE_YOUR_API_TOKEN_FROM_USER_SETTING__',<em>// default is:// baseURL: '</em><em>https://bika.ai/api/openapi/bika',</em>
})

<em>// firstly, fetch your spaces</em>const spaces = await bika.spaces.list();

<em>// now we use your first space as our operations</em>const space = spaces[0];

Find Node Resources (Database, Automation, Folder, Documents, etc.):

<em>// find node resources</em>const nodes = await space.nodes.list();

<em>// get one node resource</em>const node = nodes[0];
const database = await node.asDatabase();
const automation = await node.asAutomation();

Here’s an example of Create, Read, Update, and Delete (CRUD) operations for databases.

Given that Bika.ai's database can handle billions of rows, you can use Bika.ai databases as a fully functional production database, such as for an order table, user table, and more.

<em>// notice,  use </em><em>asXXX</em><em>,depends on your node resource type, includes database, automation, folder, and so-on</em>const database = await node.asDatabase();
const records = await database.records.list();
const views = await database.views.list();

CRUD Automations:

const automation = await node.asAutomation();
const triggers = await automation.triggers.list();
const actions = await automation.actions.list();

Here are examples of registering global-scope or space-scope outgoing webhooks (Server Events in Bika.ai).

You can utilize outgoing webhooks to send HTTP POST requests to your callback URL whenever a specific event takes place in Bika.ai.

Use cases include contact synchronization, data synchronization, custom notifications, plugins, and more.

<em>// Outoging Webhooks// Register a Bika.ai server event, and send a HTTP POST request to your callback URL</em>const outgoingWebhook = await space.outgoingWebhooks.create({eventType: 'ON_RECORD_CREATED',name: 'Test Outgoing Webhook',description: 'Test Outgoing Webhook Desc',callbackURL: 'https://your-custom-callback-url.com',
});
const outgoingWebhooks = await space.outgoingWebhooks.list();
const delteOutgoingWebhook = await space.outgoingWebhooks.delete({id: outgoingWebhook.id});

Here are examples of embedding Bika.ai's UI into your own application.

If you want to incorporate Bika.ai's robust UI for databases, documents, and more, you can utilize the embed link API.

Generate an embed link to obtain a URL, and then use an <iframe> in your application.

<em>// Embed Links// You can embed Bika.ai's UI into your own application</em>const embedLink = await space.embedLink.create({objectType: 'NODE_RESOURCE',objectId: '__NODE_RESOURCE_ID_YOU_WANT_TO_EMBED__',
})
const embedLinks = await space.embedLink.list();
const deleteEmbedLink = await space.embedLink.delete({id: embedLink.id});

<em>// ...</em>

Please checkout the Bika.ai API Reference for more API details.

Bika.ai Site-Admin OpenAPI

APITable compatible API SDK (beta)

Bika.ai support APITable compatible Open API interfaces.

That means you can use the APITable's SDK (JavaScript, Python, etc.) to interact with Bika.ai.

Quick start with APITable.js SDK for Bika.ai:

import { APITable } from "apitable";
<em>// Get token from your Bika.ai user setting</em>const apitable  = new APITable({ token: "_PASTE_YOUR_API_TOKEN_FROM_USER_SETTING", host: "https://bika.ai/api/openapi/apitable" }); 

<em>// Get a list of spaces for the current user</em>const spaceListResp = await apitable.spaces.list()

if (spaceListResp.success) {console.log(spaceListResp.data.spaces);
} else {console.error(spaceListResp);
}

More SDK usage please refer to:

bika cta

おすすめの読み物

AI自動化テンプレートをお勧めします

Digital Marketing Strategy
Effortlessly plan and track digital marketing initiatives with this template. Align goals with tasks, monitor progress, and use automation to send reports to Slack upon goal completion for seamless collaboration.
DingTalk通知の自動化
Bika を通じて DingTalk グループへの定期的なメッセージ送信を自動化します。定期通知、更新、アラートの送信プロセスを簡素化し、チームの協力効率を向上させます
Dynamic Email Automation for Partner Onboarding
Dynamic Email Automation for Partner Onboarding simplifies the onboarding process by automating personalized emails and follow-ups. It ensures timely communication, tracks partner engagement, and reduces manual work. With automated reminders and seamless integration, your team can focus on building stronger partnerships while the system handles the rest.
クロスボーダー電子商取引サプライヤー注文協力
クロスボーダーEC向けに設計された効率的な注文協働プロセス。インテリジェントマッチングとローテーションメカニズムにより、C2B注文タスクを適切なサプライヤーに自動的に割り当て、注文受信から生産・納品までの全プロセスを自動化し、チームの効率を向上させ、手動ミスを削減します。
Eisenhower Matrix
Dwight D. Eisenhower, the 34th U.S. president and WWII's Allied Supreme Commander, also led NATO's forces. He developed the Eisenhower matrix to enhance his time management skills, making critical decisions in various roles.
Email リマインダー
タイマーリマインダーは便利な機能で、リマインダーの時間を設定することができ、指定した日時に、関連するメンバーがリマインダーメールを受信するようにし、タイムリーに関連事項を処理するために、重要な情報を見逃すことがないようにします。