多维表格
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1.2 KiB

title description
NocoDB SDK NocoDB SDK Overview

We provide SDK for users to integrate with their applications. Currently only SDK for Javascript is supported.

:::note

The NocoDB SDK requires authorization token. If you haven't created one, please check out Accessing APIs for details.

:::

SDK For Javascript

Install nocodb-sdk

npm i nocodb-sdk

Import Api

import { Api } from 'nocodb-sdk'

Configure Api

The Api can be authorizated by either Auth Token or API Token.

Example: Auth Token

const api = new Api({
  baseURL: 'https://<HOST>:<PORT>',
  headers: {
    'xc-auth': '<AUTH_TOKEN>'
  }
})

Example: API Token

const api = new Api({
  baseURL: 'https://<HOST>:<PORT>',
  headers: {
    'xc-token': '<API_TOKEN>'
  }
})

Call Functions

Once you have configured api, you can call different types of APIs by api.<Tag>.<FunctionName>.

:::note

For Tag and FunctionName, please check out the API table here.

:::

Example: Calling API - /api/v1/db/meta/projects/{projectId}/tables

await api.dbTable.create(params)