物解析IOT Parser

    Gateway

    字段 类型 说明
    uuid String 全局唯一ID
    code String 网关名称。同一个bce用户下唯一
    description String 网关描述
    principalUuid String 网关对应设备的身份
    policyUuid String 网关对应设备的身份对应的策略
    useSsl Boolean 网关是否使用SSL通信
    host String 数据下发和上传的endpoint。当useSsl=true时是tls地址,否则为tcp地址
    username String 网关和Mqtt交互所需的username
    password String 网关和Mqtt交互所需的password
    commandTopic String 配置下发的主题
    state ENUM [ENABLED, DISABLED]
    status ENUM [ERROR, ACTIVE, DELETED]
    createTime DateTime 创建记录的时间
    updateTime DateTime 最后修改记录的时间

    分页查询

    接口描述

    相对URI HTTP 方式
    /v1/gateway GET

    输入

    名称 类型 是否必选 默认值 含义
    state ENUM N null 筛选条件之一
    status ENUM N null 筛选条件之一

    输出

    200: 成功

    输出一个Gateway的List

    其他: 失败

    请求示例

    GET /v1/gateway

    输出示例

    {
        "totalCount": 4,
        "result": [
            {
                "username": "updatejobsourceb1x6g/mb_thing_v21552530419294",
                "policyUuid": "mb_policy_v21552530419294",
                "useSsl": false,
                "state": "ENABLED",
                "description": "新版网关",
                "code": "new",
                "host": "tcp://10.73.203.34:8061",
                "backControlTopic": "mb_backControlTopic_1552530419294",
                "lastActiveTime": "1970-01-01T00:00:00Z",
                "password": "kzQs0v7gbGyxxxxx",
                "principalUuid": "mb_principal_v21552530419294",
                "createTime": "2019-03-14T02:27:00Z",
                "status": "ACTIVE",
                "updateTime": "2019-03-14T02:27:00Z",
                "commandTopic": "mb_commandTopic_v21552530419294",
                "uuid": "c6f9cbc2-1626-4901-b15d-1efcfff78a05"
            },
            {
                "username": "updatejobsourceb1x6g/mb_thing_v21552529872172",
                "policyUuid": "mb_policy_v21552529872172",
                "useSsl": false,
                "state": "ENABLED",
                "description": "旧版网关",
                "code": "old03",
                "host": "tcp://10.73.203.34:8061",
                "backControlTopic": "mb_backControlTopic_1552529872172",
                "lastActiveTime": "1970-01-01T00:00:00Z",
                "password": "tbym6yleDYzxxxxx",
                "principalUuid": "mb_principal_v21552529872172",
                "createTime": "2019-03-14T02:17:52Z",
                "status": "ACTIVE",
                "updateTime": "2019-03-14T02:17:52Z",
                "commandTopic": "mb_commandTopic_v21552529872172",
                "uuid": "b04e5a6d-8062-4057-8b5d-53e6b67686fd"
            },
            {
                "username": "updatejobsourceb1x6g/mb_thing_v21552529843828",
                "policyUuid": "mb_policy_v21552529843828",
                "useSsl": false,
                "state": "ENABLED",
                "description": "旧版网关",
                "code": "old01",
                "host": "tcp://10.73.203.34:8061",
                "backControlTopic": "mb_backControlTopic_1552529843828",
                "lastActiveTime": "2019-03-14T06:20:43Z",
                "password": "DG9AvVGDEQTxxxxx",
                "principalUuid": "mb_principal_v21552529843828",
                "createTime": "2019-03-14T02:17:25Z",
                "status": "ACTIVE",
                "updateTime": "2019-03-14T02:17:25Z",
                "commandTopic": "mb_commandTopic_v21552529843828",
                "uuid": "99fce486-8ac8-4491-b337-c41ae5737eb5"
            },
            {
                "username": "updatejobsourceb1x6g/mb_thing_v21551862831962",
                "policyUuid": "mb_policy_v21551862831962",
                "useSsl": false,
                "state": "DISABLED",
                "description": "description",
                "code": "name",
                "host": "tcp://10.73.203.34:8061",
                "backControlTopic": "mb_backControlTopic_1551862831962",
                "lastActiveTime": "1970-01-01T00:00:00Z",
                "password": "rn0gufoRa1rxxxxx",
                "principalUuid": "mb_principal_v21551862831962",
                "createTime": "2019-03-06T09:00:32Z",
                "status": "ACTIVE",
                "updateTime": "2019-03-06T09:00:32Z",
                "commandTopic": "mb_commandTopic_v21551862831962",
                "uuid": "32b189ef-24f3-4a48-8f66-80eab6e7d5a2"
            }
        ],
        "order": "desc",
        "orderBy": "createtime",
        "pageSize": 50,
        "pageNo": 1
    }

    获取

    接口描述

    相对URI HTTP 方式
    /v1/gateway/:gatewayUuid GET

    输入

    名称 类型 是否必选 默认值 含义
    gatewayUuid String Y 网关Id

    输出

    200: 成功

    输出一个这个uuid对应的gateway

    其他: 失败

    请求示例

    GET /v1/gateway/4ac62c7e-da98-4c1e-95df-2313cf66754b

    输出示例

    {  
        "username": "parser\_endpoint1472628546412/mb\_thing\_v21481002980078",  
        "policyUuid": "mb\_policy\_v21481002980078",  
        "useSsl": false,  
        "state": "ENABLED",  
        "description": "created by api",  
        "code": "yyjGateway08",  
        "host": "[tcp://10.73.203.34:8061](tcp://10.73.203.34:8061)",  
        "password": "vV/idfasdfadfFig=",  
        "principalUuid": "mb\_principal\_v21481002980078",  
        "createTime": "2016-12-06T05:43:02Z",  
        "status": "ACTIVE",  
        "updateTime": "2016-12-06T05:43:02Z",  
        "commandTopic": "mb\_commandTopic\_v21481002980078",  
        "uuid": "4ac62c7e-da98-4c1e-95df-2313cf66754b"  
    }

    创建

    接口描述

    相对URI HTTP 方式
    /v1/gateway POST

    输入

    名称 类型 是否必选 默认值 参数位置 说明
    code String Y body json 网关名称
    description String N "" body json 网关描述
    useSsl Boolean Y body json 是否使用SSL通信

    输出

    201: 成功

    输出创建成功的gateway

    其他: 失败

    请求示例

    {
        "code":"yyjGateway08",
        "description": "created by api",
        "useSsl":false"
    }

    输出示例

    {
        "username":"parser\_endpoint1472628546412/mb\_thing\_v21481002980078",
        "policyUuid":"mb\_policy\_v21481002980078",
        "useSsl":false,
        "state":"ENABLED",
        "description":"created by api",
        "code":"yyjGateway08",
        "host":"[tcp://10.73.203.34:8061](tcp://10.73.203.34:8061)",
        "password":"vV/idfasdfadfFig=",
        "principalUuid":"mb\_principal\_v21481002980078",
        "createTime":"2016-12-06T05:43:02Z",
        "status":"ACTIVE",
        "updateTime":"2016-12-06T05:43:02Z",
        "commandTopic":"mb\_commandTopic\_v21481002980078",
        "uuid":"4ac62c7e-da98-4c1e-95df-2313cf66754b"
    }

    更新

    接口描述

    相对URI HTTP 方式
    /v1/gateway/:gatewayUuid PUT

    输入

    不能所有字段都为空

    名称 类型 是否必选 默认值 参数位置 说明
    description String N body json 网关描述
    useSsl Boolean N body json 是否使用SSL通信
    state ENUM N body json 状态,[ENABLED, DISABLED]

    输出

    201: 成功

    输出更新成功后的gateway

    其他: 失败 请求示例

    {
        "description":"created by api",
        "useSsl":false,
        "state":"ENABLED"
    }

    输出示例

    {
        "username":"parser\_endpoint1472628546412/mb\_thing\_v21481002980078",
        "policyUuid":"mb\_policy\_v21481002980078",
        "useSsl":false,
        "state":"ENABLED",
        "description":"created by api",
        "code":"yyjGateway08",
        "host":"[tcp://10.73.203.34:8061](tcp://10.73.203.34:8061)",
        "password":"vV/idfasdfadfFig=",
        "principalUuid":"mb\_principal\_v21481002980078",
        "createTime":"2016-12-06T05:43:02Z",
        "status":"ACTIVE",
        "updateTime":"2016-12-06T05:43:02Z",
        "commandTopic":"mb\_commandTopic\_v21481002980078",
        "uuid":"4ac62c7e-da98-4c1e-95df-2313cf66754b"
    }

    重置密钥

    接口描述

    相对URI HTTP 方式
    /v1/gateway/:gatewayUuid/regen PUT

    输出

    201: 成功

    输出更新成功后的gateway

    其他: 失败

    请求示例

    PUT /v1/gateway/4ac62c7e-da98-4c1e-95df-2313cf66754b/regen

    输出示例

    {  
    "username": "parser\_endpoint1472628546412/mb\_thing\_v21481002980078",  
    "policyUuid": "mb\_policy\_v21481002980078",  
    "useSsl": false,  
    "state": "ENABLED",  
    "description": "created by api",  
    "code": "yyjGateway08",  
    "host": "[tcp://10.73.203.34:8061](tcp://10.73.203.34:8061)",  
    "password": "vV/ihR90Zp/HLBwo3b0fHVI14PNVejTl3Cp7e2AVFig=",  
    "principalUuid": "mb\_principal\_v21481002980078",  
    "createTime": "2016-12-06T05:43:02Z",  
    "status": "ACTIVE",  
    "updateTime": "2016-12-06T05:43:02Z",  
    "commandTopic": "mb\_commandTopic\_v21481002980078",  
    "uuid": "4ac62c7e-da98-4c1e-95df-2313cf66754b"  
    }

    删除

    接口描述

    相对URI HTTP 方式
    /v1/gateway/:gatewayUuid DELETE

    输入

    名称 类型 是否必选 默认值 含义
    gatewayUuid String Y 网关id

    输出

    204: 成功

    其他: 失败

    请求示例

    DELETE /v1/gateway/4ac62c7e-da98-4c1e-95df-2313cf66754b
    上一篇
    API接口描述
    下一篇
    Device