1. API-IA

1.1. 文档说明

本文档为Aplec-Admin系统接口说明文档

1.2. 适用对象

本文档的面向读者是Aplec-Admin下的所有开发相关人员。

1.3. 请求地址

HOST:http://xxx.com:port(即服务器域名:端口号,具体以系统部署地址为准)

请求地址:HOST +下文接口中的url

1.4. 接口列表

1.4.1. 认证与授权

1.4.1.1. 请求地址

属性
url /aplec_qy/aplec/connect/login
http方法 post

1.4.1.2. 请求参数

参数名称 数据类型 长度/字节 描述 是否必选
ticket string 令牌
source string 系统标识

1.4.1.3. 返回参数

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功,500:失败
msg 提示信息 String
result 返回结果 Json

1.4.1.4. 响应示例

{
    "code": 200,
    "msg": "登录成功",
    "mix_code": 163003,
    "mix_msg": "",
    "mix_ext": "",
    "result": {}
}

1.4.2. 获取aplec计算数据

1.4.2.1. 请求地址

属性
url /aplec_qy/aplec/get_aplec_data
http方法 post

1.4.2.2. 请求参数

参数名称 数据类型 长度/字节 描述 是否必选
page_index string 数据分页
page_size string 数据页码
aprus_id string 适配器id
prob string 故障概率
type string 在线/离线

1.4.2.3. 返回参数

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功,500:失败
msg 提示信息 String
result 返回结果 Json

1.4.2.4. 响应示例

{
    "code": 200,
    "mix_code": 163005,
    "mix_ext": "",
    "mix_msg": "",
    "msg": "获取计算数据成功!",
    "result": {
        "data": [
            {
                "aprus_id": "A22017051300087",
                "code": "LS:00000,Aprus Status Pending",
                "create": "2019-01-25 09:30:00",
                "cycle": "P1",
                "i": 0,
                "n": 0,
                "probability": "0.0%",
                "r": 89
            },
            {
                "aprus_id": "A22017051300004",
                "code": "LS:00000,Aprus Status Pending",
                "create": "2019-01-25 09:30:00",
                "cycle": "P1",
                "i": 0,
                "n": 0,
                "probability": "0.0%",
                "r": 52
            }
        ],
        "page_index": 1,
        "page_size": 50,
        "total_records": 7199
    }
}

1.4.3. Aplec反向控制

1.4.3.1. 请求地址

属性
url /aplec_qy/aplec/aplec_control
http方法 post

1.4.3.2. 请求参数

参数名称 数据类型 长度/字节 描述 是否必选
token string 鉴权验证
i_type string 反向控制
command string 控制命令

1.4.3.3. 返回参数

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功,500:失败
msg 提示信息 String
result 返回结果 Json

1.4.3.4. 响应示例

{
    "code": 500,
    "mix_code": 263001,
    "mix_ext": "",
    "mix_msg": "",
    "msg": {
        "code": 400,
        "mix_code": 263001,
        "mix_ext": "",
        "mix_msg": " use id redis is None",
        "msg": "token认证失败!",
        "result": ""
    },
    "result": ""
}

1.4.4. 门户中心登出

1.4.4.1. 请求地址

属性
url /aplec_qy/aplec/connect/logout
http方法 post

1.4.4.2. 请求参数

参数名称 数据类型 长度/字节 描述 是否必选
use_id string 用户id

1.4.4.3. 返回参数

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功,500:失败
msg 提示信息 String
result 返回结果 Json

1.4.4.4. 响应示例

{
    "code": 200,
    "msg": "登出成功!",
    "result": "",
    "mix_code": 163004,
    "mix_msg": "",
    "mix_ext": ""
}

1.4.5. Aplec界面登出

1.4.5.1. 请求地址

属性
url /aplec_qy/aplec/logout
http方法 post

1.4.5.2. 请求参数

参数名称 数据类型 长度/字节 描述 是否必选
token string 鉴权认证

1.4.5.3. 返回参数

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功,500:失败
msg 提示信息 String
result 返回结果 Json

1.4.5.4. 响应示例

{
    "code": 200,
    "msg": "登录成功",
    "mix_code": 163003,
    "mix_msg": "",
    "mix_ext": "",
    "result": {}
}

1.4.6. 获取设备信息

1.4.6.1. 请求地址

属性
url /aplec_qy/aplec/aprus_message
http方法 post

1.4.6.2. 请求参数

参数名称 数据类型 长度/字节 描述 是否必选
token string 鉴权认证
aprus_id string 设备id

1.4.6.3. 返回参数

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功,500:失败
msg 提示信息 String
result 返回结果 Json

1.4.6.4. 响应示例

{
    "code": 200,
    "mix_code": 163005,
    "mix_ext": "",
    "mix_msg": "",
    "msg": "获取数据成功!",
    "result": {
        "access": "pub",
        "activated": "2018-10-05 11:46:07",
        "aprus_id": "A22017051300432",
        "aprus_name": "巨江电源2号站流量计",
        "codebase_id": null,
        "config_id": 1002,
        "created": "2018-10-05 11:46:07",
        "description": null,
        "is_available": 1,
        "maker": null,
        "nominal": "{\"DEV\":\"JHKPS-SB\&SVF-01\",\"HW\":\"MB:A2-026161724 CB:A2-055131724\",\"ICCID\":\"898602b1111880021968\",\"LUA\":\"AprusII.JHKPS-SB\&SVF.luapu.v2.1.1.180328.R\",\"MCU\":\"MA4207.M.V224.R\",\"REMOSU\":\"MA4XXX.R.V223.R\",\"base\":\"689C,3EA8\",\"dev\":\"JHKPS-SB\&SVF-01\",\"hwver\":\"mb:A2-026161724 cb:A2-055131724\",\"iccid\":\"898602b1111880021968\",\"luaver\":\"AprusII.JHKPS-SB\&SVF.luapu.v2.1.1.180328.R\",\"mcuver\":\"A2-42xx.mixlinker.mcufu.2.1.5.171030.R\",\"remosuver\":\"MA4XXX.R.V223.R\"}",
        "reference": null,
        "script": null,
        "template": null,
        "topic": "r,a,v,p,i,n,d,e",
        "type": "1"
    }
}

1.4.7. 获取aplec版本信息

1.4.7.1. 请求地址

属性
url /aplec_qy/aplec/version
http方法 post

1.4.7.2. 请求参数

1.4.7.3. 返回参数

字段 字段名称 字段类型 说明 是否必传
code 返回码 Integer 200:成功,500:失败
msg 提示信息 String
result 返回结果 Json

1.4.7.4. 响应示例

{
    "code": 200,
    "msg": "version:V2.0.0",
    "mix_code": 163003,
    "mix_msg": "",
    "mix_ext": "",
    "result": {}
}
© Mixlinker all right reserved,powered by Gitbook文件修订时间: 2020-04-27 19:44:05

results matching ""

    No results matching ""