SuperAPI AI 工具集

iblai-agent-access

智能体与模型

查看项目

更新于 10-15 22:16

技能介绍

用途:管理 ibl.ai 智能体的基于角色的访问控制,决定谁可以编辑、与智能体对话或查看其分析数据。所有授权与撤销都通过同一个 mentor-access 写入端点完成。

认证与约定:基础 URL 为 https://api.iblai.app,每个请求需带 Authorization: Api-Token $IBLAI_API_KEY。路径变量中 {org} 对应 $IBLAI_ORG,{username} 对应 $IBLAI_USERNAME,{mentor} 为智能体唯一 id(UUID)。若尚未连接,先运行 /iblai-login 填充 IBLAI_ORG、IBLAI_USERNAME 和 IBLAI_API_KEY。

读取能力:通过 GET …/users/{username}/mentors/{mentor}/settings/ 解析数字型 mentor_id;通过 GET …/rbac/mentor-access/?mentor_id={id}&platform_key={org} 列出当前角色策略;通过 POST …/rbac/permissions/check/ 检查用户是否有搜索用户或群组的权限;通过 GET …/platform/users/ 和 GET …/rbac/groups/ 分别做用户与群组自动补全。

写入能力:POST https://api.iblai.app/dm/api/core/rbac/mentor-access/ 用于授予或撤销访问,请求体包含 platform_key、mentor_id、role(editor、chat 或 analytics_viewer),以及 users_to_add、users_to_remove、groups_to_add、groups_to_remove、emails_to_add、usernames_to_add 等数组字段。

限制与注意:写入端点使用数字型 mentor_id,而非 {mentor} UUID,需先从 settings/ 读取解析;每次 POST 只能指定一个角色,增删数组仅对该角色生效;搜索前应先调用 permissions/check/,若无 /users/ 或 /groups/ 权限则跳过对应自动补全;emails_to_add 和 usernames_to_add 可按标识符邀请,无需预先查询 id,而用户和群组需通过搜索读取获得数字 id 后再增删。