It seems you may be using English. Would you like to go to the international site? bika.ai
产品指南
空间站
大数据多维表格
集成指南
自动化指南
AI应用与模板指南
私有化部署
开发者与扩展
最佳实践
marketing
功能参考
自动化触发器
自动化执行器
第三方集成
节点资源
数据表视图
数据表字段
仪表盘组件
智能任务
AI 向导
公式
空间站
更新日志
视频演示

使用站点级OpenAPI

一、接口认证

本 OpenAPI 采用 Basic Auth 认证方式。在发起请求时,请求头中需添加Authorization字段,其值为Basic <Base64编码的用户名:密码>。例如,当用户名为admin,密码为123456时,Authorization字段的值为Basic YWRtaW46MTIzNDU2(YWRtaW46MTIzNDU2是admin:123456经 Base64 编码后的结果)。通过这种认证方式,系统能够准确识别用户身份,后续调用各类接口时,无需再单独传递username和password参数,极大地简化了操作流程,提高了接口调用的便捷性和效率。

OpenAPI文档结构数据: https://{您部署地址}/api/site-admin/openapi/openapi.json

二、用户相关

用户对象

  • id:用户标识
  • name: 用户昵称
  • email: 用户邮箱
  • phone: (可选)手机号码
  • createdAt:创建时间,数据类型为字符串,采用 ISO 8601 标准格式,例如2023-01-01T12:00:00Z

空间站对象示例:

{
  "id": "usr123456",
  "name": "zhangsan",
  "email": "zhangsan@example.com",
  "phone": "13800138000",
  "createdAt": "2023-01-01T12:00:00Z"
}

创建新用户

  • 请求路径:https://{your_domain}/api/site-admin/openapi/users

  • 请求方法:POST

  • 请求体参数:

    • id(可选):用户唯一标识符,若不提供,系统将自动生成。如果提供, 请确保唯一性
    • name(必填):用户的姓名,为字符串类型,最小长度要求为 1 个字符,用于标识用户的基本信息。
    • email(必填):用户的电子邮箱地址,需符合标准的 email 格式,是用户登录和接收重要通知的关键途径。
    • phone(可选):用户的联系电话,字符串类型,方便在必要时进行沟通。
  • 请求体示例

{
  "id": "custom_user_id",
  "name": "zhangsan",
  "email": "zhangsan@example.com",
  "phone": "13800138000"
}
  • 响应结果

    • 成功响应(HTTP 200)
  • 响应示例数据

{
  "success": true,
  "code": 200,
  "data": {
    "id": "custom_user_id",
    "name": "zhangsan",
    "email": "zhangsan@example.com",
    "phone": "13800138000",
    "createdAt": "2025-01-01T12:00:00Z"
  }
}

获取用户信息

  • 请求路径:https://{your_domain}/api/site-admin/openapi/users/{id}

  • 请求方法:GET

  • 请求路径参数:

    • id(必填):目标用户的唯一标识符,字符串类型,最小长度为 1,例如usr123456。
  • 响应结果

    • 成功响应(HTTP 200)
  • 响应示例数据

{
  "success": true,
  "code": 200,
  "data": {
    "id": "custom_user_id",
    "name": "zhangsan",
    "email": "zhangsan@example.com",
    "phone": "13800138000",
    "createdAt": "2025-01-01T12:00:00Z"
  }
}

更新用户信息

  • 请求路径:https://{your_domain}/api/site-admin/openapi/users/{id}

  • 请求方法:PUT

  • 路径参数说明

    • id(必填):需要更新信息的用户唯一标识符,字符串类型,最小长度为 1,例如usr123456。
  • 请求体参数说明

    • name(可选):用户的新姓名,若需要修改则提供。
    • email(可选):用户的新电子邮箱地址,需符合 email 格式,若有变更则填写。
    • phone(可选):用户的新联系电话,若有更新则提供。
  • 示例请求

{
  "name": "lisi",
  "email": "lisi@example.com",
  "phone": "1392928182163"
}
  • 响应结果

    • 成功响应(HTTP 200)
  • 响应示例数据

{
  "success": true,
  "code": 200,
  "data": {
    "id": "custom_user_id",
    "name": "zhangsan",
    "email": "zhangsan@example.com",
    "phone": "13800138000",
    "createdAt": "2025-01-01T12:00:00Z"
  }
}

