addPolicy:添加子账号权限

功能详情

添加子账号权限

请求地址

https://openapi.lechange.cn/openapi/addPolicy

传入参数说明

参数名 参数类型 是否必填 默认值 合法值 参数说明
openid String 子账号ID
policy Object 子账号权限策略
token String 管理员token

备注:子账号参数policy配置参考子账号模式介绍

样例输入

{
    "system":{
        "ver":"1.0",
        "appId":"lcd08b4b07ce224508",
        "sign":"4bb5d3c71ce5df93592358d3d0d4a944",
        "time":1603350473,
        "nonce":"a4d59add-0f04-4b7e-9355-d1fb4e9dc22b"
    },
    "id":"d82a7fa7-655f-4bb8-ab75-72bb3dfa3a94",
    "params":{
        "openid": "5dd2fe5bc11240a9b5d4fd4474c857c5",
        "policy": {
             "statement": [
              {
                    "permission": "Ptz,Talk,Config",
                    "resource": [
                        "dev:469631729",
                        "cam:544229080:1"
                    ]
                },
                {
                    "permission": "Real",
                    "resource": [
                        "dev:470686804"
                    ]
                }
            ]
        }
    }
}

返回data字段说明

无data数据返回

样例输出

{
    "id": "123456",
    "result": {
        "code": "0",
        "msg": "操作成功"
    }
}

results matching ""

    No results matching ""