- 1. MIX.IOT.2018.F.18.01-APIA API
- 1.1. 请求地址
- 1.2. 请求说明
- 1.3. 响应说明
- 1.4. 接口列表
- 1.4.1. 添加授权
- 1.4.1.1. 功能描述
- 1.4.1.2. 请求参数
- 1.4.1.3. 响应参数
- 1.4.2. 获取token
- 1.4.2.1. 功能描述
- 1.4.2.2. 请求参数
- 1.4.2.3. 响应参数
- 1.4.3. 用户中心授权
- 1.4.3.1. 功能描述
- 1.4.3.2. 请求参数
- 1.4.3.3. 响应参数
- 1.4.4. 用户列表
- 1.4.4.1. 功能描述
- 1.4.4.2. 请求参数
- 1.4.4.3. 响应参数
- 1.4.5. 用户编辑
- 1.4.5.1. 功能描述
- 1.4.5.2. 请求参数
- 1.4.5.3. 响应参数
- 1.4.6. 用户删除
- 1.4.6.1. 功能描述
- 1.4.6.2. 请求参数
- 1.4.6.3. 响应参数
- 1.4.7. client获取
- 1.4.7.1. 功能描述
- 1.4.7.2. 请求参数
- 1.4.7.3. 响应参数
- 1.4.8. 规则添加
- 1.4.8.1. 功能描述
- 1.4.8.2. 请求参数
- 1.4.8.3. 响应参数
- 1.4.9. 规则编辑
- 1.4.9.1. 功能描述
- 1.4.9.2. 请求参数
- 1.4.9.3. 响应参数
- 1.4.10. 规则编辑
- 1.4.10.1. 功能描述
- 1.4.10.2. 请求参数
- 1.4.10.3. 响应参数
- 1.4.11. 规则列表
- 1.4.11.1. 功能描述
- 1.4.11.2. 请求参数
- 1.4.11.3. 响应参数
- 1.4.12. type获取
- 1.4.12.1. 功能描述
- 1.4.12.2. 请求参数
- 1.4.12.3. 响应参数
- 1.4.13. 代理添加
- 1.4.13.1. 功能描述
- 1.4.13.2. 请求参数
- 1.4.13.3. 响应参数
- 1.4.14. 代理编辑
- 1.4.14.1. 功能描述
- 1.4.14.2. 请求参数
- 1.4.14.3. 响应参数
- 1.4.15. 代理删除
- 1.4.15.1. 功能描述
- 1.4.15.2. 请求参数
- 1.4.15.3. 响应参数
- 1.4.16. 代理启动
- 1.4.16.1. 功能描述
- 1.4.16.2. 请求参数
- 1.4.16.3. 响应参数
- 1.4.17. 代理停止
- 1.4.17.1. 功能描述
- 1.4.17.2. 请求参数
- 1.4.17.3. 响应参数
- 1.4.18. 代理列表
- 1.4.18.1. 功能描述
- 1.4.18.2. 请求参数
- 1.4.18.3. 响应参数
- 1.4.19. 最新结果获取
- 1.4.19.1. 功能描述
- 1.4.19.2. 请求参数
- 1.4.19.3. 响应参数
- 1.4.20. 结果列表
- 1.4.20.1. 功能描述
- 1.4.20.2. 请求参数
- 1.4.20.3. 响应参数
1. MIX.IOT.2018.F.18.01-APIA API
- 1. MIX.IOT.2018.F.18.01-APIA API
- 1.1. 请求地址
- 1.2. 请求说明
- 1.3. 响应说明
- 1.4. 接口列表
- 1.4.1. 添加授权
- 1.4.1.1. 功能描述
- 1.4.1.2. 请求参数
- 1.4.1.3. 响应参数
- 1.4.2. 获取token
- 1.4.2.1. 功能描述
- 1.4.2.2. 请求参数
- 1.4.2.3. 响应参数
- 1.4.3. 用户中心授权
- 1.4.3.1. 功能描述
- 1.4.3.2. 请求参数
- 1.4.3.3. 响应参数
- 1.4.4. 用户列表
- 1.4.4.1. 功能描述
- 1.4.4.2. 请求参数
- 1.4.4.3. 响应参数
- 1.4.5. 用户编辑
- 1.4.5.1. 功能描述
- 1.4.5.2. 请求参数
- 1.4.5.3. 响应参数
- 1.4.6. 用户删除
- 1.4.6.1. 功能描述
- 1.4.6.2. 请求参数
- 1.4.6.3. 响应参数
- 1.4.7. client获取
- 1.4.7.1. 功能描述
- 1.4.7.2. 请求参数
- 1.4.7.3. 响应参数
- 1.4.8. 规则添加
- 1.4.8.1. 功能描述
- 1.4.8.2. 请求参数
- 1.4.8.3. 响应参数
- 1.4.9. 规则编辑
- 1.4.9.1. 功能描述
- 1.4.9.2. 请求参数
- 1.4.9.3. 响应参数
- 1.4.10. 规则编辑
- 1.4.10.1. 功能描述
- 1.4.10.2. 请求参数
- 1.4.10.3. 响应参数
- 1.4.11. 规则列表
- 1.4.11.1. 功能描述
- 1.4.11.2. 请求参数
- 1.4.11.3. 响应参数
- 1.4.12. type获取
- 1.4.12.1. 功能描述
- 1.4.12.2. 请求参数
- 1.4.12.3. 响应参数
- 1.4.13. 代理添加
- 1.4.13.1. 功能描述
- 1.4.13.2. 请求参数
- 1.4.13.3. 响应参数
- 1.4.14. 代理编辑
- 1.4.14.1. 功能描述
- 1.4.14.2. 请求参数
- 1.4.14.3. 响应参数
- 1.4.15. 代理删除
- 1.4.15.1. 功能描述
- 1.4.15.2. 请求参数
- 1.4.15.3. 响应参数
- 1.4.16. 代理启动
- 1.4.16.1. 功能描述
- 1.4.16.2. 请求参数
- 1.4.16.3. 响应参数
- 1.4.17. 代理停止
- 1.4.17.1. 功能描述
- 1.4.17.2. 请求参数
- 1.4.17.3. 响应参数
- 1.4.18. 代理列表
- 1.4.18.1. 功能描述
- 1.4.18.2. 请求参数
- 1.4.18.3. 响应参数
- 1.4.19. 最新结果获取
- 1.4.19.1. 功能描述
- 1.4.19.2. 请求参数
- 1.4.19.3. 响应参数
- 1.4.20. 结果列表
- 1.4.20.1. 功能描述
- 1.4.20.2. 请求参数
- 1.4.20.3. 响应参数
1.1. 请求地址
HOST:http://xxx.com/(具体以系统部署地址为准)请求地址:HOST +下文接口中的url
1.2. 请求说明
固定传参
在 http header 中传入参数,该参数来源于用户登录后获得到的验证信息,用于鉴权
参考
Authorization: Bearer d6nAGWraBuRY4wkEo7KLK4d3N53A4i5gMnj1iiCZQujZS783WE1SfHNkBFjkns85
1.3. 响应说明
所有响应都提供了遵循如下响应规则,在后面的响应说明中不再做出说明
状态码说明:
1.4. 接口列表
1.4.1. 添加授权
1.4.1.1. 功能描述
| 属性 | 值 |
|---|
| url | auth/register |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.1.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| appid | 授权应用名称 | string | | 非空 |
| secret | 授权码 | string | | 非空 |
1.4.1.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": "恭喜您注册成功!"}
1.4.2. 获取token
1.4.2.1. 功能描述
| 属性 | 值 |
|---|
| url | auth/getToken |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.2.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| appid | 授权应用名称 | string | | 非空 |
| secret | 授权码 | string | | 非空 |
1.4.2.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBpZCI6ImZpZGlzIiwiZXhwIjoxNTM3NDM2MDM2LCJpYXQiOjE1Mzc0Mjg4MzYsInNlY3JldCI6Im1peEAxMjMifQ._B3RjGIztMkhWHRzi3IYYlkfkiGst63mTm042_Oet4w"}
1.4.3. 用户中心授权
1.4.3.1. 功能描述
| 属性 | 值 |
|---|
| url | auth |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.3.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| source | 来源 | string | | 非空 |
| ticket | 票据 | string | | 非空 |
1.4.3.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBpZCI6ImZpZGlzIiwiZXhwIjoxNTM3NDM2MDM2LCJpYXQiOjE1Mzc0Mjg4MzYsInNlY3JldCI6Im1peEAxMjMifQ._B3RjGIztMkhWHRzi3IYYlkfkiGst63mTm042_Oet4w"}
1.4.4. 用户列表
1.4.4.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/user/show |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.4.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| items | 每页显示的条数 | int | | 非空 |
| page | 当前页 | int | | 非空 |
| start_time | 开始时间,记录创建的时间 | string | | |
| end_time | 结束时间 | string | | |
| appid | 用户 | string | |
1.4.4.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": { "data": [ { "appid": "admin", "created": "2018-10-11T09:45:49Z", "description": null, "isAvailable": "1" } ], "pagination": { "page": "1", "page_size": 1, "total": 3 } }}
1.4.5. 用户编辑
1.4.5.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/user/edit |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.5.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| id | 唯一标识 | Integer | | 非空 |
| appid | Appid即client | String | | 非空 |
| secret | 密钥 | string | | |
| decription | 描述 | string | |
1.4.5.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": "用户修改成功!"}
1.4.6. 用户删除
1.4.6.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/user/delete |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.6.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| id | 唯一标识 | Integer | | 非空 |
| appid | Appid即client | String | | 非空 |
1.4.6.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": "用户删除成功!"}
1.4.7. client获取
1.4.7.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/clients |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.7.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| id | 唯一标识 | Integer | | 非空 |
1.4.7.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": { "data": [ "admin1", "fidis", "mixwork", "mixmessenger", "admin", "test6", "test7", "etet", "gtegeg", "mixworks", "tt" ] }}
1.4.8. 规则添加
1.4.8.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/rule/add |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.8.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| type | 规则类型 | String | 唯一标识 | 非空 |
| name | 规则名称 | String | | 非空 |
| Data_source | 数据源 | String | mysql/redis/influxdb/file | 非空 |
| host | 主机 | String | | 非空 |
| port | 端口号 | int | | 非空 |
| db | 数据库 | string | | 非空 |
| pwd | 密码 | string | | 非空 |
| command | 执行指令 | string | | 非空 |
| description | 描述 | string | | 非空 |
1.4.8.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": "代理规则添加成功!"}
1.4.9. 规则编辑
1.4.9.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/rule/edit |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.9.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述** | 是否必选 |
|---|
| type | 规则类型 | String | 唯一标识 | 非空 |
| name | 规则名称 | String | | 非空 |
| Data_source | 数据源 | String | mysql/redis/influxdb/file | 非空 |
| host | 主机 | String | | 非空 |
| port | 端口号 | int | | 非空 |
| db | 数据库 | string | | 非空 |
| pwd | 密码 | string | | 非空 |
| command | 执行指令 | string | | 非空 |
| description | 描述 | string | | 非空 |
| id | 唯一标识 | int | | 非空 |
1.4.9.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": "规则编辑成功!"}
1.4.10. 规则编辑
1.4.10.1. 功能描述
说明:如果 有代理在使用此规则, 则规则将无法删除, 必须删除相应代理,方能删除!
| 属性 | 值 |
|---|
| url | agent/rule/delete |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.10.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| id | 唯一标识 | int | | 非空 |
| type | 规则类型 | string | 用于确认有哪些代理在使用 | 非空 |
1.4.10.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": "规则删除成功!"}
1.4.11. 规则列表
1.4.11.1. 功能描述
说明:如果 有代理在使用此规则, 则规则将无法删除, 必须删除相应代理,方能删除!
| 属性 | 值 |
|---|
| url | agent/rule/show |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.11.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| items | 每页显示的条数 | int | | 非空 |
| page | 当前页 | int | | 非空 |
| Start_time | 开始时间,记录创建的时间 | string | | |
| end_time | 结束时间 | string | | |
| type | 代理类型 | string | | |
| name | 代理名称 | string | | |
| data_source | 数据源 | string | | |
| description | 描述 | string | |
1.4.11.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": { "data": [ { "command": "select %v from %v where code= %v and is_available = 1 %v order by created desc limit %v", "created": "2018-09-09T09:33:42Z", "dataSource": "mysql", "db": "fidis", "description": "根据单表获取获取维保数据", "host": "192.168.1.208", "name": "Maintenance single table", "port": 3306, "pwd": "root123", "ruleType": "MT", "username": "root" }, { "command": "select %v from %v where equipment_id in (select equipment_id from admin_equipment where customer_id %v ) and code %v and is_available = 1 order by created desc limit %v", "created": "2018-09-07T10:24:49Z", "dataSource": "mysql", "db": "fidis", "description": "根据customer_id获取维保数据", "host": "192.168.1.208", "name": "Maintenance", "port": 3306, "pwd": "root123", "ruleType": "MT2", "username": "root" } ], "pagination": { "page": "1", "page_size": 2, "total": 9 } }}
1.4.12. type获取
1.4.12.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/rule/types |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.12.2. 请求参数
1.4.12.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": { "data": [ "MO", "MT", "MT2", "MT3" ] }}
1.4.13. 代理添加
1.4.13.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/add |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.13.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| rule_type | 代理规则 | string | | 非空 |
| name | 代理名称 | String | | 可空 |
| schedule | 运行条件 | string | | 非空 |
| where | command条件参数 | json | | 非空 |
| callback | 回调地址 | Json [字符串] | Url(必须包含http/https) | 可空 |
| callwhere | 回调条件 | Json [字符串] | | |
| at_once | 是否立即启动代理 | int | 1:立即启动 0:否,默认为 0 | 可空 |
1.4.13.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| Agent_id | 代理id | int | | 非空 |
响应示例:
{ "code": 200, "msg": "成功", "result": [ { "agent_id": 90 } ]}
1.4.14. 代理编辑
1.4.14.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/edit |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.14.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| agent_id | 代理标识 | int | | 非空 |
| rule_type | 代理规则 | string | | 非空 |
| name | 代理名称 | String | | 可空 |
| schedule | 运行条件 | string | | 非空 |
| where | command条件参数 | json | | 非空 |
| callback | 回调地址 | Json [字符串] | Url(必须包含http/https) | 可空 |
| callwhere | 回调条件 | Json [字符串] | | |
| at_once | 是否立即启动代理 | int | 1:立即启动 0:否,默认为 0 | 可空 |
1.4.14.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| Agent_id | 代理id | int | | 非空 |
响应示例:
{ "code": 200, "message": "成功", "result": "代理编辑成功!"}
1.4.15. 代理删除
1.4.15.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/delete |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.15.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| agent_id | 代理标识 | int | | 非空 |
| client | 来源、客户端 | string | | 非空 |
1.4.15.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": "代理删除成功!"}
1.4.16. 代理启动
1.4.16.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/start |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.16.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| agent_id | 代理标识 | int | | 非空 |
| client | 来源、客户端 | string | | 非空 |
1.4.16.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": "代理服务启动成功!"}
1.4.17. 代理停止
1.4.17.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/stop |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.17.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| agent_id | 代理标识 | int | | 非空 |
| client | 来源、客户端 | string | | 非空 |
1.4.17.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": "代理服务停止成功!"}
1.4.18. 代理列表
1.4.18.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/stop |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.18.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| items | 每页显示的条数 | int | | 非空 |
| page | 当前页 | int | | 非空 |
| Start_time | 开始时间,记录创建的时间 | string | | |
| end_time | 结束时间 | string | | |
| rule | 代理规则 | string | | |
| name | 代理名称 | string | | |
| client | 来源、客户端 | string | | |
| status | 状态 | int | 0:未启动、1:正在进行2:执行失败3:执行成功,4:已停止 -1:所有 |
1.4.18.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": { "data": [ { "callback": "http://192.168.1.125:8098/api/calldispose", "callwhere": [ "* ", "admin_fault ", "1003 ", "", "1" ], "client": "admin", "created": "2018-09-26T11:38:17Z", "description": "小测一下 ", "id": 71, "name": "test", "retry": 3, "rule": "MO", "schedule": "00 11,12,77 * * ?", "status": 0, "where": [ "* ", "admin_fault ", "1003 ", "", "1" ] } ], "pagination": { "page": "1", "page_size": 1, "total": 2 } }}
1.4.19. 最新结果获取
1.4.19.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/result/get |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.19.2. 请求参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| agent_id | 代理唯一标识 | int | | 非空 |
| item | 条数 | string | 默认为1 |
1.4.19.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": { "agent_id": 8, "name": "", "client": "Mixreport", "rule_type": "MT2", "callback": "http://192.168.1.175/api/age/calldispose?w_rule_id=2&agent_rule=MT2", "status": 4, "schedule": "*/5 * * * * *", "retry": 3, "result": "", "description": "定制维保任务测试", "where": [ "* ", "admin_fault ", " = 1003 ", " = 2826 ", "1" ], "callwhere": [], "Created": "2018-09-11T15:52:42Z", "at_once": 0, "IsAvailable": "1", "params": "" }}
1.4.20. 结果列表
1.4.20.1. 功能描述
| 属性 | 值 |
|---|
| url | agent/result/show |
| http方法 | post |
| Content-Type | x-www-form-urlencode |
1.4.20.2. 请求参数
| 参数名称** | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| items | 每页显示的条数 | int | | 非空 |
| page | 当前页 | int | | 非空 |
| status | 执行状态 | int | 0:执行失败,1:执行成功 -1:为所有状态 | 非空 |
| return_status | 回调状态 | int | 0:未回调1:已回调,2:成功 3:失败,4:接收失败' -1:为所有状态 | 非空 |
1.4.20.3. 响应参数
| 参数名称 | 数据类型 | 长度/字节 | 描述 | 是否必选 |
|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 非空 |
| message | 提示信息 | String | | 可空 |
| result | 结果 | string | |
响应示例:
{ "code": 200, "message": "成功", "result": { "data": [ { "callResult": "", "created": "2018-09-11T15:52:45Z", "id": 112, "record_id": 8, "result": { "aprus_id ": "A22018061400001 ", "code ": "2826 ", "created ": "2018 - 07 - 14 T12: 51: 54 Z ", "description ": "Label_En: The Power Switch Is Closed;Label_Cn: 发电开关合闸 ", "equipment_id ": "100006 ", "fault_id ": "100122 ", "fault_name ": "发电开关合闸 ", "is_available ": "1 ", "reference ": "", "script ": "", "template ": "" }, "returnStatus": 1, "status": 2 }, { "callResult": "", "created": "2018-09-11T15:52:50Z", "id": 113, "record_id": 8, "result": { "aprus_id ": "A22018061400001 ", "code ": "2826 ", "created ": "2018 - 07 - 14 T12: 51: 54 Z ", "description ": "Label_En: The Power Switch Is Closed;Label_Cn: 发电开关合闸 ", "equipment_id ": "100006 ", "fault_id ": "100122 ", "fault_name ": "发电开关合闸 ", "is_available ": "1 ", "reference ": "", "script ": "", "template ": "" }, "returnStatus ": 1, "status": 2 } ], "pagination": { "page": "1", "page_size": 2, "total": 29150 } }}