删除用户

  • 请求路径:https://{your_domain}/api/site-admin/openapi/users/{id}

  • 请求方法:DELETE

  • 请求路径参数

    • id(必填):待删除用户的唯一标识符,字符串类型,最小长度为 1,例如usr123456。
  • 响应结果

    • 成功响应(HTTP 200)
  • 响应示例数据

{
  "success": true,
  "code": 200,
  "message": "SUCCESS"
}

三、空间站相关

空间站对象

  • id:空间站的唯一标识
  • name:空间站名称
  • owner:空间站所有者的用户ID
  • createdAt:创建时间,数据类型为字符串,采用 ISO 8601 标准格式,例如2023-01-01T12:00:00Z

空间站对象示例:

{
  "id": "spcXyz789Qrs012",
  "name": "New Space Station",
  "owner": "usrAbc123Def456",
  "createdAt": "2023-01-01T12:00:00Z"
}

创建空间站

  • 请求 URL:https://{your_domain}/api/site-admin/spaces

  • 请求方法:POST

  • 请求体参数

    • id(可选,string 类型):自定义的空间站 ID, 定义时请确保唯一性,若未提供,系统将自动生成格式为 ID
    • name(必填,string 类型):空间站的名称,方便识别和管理空间站。
    • owner(必填,string 类型):空间站创建者用户ID, 同时也是空间站拥有者
    • customMemberId(可选, string类型): 创建者在空间站的成员对象自定义ID
  • 请求体示例

{
  "id": "spcCustom789",
  "name": "New Space Station",
  "owner": "usrAbc123Def456",
  "createdAt": "2023-01-01T12:00:00Z"
}
  • 响应格式
    • 成功响应(HTTP 200)
{
  "success": true,
  "code": 200,
  "data": {
    "id": "spcCustom789",
    "name": "New Space Station",
    "owner": "usrAbc123Def456",
    "createdAt": "2023-01-01T12:00:00Z"
  }
}

更新空间站信息

  • 请求 URL:https://{your_domain}/api/site-admin/spaces/{id}

  • 请求方法:PUT

  • 请求路径参数:

    • id(必填):要更新的空间站 ID。
  • 请求体参数

    • name(必填,string 类型):新的空间站名称,可修改空间站显示名。
  • 请求体示例

{
  "name": "Updated Space Station"
}
  • 响应格式
    • 成功响应(HTTP 200 OK)
{
  "success": true,
  "code": 200,
  "data": {
    "id": "spcXyz789Qrs012",
    "name": "Updated Space Station",
    "owner": "new_owner_id",
    "createdAt": "2023-01-01T12:00:00Z"
  }
}

四、通讯录相关

部门对象

  • id:部门ID
  • name:部门名称
  • parentId:父级部门ID
  • memberCount: 部门总成员数, 包括下面的子部门
  • createdAt:创建时间,数据类型为字符串,采用 ISO 8601 标准格式,例如2023-01-01T12:00:00Z

空间站对象示例:

{
  "id": "custom_team_id",
  "name": "develop",
  "parentId": "team_parent_id",
  "memberCount": 2,
  "createdAt": "2023-01-01T12:00:00Z"
}

获取单个部门信息

  • 请求路径:https://{your_domain}/api/site-admin/openapi/teams/{id}

  • 请求方法:GET

  • 请求路径参数:

    • id(必填):目标部门的唯一标识符,字符串类型,最小长度为 1,例如tem123145。
  • 响应结果

    • 成功响应(200)

响应示例数据

{
  "success": true,
  "code": 200,
  "data": {
    "id": "custom_team_id",
    "name": "develop",
    "parentId": "team_parent_id",
    "memberCount": 2,
    "createdAt": "2023-01-01T12:00:00Z"
  }
}

获取子部门列表

  • 请求路径:https://{your_domain}/api/site-admin/openapi/teams/{id}/children

  • 请求方法:GET

  • 请求路径参数:

    • id(必填):目标部门的唯一标识符,字符串类型,最小长度为 1,例如tem123145。
  • 请求查询参数:

    • spaceId(必填):空间站标识
  • 响应结果

    • 成功响应(200)

响应示例数据

