【乐吾乐大屏可视化组态编辑器】API接口文档(pgsql)

API接口文档(pgsql)

在线使用:https://v.le5le.com/ 

采用前后端分离架构,乐吾乐后端服务提供一整套完整的web组态编辑器的所有数据接口,包含2D/3D图纸接口服务、文件接口服务和用户接口服务等,安装包版本提供后端可执行程序文件,后端源码版提供Java源码。用户也可以自行按照接口文档去实现部分必要的接口,参考接口文档如下:

全局规则

默认:所有接口返回通过是否包含error字段来判断结果成功。

•调用调用成功:直接返回数据,不能包含error字段

// 例如:请求用户信息返回结构
{"id": 1,"username": "用户名"
}
•调用失败时,返回: { error: '错误原因'}

Copy

// 例如:请求用户信息返回结构
{"error": "请先登录","xxx": "其他可选自定义错误信息"
}

Copy

以下接口除非特殊说明都需要携带以下参数

名称位置类型说明
Authorizationheaderstring用户登录token

大屏接口列表

获取登录信息

URL:

/api/account/profile

Method:

GET

参数

无需多余参数

返回

名称类型必选中文名
idstring用户id
accountstring账户
avatarUrlstring头像url
usernamestring用户名
phonestring
emailstring
teams[object]团队
idstring
namestring
companyobject公司
idstring
namestring
departmentobject部门
idstring
namestring
roles[string]角色
inviteCodestring邀请码
wechatstring关联微信账号
githubstring关联GitHub账号
sinastring关联新浪账号
vipinteger会员有效期截至时间
corporationobject企业
idstring
namestring
ownerboolean
licensestring营业执照

示例:

{"id": "44","account": "enim dolor","avatarUrl": "http://dummyimage.com/100x100","username": "夏超","phone": "18139363365","email": "e.snrsqift@qq.com","teams": [{"id": "39","name": "设反下门持"},{"id": "77","name": "院装先口任年"},{"id": "76","name": "研色问严"}],"company": {"id": "31","name": "来教元理但百"},"department": {"id": "94","name": "的分上适传候"},"roles": ["in sit qui","tempor in exercitation aliqua officia"],"inviteCode": "32","wechat": "aliqua ut aliquip in","github": "ut aliquip","sina": "consequat exercitation dolor cillum mollit","vip": 1662364456
}// 例如:请求用户信息返回结构
{error: '请先登录',xxx: '其他可选自定义错误信息'
}

Copy

新增大屏项目

URL:

/api/data/v/add

Method:

POST

Body

名称位置类型必选中文名说明
namebodystring数据项none
imagebodystring缩略图地址
databodyobject图纸数据
typebodystring数据分类
casebodystring应用场景
folderbodystring所属文件夹

示例:

// 下面为通用大屏项目文件示例
{"data": {//图纸数据"x": 32,"y": 32,"scale": 1,"pens": [...],"origin": {"x": 0,"y": 0},"center": {"x": 0,"y": 0},"paths": {},"template": "5580654","enableMock": true,"tags": ["方案"],"scaleMode": "1","groups": [],"iconUrls": [],"version": "1.0.23","component": false},"image": "xxx","name": "xxx","folder": "xxx","shared": true,"userFlag": 1 
}

Copy

返回

应包含新增大屏文件时,所有数据

// 下面为通用大屏文件示例
{"id": "018d16da-33fb-7f5b-80e8-0e3c32c23983","name": "新建项目","image": "xxx","data": {...},"shared": true,"userFlag": 1,"folder": "新建文件夹","ownerId": "xxx","ownerName": "xxx","createdAt": "2021-01-17T17:56:55.41911+08:00","updatedAt": "2021-01-17T17:56:55.41911+08:00"
}

Copy

更新大屏项目

URL:

/api/data/v/update

Method:

POST

Body

名称位置类型必选中文名说明
idbodystring数据Idnone
namebodystring数据项none
imagebodystring缩略图地址
databodyobject图纸数据
typebodystring数据分类
casebodystring应用场景

示例:

// 相对完整的更新示例
{"id": "xxx","data": {"x": 32,"y": 32,"scale": 1,"pens": [...],"origin": {"x": 0,"y": 0},"center": {"x": 0,"y": 0},"paths": {},"template": "186fe58c","tags": ["方案"],"groups": [],"version": "1.0.23","iconUrls": [],"component": false,"scaleMode": "1","enableMock": true,},"image": "xxx","name": "xxx","folder": "xxx","shared": true,"userFlag": 1 //1 - 用户方案 2 - 用户模板
}

Copy

返回

应包含新增大屏文件时,所有数据

// 下面为通用大屏文件示例
{"id": "018d16da-33fb-7f5b-80e8-0e3c32c23983","name": "新建项目","image": "xxx","data": {...},"shared": true,"userFlag": 1,"folder": "新建文件夹","ownerId": "xxx","ownerName": "xxx","createdAt": "2021-01-17T17:56:55.41911+08:00","updatedAt": "2021-01-17T17:56:55.41911+08:00"
}

Copy

获取大屏项目

URL:

/api/data/v/get

Method:

POST

Body

名称位置类型必选中文名说明
idbodystringnone
projectionbodystring返回字段英文逗号分隔,例如:id,name,data

示例:

{"id": "xxx"
}

Copy

返回

应包含新增大屏文件时,所有数据

// 下面为通用大屏文件示例
{"id": "xxx","name": "xxx","image": "xxx","data": {"x": 32,"y": 32,"pens": [...],"tags": ["模板"],"paths": {},"scale": 1,"center": {"x": 0,"y": 0},"groups": [],"origin": {"x": 0,"y": 0},"version": "1.0.23","iconUrls": [],"template": "2830eac2","component": false,"scaleMode": "1","enableMock": true},"shared": true,"folder": "xxx","teams": [],"ownerId": "xxx","ownerName": "xxx","updatedAt": "2021-01-17T17:56:55.41911+08:00"
}

Copy

删除大屏项目

URL:

/api/data/v/delete

Method:

POST

Body

{"id": "大屏项目id"
}

Copy

返回

没有特别要求,参考全局规则。

获取大屏项目列表

URL:

/api/data/v/list

Method:

POST

Query

{current: 1,pageSize: 1000,
}

Copy

Body

名称位置类型必选中文名说明
namebodystring模糊查询name属性none
folderbodystring所属文件夹none
systemFlagbodyinteger系统标识1 - 系统方案 2 - 系统模板。请求公共解决方案(非个人)时,必传
userFlagbodyinteger用户标识1 - 用户方案 2 - 用户模板
ownerIdbodystring创建者IDnone
ownerNamebodystring创建者名称none
departmentIdbodystring部门IDnone
teamIdbodystring团队IDnone
createdStartbodyinteger创建时间起始点none
createdEndbodyinteger创建时间截至点none
sharedbodybooleanfalse - 未分享 true - 分享 ,不传 - 全部
sortbodyobjectnone
keybodyinteger排序字段名> 0 升序,其他 降序
projectionbodystring返回字段英文逗号分隔,例如:id,name,data

示例:

{"userFlag": "1""projection":"id,name,image..."//返回字段,不传默认返回所有字段
}

Copy

返回

// 下面为通用大屏文件示例
{"total": 1,//总共项目数"list": [{"id": "018d16da-33fb-7f5b-80e8-0e3c32c23983","name": "新建项目","image": "xxx","shared": true,"userFlag": 1,"folder": "新建文件夹","ownerId": "xxx","ownerName": "xxx","createdAt": "2021-01-17T17:56:55.41911+08:00","updatedAt": "2021-01-17T17:56:55.41911+08:00"},...]
}

Copy

新增大屏组件

URL:

/api/data/v.component/add

Method:

POST

Body

同“大屏接口列表” - “新增大屏项目”,仅用户组件和系统组件标识不同,详见下方示例

// 下面为通用示例
{"data": {"x": 32,"y": 32,"scale": 1,"pens": [...],"origin": {"x": 0,"y": 0},"center": {"x": 0,"y": 0},"paths": {},"template": "c3e2009","enableMock": true,"tags": ["组件"],"scaleMode": "1","groups": [],"iconUrls": [],"component": true,"version": "1.0.23","componentDatas": [...]},"image": "xxx","name": "xxx","folder": "xxx","shared": true,"userFlag": 1//用户组件//"systemFlag":1//系统组件
}

Copy

返回

应包含新增大屏文件时的数据

// 下面为通用大屏文件示例
{"id": "018d16e5-9223-7539-bc58-f35a2e20ee8b","name": "新建项目","image": "xxx","data": {...},"shared": true,"userFlag": 1,"folder": "新建文件夹","ownerId": "xxx","ownerName": "xx","editorId": "xxx","editorName": "xx","createdAt": "2023-01-17T10:09:20.419817181Z","updatedAt": "2023-01-17T10:09:20.419817181Z"
}

Copy

更新大屏组件

URL:

/api/data/v.component/update

Method:

POST

Body

同“大屏接口列表” - “更新大屏项目”,仅用户组件和系统组件标识不同,详见下方示例

// 下面为通用示例
{"data": {"x": 32,"y": 32,"scale": 1,"pens": [...],"origin": {"x": 0,"y": 0},"center": {"x": 0,"y": 0},"paths": {},"template": "c3e2009","enableMock": true,"tags": ["组件"],"scaleMode": "1","groups": [],"iconUrls": [],"component": true,"version": "1.0.23","componentDatas": [...]},"image": "xxx","name": "xxx","folder": "xxx","shared": true,"userFlag": 1//用户组件//"systemFlag":1//系统组件
}

Copy

返回

应包含新增大屏文件时,所有数据

// 下面为通用大屏文件示例
{"id": "018d16e5-9223-7539-bc58-f35a2e20ee8b","name": "新建项目","image": "xxx","data": {...},"shared": true,"userFlag": 1,"folder": "新建文件夹","ownerId": "xxx","ownerName": "xx","editorId": "xxx","editorName": "xx","createdAt": "2023-01-17T10:09:20.419817181Z","updatedAt": "2023-01-17T10:09:20.419817181Z"
}

Copy

获取大屏组件

URL:

/api/data/v.component/get

Method:

POST

Body

{"id": "大屏组件id"
}

Copy

返回

应包含新增大屏文件时,所有数据

// 下面为通用示例
{"id": "018d16e5-9223-7539-bc58-f35a2e20ee8b","name": "新建项目","image": "xxx","data": {…},"shared": true,"userFlag": 1,"folder": "新建文件夹","ownerId": "xxx","ownerName": "xx","editorId": "xxx","editorName": "xx","createdAt": "2023-01-17T10:09:20.419817181Z","updatedAt": "2023-01-17T10:09:20.419817181Z"
}

Copy

删除大屏组件

URL:

/api/data/v.component/delete

Method:

POST

Body

{"id": "大屏组件id"
}

Copy

返回

没有特别要求,参考全局规则。

获取大屏组件列表

URL:

/api/data/v.component/list

Method:

POST

Query

{"current": 1,//当前第几页,默认1"pageSize": 1000,//每页记录数,默认10
}

Copy

Body

同“大屏接口列表” - “获取大屏项目列表”

示例:

{"userFlag": 1//用户组件//"systemFlag":1//系统组件"projection":"id,name,image..."//返回字段,不传默认返回所有字段
}

Copy

返回

{"total":3,"list":[{"id": "018d16e5-9223-7539-bc58-f35a2e20ee8b","name": "新建项目","image": "xxx","shared": true,"userFlag": 1,"folder": "新建文件夹","ownerId": "xxx","ownerName": "xx","editorId": "xxx","editorName": "xx","createdAt": "2023-01-17T10:09:20.419817181Z","updatedAt": "2023-01-17T10:09:20.419817181Z"},...]
}

Copy

获取3D组件列表

URL:

/api/data/3d/list

Method:

POST

Query

{"current": 1,//当前第几页,默认1"pageSize": 1000,//每页记录数,默认10
}

Copy

Body

同“大屏接口列表” - “获取大屏项目列表”

示例:

{"projection":"id,name,image..."//返回字段,不传默认返回所有字段
}

Copy

返回

{"total":1,"list":[{"id": "018d16e5-9223-7539-bc58-f35a2e20ee8b","name": "新建项目","image": "xxx","createdAt": "2023-01-17T10:09:20.419817181Z","updatedAt": "2023-01-17T10:09:20.419817181Z"}]
}

Copy

新建文件夹

URL:

/api/directory/add

Method:

POST

Body

{"fullpath": "/大屏/{case}/新建文件夹的名称"//case:方案|模板|组件|图片//示例:"fullpath": "/大屏/方案/新建文件夹"
}

Copy

返回

{"id": "018d16eb-8077-7252-89c9-aad43dd3d72f",//文件夹id"ownerId": "0182199f-42e0-70cd-809a-3a35b7e9b39d",//文件夹创建者id"fullpath": "/大屏/组件/新建文件夹",//文件夹完整路径"createdAt": "2024-01-17T10:15:49.111891848Z","updatedAt": "0001-01-01T00:00:00Z"
}

Copy

更新文件夹

URL:

/api/directory/update

Method:

POST

Body

{"oldFullpath": "xxx",//旧文件夹"newFullpath": "xxx"//新文件夹
}

Copy

返回

无特别要求

删除文件夹

URL:

/api/directory/delete

Method:

POST

Body

{"fullpaths": ["/大屏/方案/新建文件夹"//待删除文件夹],"physically": true//true-物理删除 false-逻辑删除
}

Copy

返回

无特别要求

获取文件夹列表

不超过16M的小文件,使用mongodb的二进制存储,非gridfs

URL:

/api/directory/list

Method:

POST

Query

{"current": 1,//当前第几页,默认1"pageSize": 1000,//每页记录数,默认10
}

Copy

Body

{"fullpath": "/大屏/{case}"//case:方案|模板|组件|图片
}

Copy

返回

{"total":1,"list":[{"id": "018d16eb-8077-7252-89c9-aad43dd3d72f","ownerId": "0182199f-42e0-70cd-809a-3a35b7e9b39d","fullpath": "/大屏/组件/新建文件夹","createdAt": "2024-01-17T10:15:49.111891848Z","updatedAt": "0001-01-01T00:00:00Z"}]
}

Copy

上传图片

URL:

/api/image/upload

Method:

POST

FormData

•filename:string 文件名,可选

•shared:string 是否共享,默认为true

•conflict:string directory+name 如果存在,处理方式:默认不穿覆盖;new-自动重命名为一个新文件;其他-不做任何操作,返回报错

•file:Blob 文件二进制

•directory:string 文件存放文件夹,例如:'/2D/缩略图'

返回

{"id": "018d1b1f-eb0b-7ca5-9a31-56269e3095a6","name": "test.png",//图片名称自动获取"fullname": "/2021/0118/1/1/3d5_4680f5a0.png",//图片完整文件名"url": "/2021/0118/1/1/3d5_4680f5a0.png",//图片路径"directory": "/大屏/图片/新建文件夹",//图片所在文件夹"shared": true,"size": 1871165,"ownerId": "xxx","ownerName": "xxx","createdAt": "2021-01-18T05:51:33.131708608Z","updatedAt": "0001-01-01T00:00:00Z"
}

Copy

删除图片

URL:

/api/files/delete

Method:

POST

Body

{"fullnames": ["/2021/0118/1/1/3d5_4680f5a0.png"//图片返回的完整文件名],"physically": true//true-物理删除 false-逻辑删除
}

Copy

返回

无特别要求

获取文件列表

URL:

/api/file/list

Method:

POST

Query

名称类型必选说明
currentstring当前页
pageSizestring每页记录数

Body

名称类型必选说明
tagstringnone
sharedbooleanfalse - 未分享 true - 分享 ,不传 - 全部
typestringnone
namestringnone
directorystringnone
childrenboolean包含所有子目录文件,联合directory使用
deletedinteger0 - 未删除, 1 - 删除 ,其他 - 全部
remarksstring备注
sortobject检索结果排序规则,大于0:升序;小于0:降序
{"tag": "string","shared": true,"type": "string","name": "string","directory": "string","children": true,"deleted": 0,"remarks": "string","sort": {"owner_id":   1,"created_at": -1}
}

Copy

返回

{"total": 0,"list": [{"filename": "string","metadata": {}}]
}

Copy

获取素材或png、svg分组列表

用于获取远程指定类型(素材、图元(png、svg))的静态图片资源目录

URL:

/api/assets/folders

Method:

POST

Body

获取素材分组列表
{"path": "v/material" 
}
获取png分组列表
{"path": "png"  
}
获取svg分组列表
{"path": "svg" 
}

Copy

返回

{"list": ["常用图标","智能家居","标题","电信机房","装饰","面板"],"prefix": false,"total":6
}
或
{"list": ["v/material/常用图标/","v/material/智能家居/","v/material/标题/","v/material/电信机房/","v/material/装饰/","v/material/面板/"],"prefix": true,"total":6
}

Copy

获取素材或png、svg文件列表

用于获取远程指定类型(素材、图元(png、svg))的静态图片资源文件列表

URL:

/api/assets/files

Method:

POST

Body

获取素材分组列表
{"path": "v/material" 
}
获取png分组列表
{"path": "png"  
}
获取svg分组列表
{"path": "svg" 
}

Copy

返回

{"list": ["v/material/常用图标/地图标注.svg","v/material/智能家居/太阳能板温度.png","v/material/智能家居/指标.png",],"prefix": true,"total":3
}
//或者
{"total": 2,"list": ["png/2.5D-采暖系统","png/2.5D-制冷站"],"prefix": true
}

Copy

新增数据源

URL:

/api/data/datasources/add

Method:

POST

Body

不同类型,数据结构不一样,建议为文档类型

// 订阅实时数据类型 
{"name": "xxx","type": "subscribe","data": {"protocol": "http","url": "/xxx","options": {"clientId": "","username": "","password": "","customClientId": false},"httpTimeInterval": 1000,"headers": "","method": "GET","body": ""}
}// 向后台发送类型 
{"name": "test","data": {"body": "","headers": "","httpTimeInterval": 1000,"method": "GET","options": {"clientId": "test","customClientId": true,"password": "test","username": "test"},"protocol": "mqtt","topics": "test","url": "/xxx"},"shared": false,"type": "publish","createdAt": "2024-01-18T09:30:53.856752442Z","updatedAt": "2024-01-18T09:30:53.856752442Z"
}
// 数据集类型
{"name": "test","type": "dataset","data": {"devices": [//数据集{"device": "设备1","label": "整数0-100","id": "data-001","type": "integer","mock": "0-100"}],"mode": "",//数据方式,默认 api-HTTP请求,空字符串-自定义"url": ""//获取数据集的接口,}
}

Copy

返回

应包含新增时,所有数据

// 下面为通用示例
{"id": "018d16f2-55e5-743c-a498-0053afd9b219","name": "test","data": {"body": "","headers": "","httpTimeInterval": 1000,"method": "GET","options": {"clientId": "","customClientId": false,"password": "","username": ""},"protocol": "http","url": "/xxxx"},"shared": false,"type": "subscribe","ownerId": "xxx","ownerName": "xxx","editorId": "xxx","editorName": "xxx","createdAt": "2024-01-17T10:23:16.965635509Z","updatedAt": "2024-01-17T10:23:16.965635509Z"
}

Copy

更新数据源

URL:

/api/data/datasources/update

Method:

POST

Body

// 订阅实时数据类型 
{"id": "018d1be8-bc20-756d-bf81-7f1218668059","name": "xxx","data": {"url": "/xxx","body": "","method": "GET","headers": "","options": {"clientId": "","password": "","username": "","customClientId": false},"protocol": "http","httpTimeInterval": 1000},"type": "subscribe",
}// 向后台发送类型 
{"id": "018d1be8-bc20-756d-bf81-7f1218668059","type": "publish","name": "xxx""data": {"protocol": "http","options": {"clientId": "","password": "","username": "","customClientId": false},"httpTimeInterval": 1000,"headers": "","method": "GET","body": "","url": "/xxx"},
}// 数据集类型
{"id": "018d1be8-bc20-756d-bf81-7f1218668059","name": "test","type": "dataset","data": {"devices": [//数据集{"device": "设备1","label": "整数0-100","id": "data-001","type": "integer","mock": "0-100"}],"mode": "",//数据方式,默认 api-HTTP请求,空字符串-自定义"url": ""//获取数据集的接口,}
}

Copy

返回

新增是配置的所有数据

// 下面为通用大屏文件示例
{"id": "018d16f2-55e5-743c-a498-0053afd9b219","name": "test","data": {"body": "","headers": "","httpTimeInterval": 1000,"method": "GET","options": {"clientId": "","customClientId": false,"password": "","username": ""},"protocol": "http","url": "/xxxx"},"shared": false,"type": "subscribe","createdAt": "2024-01-17T10:23:16.965635509Z","updatedAt": "2024-01-17T10:23:16.965635509Z"
}

Copy

获取数据源

URL:

/api/data/datasources/get

Method:

POST

Body

{"id": "数据源id"
}

Copy

返回

应包含新增时,所有数据

// 订阅实时数据类型 
{"id": "018d16f2-55e5-743c-a498-0053afd9b219","name": "xxx","data": {"url": "/xxx","body": "","method": "GET","headers": "","options": {"clientId": "","password": "","username": "","customClientId": false},"protocol": "http","httpTimeInterval": 1000},"createdAt": "2024-01-17T10:23:16.965635509Z","updatedAt": "2024-01-17T10:23:16.965635509Z"
}// 向后台发送类型 
{"id": "018d16f2-55e5-743c-a498-0053afd9b219","name": "test","data": {"body": "","headers": "","httpTimeInterval": 1000,"method": "GET","options": {"clientId": "","customClientId": false,"password": "","username": ""},"protocol": "http","url": "/xxxx"},"shared": false,"type": "subscribe","createdAt": "2024-01-17T10:23:16.965635509Z","updatedAt": "2024-01-17T10:23:16.965635509Z"
}// 数据集类型
{"id": "xxx","name": "test","data": {"devices": [//数据集{"device": "设备1","label": "整数0-100","id": "data-001","type": "integer","mock": "0-100"}],"mode": "",//数据方式,默认 api-HTTP请求,空字符串-自定义"url": ""//获取数据集的接口,}"createdAt": "2024-01-17T10:23:16.965635509Z","updatedAt": "2024-01-17T10:23:16.965635509Z"
}

Copy

删除数据源

URL:

/api/data/datasources/delete

Method:

POST

Body

{"id": "数据源id"
}

Copy

返回

没有特别要求,参考全局规则。

后台管理接口列表

2D图纸列表

URL:

/api/data/2d/list

Method:

POST

Query

{"current": 1,//当前第几页,默认1"pageSize": 1000,//每页记录数,默认10
}

Copy

Body

同“大屏接口列表” - “获取大屏项目列表”

示例:

{"name": "文件名"// 模糊查询
}

Copy

返回

// 下面为通用文件列表示例
{"total": 1,//总共项目数"list": [{"id": "018d16da-33fb-7f5b-80e8-0e3c32c23983","name": "新建项目","image": "xxx","shared": true,"userFlag": 1,"folder": "新建文件夹","ownerId": "xxx","ownerName": "xxx","createdAt": "2021-01-17T17:56:55.41911+08:00","updatedAt": "2021-01-17T17:56:55.41911+08:00"}]
}

Copy

3D图纸列表

URL:

/api/data/3d/list

Method:

POST

Query

{"current": 1,//当前第几页,默认1"pageSize": 1000,//每页记录数,默认10
}

Copy

Body

同“大屏接口列表” - “获取大屏项目列表”

示例:

{"name": "文件名"// 模糊查询
}

Copy

返回

// 下面为通用文件列表示例
{"total": 1,//总共项目数"list": [{"id": "018d1a96-2d16-7094-b298-fbaee854be36","name": "测试","image": "/2021/0118/1/1/7aa4853c-b93f-4272-96f5-42d8c0e0a189_c1a9dede.png","shared": false,"ownerId": "xxx","ownerName": "xxx","createdAt": "2021-01-18T11:21:06.070895+08:00","updatedAt": "2021-01-18T11:21:06.070895+08:00"}]
}

Copy

大屏项目列表

URL:

/api/data/v/list

Method:

POST

Query

{"current": 1,//当前第几页,默认1"pageSize": 1000,//每页记录数,默认10
}

Copy

Body

同“大屏接口列表” - “获取大屏项目列表”

示例:

{"name": "文件名"// 模糊查询
}

Copy

返回

// 下面为通用大屏文件示例
{"total": 1,//总共项目数"list": [{"id": "018d16da-33fb-7f5b-80e8-0e3c32c23983","name": "新建项目","image": "xxx","shared": true,"userFlag": 1,"folder": "新建文件夹","ownerId": "xxx","ownerName": "xxx","createdAt": "2021-01-17T17:56:55.41911+08:00","updatedAt": "2021-01-17T17:56:55.41911+08:00"},...]
}

Copy

更新大屏项目

同“大屏接口列表” - “更新大屏项目”

用户列表

URL:

/api/operation/account/list

Method:

POST

Query

名称类型必选说明
currentstring当前页
pageSizestring每页记录数
qstring模糊搜索用户
departmentstring部门id
teamstring团队id

示例:

{"current": 1,//当前第几页,默认1"pageSize": 1000,//每页记录数,默认10
}

Copy

Body

{"q": "模糊查询,支持用户名、邮箱、手机号等多字段同时模糊查询"
}

Copy

返回

名称类型必选中文名
totalnumbertrue总数
list[object]true用户信息列表

用户信息:

名称类型必选中文名
idstring用户id
accountstring账户
avatarUrlstring头像url
usernamestring用户名
phonestring
emailstring
teams[object]团队
idstring
namestring
companyobject公司
idstring
namestring
departmentobject部门
idstring
namestring
roles[string]角色
inviteCodestring邀请码
wechatstring关联微信账号
githubstring关联GitHub账号
sinastring关联新浪账号
vipinteger会员有效期截至时间
corporationobject企业
idstring
namestring
ownerboolean
licensestring营业执照
{"total":3,"list":[{"id": "xxx","createdAt": "xxx","department": {"id": "666666666666666666666666","name": "乐吾乐科技"},"email": "","phone": "xxxxxxx","roles": ["系统管理员","运营管理员"],"teams": [],"username": "Alsmile",}]
}

Copy

更新用户信息

URL:

/api/operation/account/update

Method:

POST

Body

同“大屏接口列表” - “用户列表”返回的用户信息字段

{"id": "xxx""xxx": "其他可选"
}

Copy

返回

{"id": "xxx",  "xxx": "其他可选"
}

Copy

获取用户头像

URL:

/api/account/avatar/{id}

Method:

GET

Params

名称类型必选说明
idstring用户id

返回

头像文件的二进制内容

获取用户统计信息

URL:

/api/account/statistics

Method:

GET

参数

不需要额外参数

返回

名称类型必选中文名说明
userIdstring用户IDnone
usedinteger已使用云盘空间容量none
capacityinteger可使用云盘空间容量none
expiredstring云盘空间容量到期时间none
VipDataLimitobject允许保存数据最大个数VIP会员用户允许保存数据(2D,3D,大屏)最大个数,普通用户返回免费个数。
VipDataCountobject实际保存数据个数实际已经保存数据(2D,3D,大屏)个数
DeploymentPackageLimitobject允许下载离线部署包的次数大屏、3D、2D
DeploymentPackageCountobject已经使用的下载离线部署包次数none
{"userId": "01890b98-2a48-70d0-8002-c2db3cf46b85","used": 26723050,"capacity": 10,"expired": "2025-10-23T11:28:36.574333+08:00","vipDataLimit": {"2d": 1000,"3d": 1000,"v": 1000},"vipDataCount": {"2d": 17,"v": 2},"deploymentPackageLimit": {"2d": 5},"deploymentPackageCount": {"2d": 1}
}

Copy

获取统计信息

URL:

/api/operation/statistics

Method:

POST

参数

不需要额外参数

返回

名称类型必选中文名
accountCountnumber注册用户总数
vipCountnumber有效VIP用户总数:截止当前查询时间点,还没有过期的VIP用户总数
orderCountnumber非取消状态的订单总数
total2dnumber2D图纸数据总数(不包含2D组件)
last302dnumber创建时间为最近30天的2D图纸数据总数(不包含2D组件)
last602dnumber创建时间为最近60天的2D图纸数据总数(不包含2D组件)
total3dnumber同上(不包含组件)
last303dnumber同上(不包含组件)
last603dnumber同上(不包含组件)
totalVnumber同上(不包含组件)
last30Vnumber同上(不包含组件)
last60Vnumber同上(不包含组件)
aggregationSignup[object]近10天,每天的注册账号数。
aggregationVip[object]近10天,每天的充值VIP会员数。(订单状态是完成的订单)
aggregationCloud[object]近10天,每天的充值云盘会员数。(订单状态是完成的订单)
aggregation2d[string]近10天,每天的2D数据创建数。(不包含组件)
aggregation3d[object]近10天,每天的3D数据创建数。(不包含组件)
aggregationV[object]近10天,每天的大屏数据创建数。(不包含组件)

示例

{"accountCount": 18660,"vipCount": 100,"orderCount": 236,"total2d": 24776,"last302d": 33,"last602d": 33,"total3d": 545,"last303d": 16,"last603d": 70,"totalV": 199,"last30V": 18,"last60V": 34,"aggregationSignup": [{"count": 2,"date": "2024-01-04T00:00:00-05:00"}],"aggregationVip": [{"count": 2,"date": "2024-01-09T00:00:00-05:00"},{"count": 7,"date": "2024-01-10T00:00:00-05:00"},{"count": 1,"date": "2024-01-11T00:00:00-05:00"}],"aggregationCloud": null,"aggregation2d": [{"count": 5,"date": "2024-01-04T00:00:00-05:00"},{"count": 1,"date": "2024-01-08T00:00:00-05:00"},{"count": 1,"date": "2024-01-09T00:00:00-05:00"},{"count": 3,"date": "2024-01-10T00:00:00-05:00"},{"count": 6,"date": "2024-01-11T00:00:00-05:00"},{"count": 2,"date": "2024-01-12T00:00:00-05:00"}],"aggregation3d": [{"count": 1,"date": "2024-01-03T00:00:00-05:00"},{"count": 3,"date": "2024-01-08T00:00:00-05:00"},{"count": 1,"date": "2024-01-10T00:00:00-05:00"}],"aggregationV": [{"count": 3,"date": "2024-01-07T00:00:00-05:00"},{"count": 6,"date": "2024-01-10T00:00:00-05:00"},{"count": 2,"date": "2024-01-12T00:00:00-05:00"}]
}

Copy

新建部门信息

URL:

/api/operation/department/create

Method:

POST

Body

名称类型必选中文名
namestring名称
parentIdstring父id
leaderstring负责人

{"name": "名称","parentId": "父部门ID","leader":"xxx"
}

Copy

返回

{"id": "xxx",  "name": "名称","parentId": "父部门ID","leader":"xxx"
}

Copy

更新部门信息

URL:

/api/operation/department/update

Method:

POST

Body


{"name": "名称","parentId": "父部门ID","leader":"xxx"
}

Copy

返回

{"id": "xxx",  "name": "名称","parentId": "父部门ID","leader":"xxx"
}

Copy

删除部门

URL:

/api/operation/department/delete

Method:

POST

Body


{"id": "部门ID",
}

Copy

返回

无特别要求

获取部门列表

URL:

/api/account/departments

Method:

GET

Query

名称类型必选说明
qstring部门名称,模糊查询
currentstring当前页
pageSizestring每页记录数

返回

{"total": 1,"list": [{"id": "xxx",  "name": "名称","parentId": "父部门ID","leader":"xxx"}]
}

Copy

获取企业信息文件内容

URL:

/api/enterprise

Method:

GET

参数

无需多余参数

返回

{"helps": [{"name": "产品介绍","url": "https://doc.le5le.com/document/118756411"},{"name": "快速上手","url": "https://doc.le5le.com/document/119363000"},{"name": "使用手册","url": "https://doc.le5le.com/document/118764244"},{"divider": true,"name": "快捷键","url": "https://doc.le5le.com/document/119620214"},{"divider": true,"name": "企业服务与支持","url": "https://doc.le5le.com/document/119296274"},{"name": "关于我们","url": "https://le5le.com/about.html"}],"home": "https://le5le.com","name": "乐吾乐"
}

Copy

用户中心接口列表

2D图纸列表

URL:

/api/data/2d/list

Method:

POST

Query

{"current": 1,//当前第几页,默认1"pageSize": 1000,//每页记录数,默认10
}

Copy

Body

同“大屏接口列表” - “获取大屏项目列表”

示例:

{"name": "文件名",// 模糊查询"teamId":""//团队id,可不传
}

Copy

返回

// 下面为通用文件列表示例
{"total": 1,//总共项目数"list": [{"id": "018d16da-33fb-7f5b-80e8-0e3c32c23983","name": "新建项目","image": "xxx","shared": true,"userFlag": 1,"folder": "新建文件夹","ownerId": "xxx","ownerName": "xxx","createdAt": "2021-01-17T17:56:55.41911+08:00","updatedAt": "2021-01-17T17:56:55.41911+08:00"}]
}

Copy

3D图纸列表

URL:

/api/data/3d/list

Method:

POST

Query

{"current": 1,//当前第几页,默认1"pageSize": 1000,//每页记录数,默认10
}

Copy

Body

同“大屏接口列表” - “获取大屏项目列表”

示例:

{"name": "文件名",// 模糊查询"teamId":""//团队id,可不传
}

Copy

返回

// 下面为通用文件列表示例
{"total": 1,//总共项目数"list": [{"id": "018d1a96-2d16-7094-b298-fbaee854be36","name": "测试","image": "/2021/0118/1/1/7aa4853c-b93f-4272-96f5-42d8c0e0a189_c1a9dede.png","shared": false,"ownerId": "xxx","ownerName": "xxx","case":"",//场景"createdAt": "2021-01-18T11:21:06.070895+08:00","updatedAt": "2021-01-18T11:21:06.070895+08:00"}]
}

Copy

大屏项目列表

URL:

/api/data/v/list

Method:

POST

Query

{"current": 1,//当前第几页,默认1"pageSize": 1000,//每页记录数,默认10
}

Copy

Body

同“大屏接口列表” - “获取大屏项目列表”

示例:

{"name": "文件名"// 模糊查询"teamId":""//团队id,可不传
}

Copy

返回

// 下面为通用大屏文件示例
{"total": 1,//总共项目数"list": [{"id": "018d16da-33fb-7f5b-80e8-0e3c32c23983","name": "新建项目","image": "xxx","shared": true,"userFlag": 1,"folder": "新建文件夹","ownerId": "xxx","ownerName": "xxx","createdAt": "2021-01-17T17:56:55.41911+08:00","updatedAt": "2021-01-17T17:56:55.41911+08:00"},...]
}

Copy

获取消息列表

URL:

/api/message/list

Method:

POST

Params:

•current 当前页

•pageSize 每页请求数量

Body:

{"q": "",//模糊查询"read": false //是否已读  undefind全部消息 true已读消息 fasle未读消息
}

Copy

返回:

{"list": [{"id": "", //id"title": "a", //标题"html": "a", //内容"to": null, //接收方用户id"from": null,  //发送方用户id"data": null, //数据"read": null, //是否已读"createdAt": "2023-09-14T09:59:33.845377+08:00","deletedAt": null}//...],"total": 2
}

Copy

获取未读消息数量

URL:

/api/message/unread/count

Method:

POST

返回:

{"unread": 1 //未读数量
}

Copy

消息标为已读

URL:

/api/message/read

Method:

POST

Body:

{"ids": ["" //消息id列表]
}

Copy

返回:

{}

全部消息标为已读

URL:

/api/message/read/all

Method:

POST

Body:

{}

返回:

{}

删除消息

URL:

/api/message/delete

Method:

POST

Body:

{"ids": [ //消息id列表""]
}

Copy

返回:

{}

获取团队列表

URL:

/api/account/teams

Method:

GET

返回:

{"list": [{"id": "018615fb-1188-70b5-8063-534123f564e3","name": "zzz","avatarUrl": "","description": "测试","ownerId": "0178f286-96d0-70cd-809a-3a16f96435e1","inviteLink": null,"inviteExpiration": null,"inviteApprove": null,"createdAt": "0001-01-01T00:00:00Z","isAdmin": 10}//...],"total": 1
}

Copy

获取团队成员

URL:

/api/account/team/members

Method:

POST

Params:

•current 当前页

•pageSize 每页数量

Body:

{teamId:""//团队id
}

Copy

返回:

{"list": [{"teamId": "","userId": "用户id","username": "",//用户名"isAdmin": 10, //管理员权限, 10 创建者(管理员) 1管理员 0普通用户"pending": false,"createdAt": null},//...],"total": 2
}

Copy

更新团队成员管理权限

URL:

/api/account/team/admin

Method:

POST

Body:

{"teamId": "", //团队id"userId": "",//团队成员id"isAdmin": 1 //权限
}

Copy

返回:

{"teamId": "", //团队id"userId": "",//团队成员id"isAdmin": 1 //权限
}

Copy

移除团队成员

URL:

/api/account/team/member/delete

Method:

POST

Body:

{"teamId": "", //团队id"userId": "",//团队成员id
}

Copy

返回:

{}

创建团队

URL:

/api/account/team/create

Method:

POST

Body:

{"show": true,"files": [],"avatarUrl": "",//头像"name": "",//部门名称"saving": true,"description": "" //部门描述
}

Copy

返回:

{"id": "", //团队id"name": "","avatarUrl": "","description": "","ownerId": "0178f286-96d0-70cd-809a-3a16f96435e1","inviteLink": null,"inviteExpiration": null,"inviteApprove": null,"createdAt": "2024-01-29T09:37:05.565137203Z","isAdmin": null
}

Copy

删除团队

URL:

/api/account/team/delete

Method:

POST

Body:

{"id": "" //团队id
}

Copy

返回:

{}

更新团队信息

URL:

/api/account/team/update

Method:

POST

Body:

{"id": "", //团队id 必传"avatarUrl":"",//"description":"",//团队描述"name":"",//团队名称"inviteLink": true,//允许通过邀请链接加入"inviteApprove": true,//邀请链接加入规则,true表示需要管理员审核"inviteExpiration": ""//邀请链接有效期//... 改什么传什么
}

Copy

返回:

{id:""//团队id
}

Copy

查找账号

URL:

/api/account/find

Method:

POST

Body:

{account: ""//账号
}

Copy

返回:

{"id": "",//用户id"username": "", //用户名"createdAt": "0001-01-01T00:00:00Z","updatedAt": "0001-01-01T00:00:00Z"
}

Copy

团队邀请人员

URL:

/api/account/team/invite

Method:

POST

Body:

{"teamId": "", //团队id"teamName": "",//团队名称"memberId": "",//被邀请成员id"memberName": ""//被邀请成员用户名
}

Copy

返回:

{}

获取账号信息

URL:

/api/account/detail

Method:

POST

返回:

{"id": "","phone": "","username": "","avatarUrl":"",//头像地址"roles": [],//角色"departmentId": "",//部门id"departmentName": "", //部门名称// "vip": "2027-06-02T09:28:34.053+08:0",//vip到期时间// "vipData": { //vip可存图纸数量//     "2d": 2000,//     "3d": 2000,//     "v": 2000// },"teamList": [{"id": "",//团队id"name": "" //团队名称},//...],"createdAt": "","updatedAt": ""
}

Copy

更新账号信息

URL:

/api/account/profile/update

Method:

POST

BODY:

{avatarUrl:""//改什么传什么,例如改头像
}

Copy

返回:

{}

上传头像

URL:

/api/image/upload

Method:

POST

FormData

•file:Blob 文件二进制

•directory:string 文件存放文件夹,'/头像'

返回

{"id": "","name": "test.png",//图片名称自动获取"fullname": "",//图片完整文件名"url": "",//图片路径"directory": "/头像",//图片所在文件夹"shared": true,"size": 1871165,"ownerId": "xxx","ownerName": "xxx","createdAt": "2021-01-18T05:51:33.131708608Z","updatedAt": "0001-01-01T00:00:00Z"
}

Copy

更新登录账号

URL:

/api/account/account/update

Method:

POST

BODY:

{"account": ""//登录账号
}

Copy

返回: {}

更新邮箱

URL:

/api/account/email/update

Method:

POST

Body:

{"show": true,"email": "",//邮箱"code": "",//动态验证码"captcha": ""//图形验证码
}

Copy

返回:

{}

获取图片验证码

URL:

/api/account/captcha?t=时间戳

Method:

GET

返回:

图片资源地址

向邮箱发送动态验证码

URL:

/api/account/email/update

Method:

POST

Body:

{"email": "", //邮箱// "code": "", //图形验证码"type": "email" //类型
}

Copy

返回:

{}

修改密码

URL:

/api/account/password/update

Method:

POST

Body:

{"code": "",//当前密码"password": "" //新密码
}

Copy

返回:

{}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/53942.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

长短期记忆网络和UKF的结合|Python代码例程

结合长短期记忆网络(LSTM)和无迹卡尔曼滤波器(UKF)的技术在机器人导航和状态估计中具有广泛的应用前景。 文章目录 结合LSTM和UKF的背景结合LSTM和UKF的优势应用实例研究现状Python代码示例结合LSTM和UKF的背景 长短期记忆网络(LSTM)是一种特殊的递归神经网络(RNN),…

电巢科技携Ecosmos元宇宙产品亮相第25届中国光博会

第25届中国国际光电博览会(“CIOE中国光博会”)今日在深圳国际会展中心盛大开幕。本届博览会以“光电引领未来,驱动应用创新”为主题,吸引了全球超过3700家优质光电企业参展,展示了光电产业的最新成果和前沿技术。 电…

小程序面试题八

一、微信小程序如何处理页面间的数据通信? 微信小程序处理页面间的数据通信,可以采用多种方式,这些方法根据具体需求和场景的不同而有所选择。以下是几种常见的页面间数据通信方式: 1. URL 传递参数 适用场景:适用于…

动手学深度学习(pytorch土堆)-04torchvision中数据集的使用

CIFAR10 CIFAR-10 数据集由 10 个类的 60000 张 32x32 彩色图像组成,每个类有 6000 张图像。有 50000 张训练图像和 10000 张测试图像。 数据集分为 5 个训练批次和 1 个测试批次,每个批次有 10000 张图像。测试批次包含每个类中随机选择的 1000 张图像…

React 嵌套类名样式不生效

修改前 父级.blog样式生效&#xff0c;子级.circle样式不生效 // app/blog/page.js import styles from "./page.module.scss"export default function Blog () {return (<div className{styles.blog}><div classNamecircle><div /></div>…

【基础算法总结】位运算

目录 一&#xff0c;常见位运算操作总结二&#xff0c;算法原理和代码实现191.位1的个数338.比特位计数461.汉明距离面试题01.01.判断字符是否唯一268.丢失的数字371.两整数之和136.只出现一次的数字137.只出现一次的数字II260.只出现一次的数据III面试题17.19.消失的两个数字 …

DIODE:超高分辨率室内室外数据集(猫脸码客 第186期)

亲爱的读者们&#xff0c;您是否在寻找某个特定的数据集&#xff0c;用于研究或项目实践&#xff1f;欢迎您在评论区留言&#xff0c;或者通过公众号私信告诉我&#xff0c;您想要的数据集的类型主题。小编会竭尽全力为您寻找&#xff0c;并在找到后第一时间与您分享。 在计算…

抗菌肽;Parasin I;KGRGKQGGKVRAKAKTRSS;CAS号:219552-69-9

【Parasin I 简介】 Parasin I是一种抗菌肽&#xff0c;由19个氨基酸组成&#xff0c;最初从鲶鱼的皮肤粘液中分离得到。它具有广谱的抗菌活性&#xff0c;能够有效对抗革兰氏阳性菌和革兰氏阴性菌&#xff0c;包括一些对传统抗生素具有耐药性的菌株。 【中文名称】抗菌肽 Par…

USB摄像头视频流转RTSP流

一、VLC查看USB摄像头视频流原理&#xff1a; USB摄像头的工作原理与VLC播放其他视频文件类似&#xff0c;主要区别在于视频流的来源是实时捕获的&#xff0c;而不是预先录制的文件。如果使用VLC将USB摄像头的视频流作为RTSP服务器广播&#xff0c;需要进一步配置 二、VLC查看…

Java 设计模式-状态模式

目录 一. 概述 二. 主要角色 三. 代码示例 四. 优缺点 优点&#xff1a; 缺点&#xff1a; 五. 常见应用场景 一. 概述 状态模式是一种行为设计模式&#xff0c;它允许一个对象在其内部状态改变时改变它的行为。对象看起来好像修改了它的类。状态模式把所有的与一个特定…

scipy中稀疏矩阵特征值问题概述

在Python的scipy库中&#xff0c;这三种算法——ARPACK、LOBPCG、和AMG——都是用于求解稀疏矩阵特征值问题的数值方法。它们各自有不同的特性和适用场景&#xff0c;以下是详细说明&#xff1a; 1. ARPACK (Arnoldi Package) ARPACK&#xff08;Arnoldi Package&#xff09;…

Android前台服务如何在后台启动activity?

本来最近在开发一个app保活另外一个app的功能&#xff0c;方案介绍如下&#xff1a; 应用A 启动一个前台服务保活自己应用A 用grpc连接应用B(服务端)是否存活如果发现B不存活&#xff0c;则在服务中拉起B 这次没有做好调研&#xff0c;直接开始了开发工作&#xff0c;等grpc都…

新型 Vo1d 恶意软件曝光,超130万台安卓电视设备已中招

近日&#xff0c;有攻击者使用一种新的 Vo1d 后门恶意软件感染了 130 余万台安卓电视流媒体盒&#xff0c;使得攻击者能够完全控制这些设备。 Android TV是谷歌针对智能电视和流媒体设备推出的操作系统&#xff0c;为电视和远程导航提供了优化的用户界面&#xff0c;集成了谷歌…

MySQL--库的操作

文章目录 1.创建数据库2.创建数据库案例3.字符集和校验规则3.1默认字符集3.2默认校验规则3.3查看系统默认字符集以及校验规则3.4查看数据库支持的字符3.5查看数据库支持的字符集校验规则3.6校验规则对数据库的影响不区分大小写查询&#xff1a;排序结果&#xff1a;区分大小写查…

GO 反射

文章目录 基本概念与语法1. **获取类型和值**2. **反射修改值**3. **检查类型种类&#xff08;Kind&#xff09;** 反射的高级使用场景1. **结构体字段操作**2. **调用函数**3. **动态创建和修改切片、映射**4. **JSON 序列化/反序列化**5. **类型安全的通用函数**6. **动态生成…

架构师白话分布式系统

对于分布式系统的定义,大致可以理解为如下的两个点 分布式系统从整体的体量来说,它内部是由很多的服务器、服务实例组成。所提供的用户服务是由一组相互独立运行的服务器来提供。对于用户来说,这个多服务器的系统就跟一个服务器一样,感觉不到每个单独的服务器实例的存在。从…

JSON串

JSON在客户端的使用 JSON 字符串的格式是基于键值对的数据结构&#xff0c;用于表示结构化数据。它遵循严格的语法规则&#xff0c;常用于前后端数据交互。 1. 基本结构 JSON 数据结构由两种主要元素构成&#xff1a; 对象&#xff08;Object&#xff09;&#xff1a;用花括…

小阿轩yx-Zabbix企业级分布式监控环境部署

小阿轩yx-Zabbix企业级分布式监控环境部署 前言 “运筹帷幄之中&#xff0c;决胜千里之外”监控在 IT 运维中占据着重要地位&#xff0c;按比例说占 30% 也不为过在监控系统开源软件中有很多可选择的工具&#xff0c;但是真正符合要求的、能够真正解决业务问题的监控系统软件…

TCP与HTTP的关系

这是我面试遇到的问题&#xff0c;整理下来了&#xff0c;希望对大家有帮助&#xff01; 首先&#xff1a; TCP是传输控制协议&#xff0c;他在传输层 HTTP是超文本传输协议&#xff0c;在应用层 应用层的协议通常需要借助传输层的协议来实现网络通信从而访问网页等资源。 …

UML的图及其他图补充

一、UML图 1.类图 ‌类图‌是统一建模语言&#xff08;UML&#xff09;中的一种静态结构图&#xff0c;主要用于描述软件系统的静态结构。它显示了模型中的类、类的内部结构以及它们与其他类的关系。类图是面向对象建模的主要组成部分&#xff0c;用于对系统的词汇进行建模、对…