DRM'S API
admin = https://drmtest.sparklog.com/admin
app = https://drmtest.sparklog.com/app
- 登录
- 获取用户信息
- 更新用户信息
- 修改用户密码
- 获取消息列表
- GET单个消息
- 获取bugs
- 获取bug
- 获取热门搜索词
- 创建工单
- 获取最新所在地
- 获取devices
- 搜索设备
- 设备热门搜索词
- 获取device
- 更新备注
- 增加时间线
- 增加设备图片
- 获取通知
- 获取单个通知
- 设置所有已读
- 设置单个已读
- 设置已解决工单
- 删除单个通知
- 获取单个设备监控数据
- 搜索配件
- 配件热门搜索词
- 配件一级分类
- 配件二级分类
- 获取单个配件
- 获取设备监控列表
- 设备监控搜索
- 获取排量分类
- 获取压力分类
- 获取燃料分类
- 上传工单图片
- 删除图片
- 找回密码
- 检查邮箱验证码
- 重置密码
- 获取单个设备单项监控数据
- 登录
- 新增用户
- 获取所有用户
- 获取单个用户
- 更新单个用户
- 删除单个用户
- 上传消息推送图片
- 创建消息
- 获取所有消息
- 获取单个信息
- 删除单个消息
- 更新单个消息
- 创建故障诊断
- 修改故障诊断
- 获取所有故障诊断
- 获取单个故障诊断
- 删除故障诊断
- 获取所有工单
- 获取单个工单
- 处理工单
- 删除工单
- 创建设备
- 删除设备
- 获取设备
- 获取单个设备
- 更新单个设备
- 更新设备所在地
- 删除时间线
- 更新时间线
- 导出文件
- 新增权限
- 获取权限
- 更新权限
- 删除权限
- 创建配件
- 获取配件
- 更新配件备注
- 上传故障诊断图片
- 创建时间线分类
- 获取所有时间线分类
- 获取单个时间线分类
- 更新单个时间线分类
- 删除时间线分类
- 创建排量分类
- 获取所有排量分类
- 获取单个排量分类
- 更新单个排量分类
- 删除单个排量分类
- 创建压力分类
- 获取所有压力分类
- 获取单个压力分类
- 更新单个压力分类
- 删除单个压力分类
- 创建燃料分类
- 获取所有燃料分类
- 获取单个燃料分类
- 更新单个燃料分类
- 删除单个燃料分类
- 获取单个设备监控数据
- 获取单个设备全部监控数据文件链接
- 上传配件文件
POST https://drmtest.sparklog.com/app/session
{
email: '',
password: ''
}
GET https://drmtest.sparklog.com/app/user?token=${token}
POST https://drmtest.sparklog.com/app/user/update?token=${token}
{
name: '',
email: '',
phone: '',
company_name: '',
address: ''
}
POST https://drmtest.sparklog.com/app/user/update/password?token=${token}
{
password: '',
newPass: '',
confirmPass: ''
}
GET https://drmtest.sparklog.com/app/news?token=${token}
GET https://drmtest.sparklog.com/app/news/one?id=${id}&token=${token}
GET https://drmtest.sparklog.com/app/bugs?token=${token}
{
type: '', // onchange, submit, null, null 代表返回全部
search: '' //search 为搜索内容
}
GET https://drmtest.sparklog.com/app/bugs/one?id=${id}&token=${token}
GET https://drmtest.sparklog.com/app/bugs/cate?token=${token}
GET https://drmtest.sparklog.com/app/bugs/hots?token=${token}
POST https://drmtest.sparklog.com/app/order/new?token=${token}
{
title: '',
category: '',
content: '',
images: []
}
GET https://drmtest.sparklog.com/app/devices/address?token=${token}
GET https://drmtest.sparklog.com/app/devices?token=${token}
0. 分类:
type: enum: ['cc', 'pressure', 'combustible']
value: ''
示例: type=pressure&value=25Mpa
1. 排序:
createTime: ['asc', 'desc'] //升序,降序
2. 筛选:
cc=''&pressure=''&combustible=''&address=''
GET https://drmtest.sparklog.com/app/devices/search?token=${token}
{
type: '', // onchange, submit, null。 null代表返回全部
search: '' // search 为搜索内容
}
GET https://drmtest.sparklog.com/app/devices/hots?token=${token}
GET https://drmtest.sparklog.com/app/devices/one?deviceId=${deviceId}&start=${start}&end=${end}&token=${token}
POST https://drmtest.sparklog.com/app/devices/one/remark?token=${token}
{
deviceId: '',
remark: ''
}
POST https://drmtest.sparklog.com/app/devices/one/timelines?token=${token}
{
deviceId: '',
line_type: '',
line_time: '',
line_des: ''
}
POST https://drmtest.sparklog.com/app/devices/one/images?deviceId=${deviceId}&token=${token}
{
key: devices
}
GET https://drmtest.sparklog.com/app/notices?&token=${token}
GET https://drmtest.sparklog.com/app/notices/one?id=${id}&token=${token}
POST https://drmtest.sparklog.com/app/notices/all/read?&token=${token}
POST https://drmtest.sparklog.com/app/notices/one/read?token=${token}
{
id: ''
}
POST https://drmtest.sparklog.com/app/order/solved?token=${token}
{
id: '' //此id为orderid
}
DELETE https://drmtest.sparklog.com/notices/:id?token=${token}
number指的是设备编号
GET https://drmtest.sparklog.com/app/moniterdevs/number?number=${number}&token=${token}
type有两种: onchange, submit search 代表搜索内容
若没有type或search字段,则默认返回全部数据
GET https://drmtest.sparklog.com/app/parts/search?type=${type}&search=${search}&token=${token}
GET https://drmtest.sparklog.com/app/parts/hots?token=${token}
GET https://drmtest.sparklog.com/app/parts/first?token=${token}
name 为一级分类的内容
GET https://drmtest.sparklog.com/app/parts/second?name=${name}&token=${token}
GET https://drmtest.sparklog.com/app/parts/one?id=${id}token=${token}
get https://drmtest.sparklog.com/app/moniterdevs?token=${token}
get https://drmtest.sparklog.com/app/moniterdevs/search?search=${search}&token=${token}
get https://drmtest.sparklog.com/app/devices/ccsort?&token=${token}
get https://drmtest.sparklog.com/app/devices/presort?&token=${token}
get https://drmtest.sparklog.com/app/devices/fuelsort?&token=${token}
post https://drmtest.sparklog.com/app/order/upload?&token=${token}
{
key: 'order'
}
POST https://drmtest.sparklog.com/app/order/delimg?&token=${token}
{
url: String,
}
调用该接口,会给用户邮箱发送验证码
POST https://drmtest.sparklog.com/app/findpass?
{
salt: '',
email: '',
}
POST https://drmtest.sparklog.com/app/checkcode
{
slat: '',
email: '',
code: ''
}
成功返回
{
code: 201,
message: 'ok',
data: true
}
失败返回
{
code: 422,
message: '验证码无效',
data: false
}
POST https://drmtest.sparklog.com/app/resetpass?
{
email: '',
pass: '' // 密码
}
number指的是设备编号 field指的是指标名
GET https://drmtest.sparklog.com/app/moniterdevs/number/field?number=${number}&field={field}&token=${token}
POST https://drmtest.sparklog.com/admin/session
{
admin: '',
password: ''
}
POST https://drmtest.sparklog.com/admin/users/new?token=${token}
{
name: '',
password: '',
email: '',
phone: '',
company_name: '',
address: ''
}
GET https://drmtest.sparklog.com/admin/users?type=name&token=${token}
GET https://drmtest.sparklog.com/admin/users/:id?token=${token}
PUT https://drmtest.sparklog.com/admin/users/:id?token=${token}
DELETE https://drmtest.sparklog.com/admin/users/:id?token=${token}
POST https://drmtest.sparklog.com/admin/news/uploadimg?token=${token}
{
key: 'news'
}
POST https://drmtest.sparklog.com/admin/news/new?token=${token}
{
title: '',
abstract: '',
content: '',
published: Boolean, //代表已发送还是未发送
images: [] //通过上一条API得到
}
GET https://drmtest.sparklog.com/admin/news/all?token=${token}
POST https://drmtest.sparklog.com/admin/news/delete?id=${id}&token=${token}
POST https://drmtest.sparklog.com/admin/news/update?id=${id}&token=${token}
{
title: '',
abstract: '',
content: '',
published: Boolean,
images: []
}
GET https://drmtest.sparklog.com/admin/news/one?id=${id}&token=${token}
POST https://drmtest.sparklog.com/admin/bugs?token=${token}
{
title: '',
category: 'categoryId',
content: ''
}
PUT https://drmtest.sparklog.com/admin/bugs/:bugId?token=${token}
GET https://drmtest.sparklog.com/admin/bugs?token=${token}
GET https://drmtest.sparklog.com/admin/bugs/:bugId?token=${token}
DELETE https://drmtest.sparklog.com/admin/bugs/:bugId?token=${token}
POST https://drmtest.sparklog.com/admin/bugs/categorys/new?token=${token}
{
text: ''
}
DELETE https://drmtest.sparklog.com/admin/bugs/categorys/:categoryId?token=${token}
POST https://drmtest.sparklog.com/admin/bugs/categorys/top?token=${token}
{
categoryId: ''
}
GET https://drmtest.sparklog.com/admin/bugs/categorys?token=${token}
GET https://drmtest.sparklog.com/admin/orders?token=${token}
GET https://drmtest.sparklog.com/admin/orders/:orderId?token=${token}
PUT https://drmtest.sparklog.com/admin/orders/:orderId?token=${token}
{
advice: '' //处理意见
}
DELETE https://drmtest.sparklog.com/admin/orders/:orderId?token=${token}
POST https://drmtest.sparklog.com/admin/devices/new?token=${token}
name: '' // 设备名称
number: '' // 设备编号
images: [] // 设备图片
cc: [单发生器,双发生器,三发生器,四发生器] //排量
pressure: [25Mpa, 30Mpa, 35Mpa, 50Mpa] //压力
combustible: [柴油,天然气,原油型] //燃料
description: '' //描述
address:'' //所在地
classify: '' //分类
timelines: [{
time: '',
type: '',
description: ''
}],
remark: '' //备注
POST https://drmtest.sparklog.com/admin/devices/uploadimg?token=${token}
{
key: device
}
GET https://drmtest.sparklog.com/admin/devices?type=name&token=${token}
GET https://drmtest.sparklog.com/admin/devices/excel?startTime=${startTime}&endTime=${endTime}&token=${token}
GET https://drmtest.sparklog.com/admin/devices/deviceId?token=${token}
PUT https://drmtest.sparklog.com/admin/devices/deviceId?token=${token}
DELETE https://drmtest.sparklog.com/admin/devices/deviceId?token=${token}
PUT https://drmtest.sparklog.com/admin/devices/deviceId/location?token=${token}
{
address:
}
POST https://drmtest.sparklog.com/admin/devices/deviceId/timeline/del?lineId=${lineId}&token=${token}
PUT https://drmtest.sparklog.com/admin/devices/deviceId/timeline/update?token=${token}
{
lineId: '',
line_type: '',
line_des: '',
line_time: '',
}
POST https://drmtest.sparklog.com/admin/auths/new?token=${token}
{
userId: '',
deviceId: '',
canView: Boolean,
canMonitor: Boolean
}
GET https://drmtest.sparklog.com/admin/auths?token=${token}
GET https://drmtest.sparklog.com/admin/auths/one?authId=${authId}token=${token}
POST https://drmtest.sparklog.com/admin/auth/change?authId=${authId}&token=${token}
POST https://drmtest.sparklog.com/admin/auth/del?authId=${authId}&token=${token}
{
user: '',
device: '',
canView: Boolean,
canMonitor: Boolean
}
GET https://drmtest.sparklog.com/admin/parts?token=${token}
POST https://drmtest.sparklog.com/admin/parts/remark?partId=${partId}&token=${token}
{
deviceId:'',
remark: ''
}
POST https://drmtest.sparklog.com/admin/bugs/uploadimg?token=${token}
{
key: 'bugs'
}
POST https://drmtest.sparklog.com/admin/timelines?token=${token}
{
text: ''
}
GET https://drmtest.sparklog.com/admin/timelines?token=${token}
GET https://drmtest.sparklog.com/admin/timelines/:id?token=${token}
PUT https://drmtest.sparklog.com/admin/timelines/:id?token=${token}
DELETE https://drmtest.sparklog.com/admin/timelines/:id?token=${token}
POST https://drmtest.sparklog.com/admin/ccsorts?token=${token}
GET https://drmtest.sparklog.com/admin/ccsorts?token=${token}
GET https://drmtest.sparklog.com/admin/ccsorts/:id?token=${token}
PUT https://drmtest.sparklog.com/admin/ccsorts/:id?token=${token}
DELETE https://drmtest.sparklog.com/admin/ccsorts/:id?token=${token}
POST https://drmtest.sparklog.com/admin/presorts?token=${token}
GET https://drmtest.sparklog.com/admin/presorts?token=${token}
GET https://drmtest.sparklog.com/admin/presorts/:id?token=${token}
PUT https://drmtest.sparklog.com/admin/presorts/:id?token=${token}
DELETE https://drmtest.sparklog.com/admin/presorts/:id?token=${token}
POST https://drmtest.sparklog.com/admin/fuelsorts?token=${token}
GET https://drmtest.sparklog.com/admin/fuelsorts?token=${token}
GET https://drmtest.sparklog.com/admin/fuelsorts/:id?token=${token}
PUT https://drmtest.sparklog.com/admin/fuelsorts/:id?token=${token}
DELETE https://drmtest.sparklog.com/admin/fuelsorts/:id?token=${token}
该number指的是设备编号
GET https://drmtest.sparklog.com/admin/moniterdevs?number=${number}&token=${token}
该number指的是设备编号
GET https://drmtest.sparklog.com/admin/moniterdevs/excel?number=${number}&token=${token}
POST https://drmtest.sparklog.com/admin/parts/uploadfile?token=${token}