1. 描述
私查授权。
2. 调用场景
用户在社区应用上查询和自己有关的授权。
3. URL
GET:https://api.xdua.com/usror
4. 请求参数
5. 返回参数
result.list部分
5.1. schema == "GroupByShop1"
名称 | 位置 | 类型 | 示例 | 说明 |
---|---|---|---|---|
shop_id | result.list[] | string | rYub4wrT | 店铺的ID |
shop_name | result.list[] | string | 店铺的名字 | |
role_names | result.list[] | string | 在店铺的角色列表,以逗号隔开 |
5.2. schema == "GroupByCorp1"
名称 | 位置 | 类型 | 示例 | 说明 |
---|---|---|---|---|
corp_id | result.list[] | string | rYub4wrT | 企业的ID |
corp_name | result.list[] | string | 企业的名字 | |
role_names | result.list[] | string | 在企业的角色列表,以逗号隔开 |
6. 错误码
7. 示例
7.1. 在慢护通管理后台 admin.manhu.cn 请求某人所在的店铺
let api_name = "授权查询";
query = {
schema:"GroupByShop1",
}
let res = await xduaClient.qriUsror(query)
console.log(res);
console.log(JSON.stringify(res));
if(res.error == 0){
console.log(api_name+"成功 ");
}else{
console.log(api_name+"失败 "+res.reason);
}
// 返回的数据格式
{
"status": 200,
"apid": "7A2E48C4-471A-42E4-B10B-7C7BFC5FF118",
"apis": "QriUsror",
"error": 0,
"result": {
"limit": 20,
"total": 7,
"sort": {
"inc": "DESC"
},
"count": 7,
"page": 1,
"pages": 1,
"list": [{
"shop_id": "Facility",
"role_names": "店长,管家",
"shop_name": "商务中心老年公寓"
}, {
"shop_id": "LiKVu9ie",
"role_names": "店长,管家",
"shop_name": "济南市兴隆老年公寓"
}, {
"shop_id": "S8pDO17B",
"role_names": "店长",
"shop_name": "济南市历城区南部山区德慧家园养老院"
}, {
"shop_id": "SGKNy3gy",
"role_names": "店长",
"shop_name": "济南市历城区云天使养老院"
}, {
"shop_id": "mh5Jmrxw",
"role_names": "店长",
"shop_name": "济南舜康老年公寓"
}, {
"shop_id": "pLTNw08Z",
"role_names": "店长",
"shop_name": "济南诚通老年公寓"
}, {
"shop_id": "q0B76Hsc",
"role_names": "店长",
"shop_name": "济南市槐荫区和颐家养老院"
}],
"format": "raw",
"where": [],
"offset": 0
},
"debug": [],
"message": "message",
"reason": "success"
}
7.2. 在慢护通管理后台 admin.manhu.cn 请求某人所在的企业列表
query = {
schema:"GroupByCorp1",
}
let res2 = await xduaClient.qriUsror(query)
console.log(res2);
console.log(JSON.stringify(res2));
if(res.error == 0){
console.log(api_name+"成功 ");
}else{
console.log(api_name+"失败 "+res.reason);
}
// 返回的数据格式
{
"status": 200,
"apid": "CDEEC90C-5ACC-4BFF-B335-6625666885F2",
"apis": "QriUsror",
"error": 0,
"result": {
"limit": 20,
"total": 5,
"sort": {
"inc": "DESC"
},
"count": 5,
"page": 1,
"pages": 1,
"list": [{
"corp_id": "1pMYmQMk",
"role_names": "创始人,总裁",
"corp_name": "中国科学院计算技术研究所临沂分所"
}, {
"corp_id": "35k7iLfk",
"role_names": "创始人,总裁",
"corp_name": "中国科学院计算技术研究所济宁分所"
}, {
"corp_id": "3KTUEpcT",
"role_names": "创始人,总裁",
"corp_name": "中国科学院计算技术研究所宁波分所"
}, {
"corp_id": "IctJinan",
"role_names": "创始人,总裁",
"corp_name": "中国科学院计算技术研究所济南分所"
}, {
"corp_id": "Srb3CRFw",
"role_names": "创始人,总裁",
"corp_name": "中国科学院计算技术研究所苏州分所"
}],
"format": "raw",
"where": [],
"offset": 0
},
"debug": [],
"message": "message",
"reason": "success"
}