Skip to content

总览

TIP

本章节仅列出了所有的API接口,具体的使用方法请查看对应的章节。

API说明

类型说明备注
方法http
请求URLnbgui/v1若请求端与服务端为同一机器可用127.0.0.1代替,端口号为用户自行设置
调用方式同步调用,等待服务端完成执行并返回最终结果
字符编码UTF-8
请求格式JSON
响应格式JSON
请求类型见表格标题
开发语言任何能发起http请求的开发语言

GET类型请求

功能入口备注
Ping/ping进行客户端-服务端连通性测试
获取 Bot 列表/bot/list
获取 Bot 信息/bot/info/<id>其中id为Bot的uuid
获取 Bot 日志/bot/log/<id>
启动 Bot/bot/run/<id>若启动成功,返回Bot <id> started!
若已经在运行,则返回Bot <id> is already running!
停止 Bot/bot/stop/<id>若停止成功,返回Bot <id> stopped!
若没有运行/已经停止,则返回Bot <id> is not running!
重启 Bot/bot/restart/<id>若重启成功,返回Bot <id> restarted!
若没有运行,则返回Bot <id> is not running!
获取插件列表/plugin/list/<id><id>为Bot的uuid
获取被禁用的插件列表plugin/disabled/<id><id>为Bot的uuid
获取系统状态/system/status
获取系统平台/system/platform
获取Agent版本信息/version

POST类型请求

TIP

客户端在发送请求时,应在请求的body中以JSON格式包含这些参数。 详细用法见对应章节

功能入口备注
导入 Bot/bot/import
创建 Bot/bot/create
启用插件/plugin/enable
禁用插件/plugin/disable
安装插件/plugin/install
卸载插件/plugin/uninstall
安装适配器/adapter/install
安装驱动器/driver/install
重命名Bot/bot/rename/<id><id>为Bot的uuid

DELETE类型请求

功能入口备注
删除 Bot/bot/remove/<id><id>为Bot的uuid
永久删除 Bot/bot/dedelete/<id><id>为Bot的uuid,该入口会一同删除Bot的目录