{
  "success": true,
  "code": 200,
  "data": [
    {
      "id": "custom_team_id_2",
      "name": "develop",
      "parentId": "team_parent_id",
      "memberCount": 2,
      "createdAt": "2023-01-01T12:00:00Z"
    },
    {
      "id": "custom_team_id_2",
      "name": "develop",
      "parentId": "team_parent_id",
      "memberCount": 2,
      "createdAt": "2023-01-01T12:00:00Z"
    }
  ]
}

创建部门

  • 请求路径:https://{your_domain}/api/site-admin/openapi/teams

  • 请求方法:POST

  • 请求体参数

    • id(可选):部门的唯一标识符,若不提供,系统将自动生成。
    • name(可选):部门的姓名,可用于更直观地识别部门
    • spaceId(必填):部门所属空间
    • parentId(必填):父级部门ID
  • 请求体示例

{
  "id": "custom_team_id",
  "name": "front",
  "spaceId": "spcXxx124",
  "parentId": "custom_parent_team_id"
}
  • 响应结果
    • 成功响应(200)

响应示例数据

{
  "success": true,
  "code": 200,
  "data": {
    "id": "custom_team_id",
    "name": "develop",
    "parentId": "team_parent_id",
    "memberCount": 2,
    "createdAt": "2023-01-01T12:00:00Z"
  }
}

更新部门

  • 请求路径:https://{your_domain}/api/site-admin/openapi/teams/{id}

  • 请求方法:PUT

  • 请求路径参数:

    • id(必填):目标部门的唯一标识符,字符串类型,最小长度为 1,例如tem123145。
  • 请求体参数

    • name(可选):部门的姓名,可用于更直观地识别部门
  • 请求体示例

{
  "name": "back"
}
  • 响应结果
    • 成功响应(200)

响应示例数据

{
  "success": true,
  "code": 200,
  "data": {
    "id": "custom_team_id",
    "name": "develop",
    "parentId": "team_parent_id",
    "memberCount": 2,
    "createdAt": "2023-01-01T12:00:00Z"
  }
}

删除部门

  • 请求路径:https://{your_domain}/api/site-admin/openapi/teams/{id}

  • 请求方法:DELETE

  • 请求路径参数

    • id(必填):部门的唯一标识符
  • 响应结果

    • 成功响应(HTTP 200)
  • 响应示例数据

{
  "success": true,
  "code": 200,
  "message": "SUCCESS"
}

成员对象

  • id:成员ID, 可自定义。
  • name:成员昵称, 如果不设置, 默认取用户名称
  • userId: 用户归属
  • email: 成员对应的用户邮箱
  • teams: 所属部门列表, 部门对象数组
  • createdAt:创建时间,数据类型为字符串,采用 ISO 8601 标准格式,例如2023-01-01T12:00:00Z

对象示例:

{
  "id": "custome_user_id",
  "name": "lily",
  "userId": "custome_user_id",
  "email": "lily@example",
  "createdAt": "2023-01-01T12:00:00Z",
  "teams": [
    {
      "id": "custom_team_id",
      "name": "develop",
      "parentId": "team_parent_id",
      "memberCount": 2,
      "createdAt": "2023-01-01T12:00:00Z"
    }
  ]
}

创建成员

  • 请求路径:https://{your_domain}/api/site-admin/openapi/members

  • 请求方法:POST

  • 请求体参数说明

    • id(可选):成员的唯一标识符,若不提供,系统将自动生成。
    • userId(必填):成员对应的用户唯一标识符,用于关联用户与成员身份。
    • spaceId(必填):成员所属空间的唯一标识符,明确成员所在的空间范围。
    • name(可选):成员的姓名,可用于更直观地识别成员。
    • teamIds(可选):成员所属部门的唯一标识符数组,用于明确成员在团队中的角色。
  • 请求体示例

{
  "id": "1234-213-12312",
  "userId": "usr123",
  "spaceId": "spc123",
  "name": "王五",
  "teamIds": ["custom_team1", "team2"],
  "createdAt": "2023-01-01T12:00:00Z"
}
  • 响应结果
    • 成功响应(HTTP 200):

响应示例数据

{
  "success": true,
  "code": 200,
  "data": {
    "id": "custome_user_id",
    "name": "lily",
    "userId": "custome_user_id",
    "email": "lily@example",
    "createdAt": "2023-01-01T12:00:00Z",
    "teams": [
      {
        "id": "custom_team_id_1",
        "name": "front",
        "parentId": "team_parent_id",
        "memberCount": 2,
        "createdAt": "2023-01-01T12:00:00Z"
      },
      {
        "id": "custom_team_id_2",
        "name": "back",
        "parentId": "team_parent_id",
        "memberCount": 2,
        "createdAt": "2023-01-01T12:00:00Z"
      }
    ]
  }
}

