Skip to content

查询表的信息,其中 dbTableName 在查询记录使用 SQL 有用。

const TOKEN = 'teable_123456';
const BASE_ID = 'bse123456';
const TABLE_ID = 'tbl123456';

const url = 'https://app.teable.cn/api/base/' + BASE_ID + '/table/' + TABLE_ID;
const options = {method: 'GET', headers: {Authorization: 'Bearer ' + TOKEN}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}

联系 math@baima.site