获取成员信息

  • 请求路径:https://{your_domain}/api/site-admin/openapi/members/{id}

  • 请求方法:GET

  • 请求路径参数:

    • id(必填):成员的唯一标识符,字符串类型
  • 响应结果

    • 成功响应(HTTP 200)

响应示例数据

{
  "success": true,
  "code": 200,
  "data": {
    "id": "custome_user_id",
    "name": "lily",
    "userId": "custome_user_id",
    "email": "lily@example",
    "createdAt": "2023-01-01T12:00:00Z",
    "teams": [
      {
        "id": "custom_team_id_1",
        "name": "front",
        "parentId": "team_parent_id",
        "memberCount": 2,
        "createdAt": "2023-01-01T12:00:00Z"
      },
      {
        "id": "custom_team_id_2",
        "name": "back",
        "parentId": "team_parent_id",
        "memberCount": 2,
        "createdAt": "2023-01-01T12:00:00Z"
      }
    ]
  }
}

更新成员部分信息

  • 请求路径:https://{your_domain}/api/site-admin/openapi/members/{id}

  • 请求方法:PUT

  • 请求路径参数:

    • id(必填):目标部门的唯一标识符,字符串类型
  • 请求体参数

    • name(可选):成员昵称
    • teamIds(可选):所属部门ID数组
  • 请求体示例

{
  "name": "simon",
  "teamIds": ["custom_team1", "team2"]
}
  • 响应结果
    • 成功响应(200)

响应示例数据

{
  "success": true,
  "code": 200,
  "data": {
    "id": "custome_user_id",
    "name": "lily",
    "userId": "custome_user_id",
    "email": "lily@example",
    "createdAt": "2023-01-01T12:00:00Z",
    "teams": [
      {
        "id": "custom_team_id_1",
        "name": "front",
        "parentId": "team_parent_id",
        "memberCount": 2,
        "createdAt": "2023-01-01T12:00:00Z"
      },
      {
        "id": "custom_team_id_2",
        "name": "back",
        "parentId": "team_parent_id",
        "memberCount": 2,
        "createdAt": "2023-01-01T12:00:00Z"
      }
    ]
  }
}

删除成员

  • 请求路径:https://{your_domain}/api/site-admin/openapi/members/{id}

  • 请求方法:DELETE

  • 请求路径参数

    • id(必填):成员的唯一标识符
  • 响应结果

    • 成功响应(HTTP 200)
  • 响应示例数据

{
  "success": true,
  "code": 200,
  "message": "SUCCESS"
}
bika cta

推荐阅读

推荐AI自动化模板

商品目录
一个包含产品和供应商表的产品目录模板。以售卖表带为例,记录表带的分类,材质,采购价格,供应商信息。
Product Feedback Analysis
This template is designed to help teams efficiently collect and analyze customer feedback. Users can upload reviews, feedback, or other relevant data to identify common issues. The customizable dashboard allows for easy viewing and analysis of data, ultimately enhancing the overall customer experience.
Product Feedback Form
The Product Feedback template is structured to collect and manage feedback efficiently. This template includes resources like a feedback form and a database, which together streamline the process of gathering, categorizing, and storing feedback data for product improvement.
Product/market fit system
This template is designed for a product/market fit system, featuring resources for collecting and analyzing user feedback. Key components include a product feedback form and survey response database, allowing the team to gather and structure user insights on the product’s value and improvement areas. The survey responses are organized into views, including one restricted to founders and managers. Additionally, a database for key product features supports the linkage of benefits and feedback insights, facilitating a comprehensive overview for product development and market alignment
Product Messaging Library
The Product Messaging Library Template organizes your product is messaging guidelines, ensuring consistent communication across teams and helping maintain a unified brand voice.
Program Communications Plan
The Program Communications Plan template is a key strategic document outlining necessary communication strategies and responsibilities for project success. It defines key messages, audiences, channels, and timelines, ensuring all stakeholders are informed and engaged throughout the project lifecycle, crucial for transparency, expectation management, and fostering collaboration