用户信息对外API
用户信息对外api描述SID向应用提供的标准接口,以便外部应用调用。标准接口如下:
一、标签列表查询接口
分页查询所有标签。
请求⽅式: POST(HTTPS或HTTP)
请求地址: http://self.xxx.com/linkid/api/aggregate/label/public/find/page/api
注:https方式类似。
请求头信息:
Content-Type: application/json; charset=utf-8
Authorization: Bearer xxxx
请求参数:
{
"number": 0,
"size": 2
}
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
number | int | 否 | 页码,默认为1 |
size | int | 否 | 每页数量 |
返回结果:
{
"code": 200,
"message": "OK",
"data": {
"totalElements": 1372,
"totalPages": 1372,
"currentPage": 3,
"pageSize": 1,
"content": [
{
"id": "60cda1c9ef06cf00063d75e2",
"jobStatus": 0,
"jobRoleStatus": 0,
"corn": "0 47 1 * * ?",
"name": "5d089015ac438c8026912af0",
"code": "10001",
"describe": "员工",
"applicationId": null,
"roleIds": [
"61306c79a9c8b400060a8df1",
"61306c70a9c8b400060a8df0",
"612dd7ea67dc350006e1eca7",
"61306c5fa9c8b400060a8def",
"61306b99a9c8b400060a8dee",
"617f63e7b2d1170006dc70ff",
"61272c364bafe80006271822",
"60cda1c9ef06cf00063d75e5"
],
"from": "5c662f3e9a4f79b8f5000001",
"roleSsdFlag": null,
"createUser": "5c7776dfedd9a9952b3b44c2",
"rule": "{\"andOr\":true,\"filedName\":\"userPropertys.5bd55971048a2f376b34d32d.value\",\"filedValue\":[\"1\",\"01\",\"11\",\"12\",\"11234123\"],\"not\":false,\"regex\":false}",
"rulesDescribe": null,
"organizationId": null,
"organizationName": null,
"subOrganizationShow": null,
"rules": null,
"mapParam": null,
"userTotals": 69,
"createTime": "2021.06.19 15:50",
"transferRulesDescribe": null,
"transferRulesDescribeList": null,
"suppleList": null,
"labelTypeIds": null,
"showStatus": null,
"noEdit": false,
"eventType": false,
"public": false
}
]
}
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
code | int | 返回状态code |
message | String | 返回状态消息 |
data | 自定义对象 | 返回值为身份标签信息列表 |
id | string | 标签id |
name | string | 标签名称 |
describe | string | 标签描述 |
createUser | string | 标签维护人 |
organizationId | string | 标签所属部门id |
organizationName | string | 标签所属部门名称 |
suppleList | string | 标签补充名单, 人员objectId列表 |
createTime | string | 标签创建时间 |
labelTypeId | boolean | 标签所属分类id |
showStatus | string | 标签是否公开展示, “public” 公开, 其他否 |
public | boolean | 标签是否公开展示, true 公开, 其他否 |
二、通过标签名称找人
根据标签名称,分页查询用户信息。
请求⽅式: GET(HTTPS或HTTP)
请求地址: http://self.xxx.com/linkid/api/user/public/pageQueryUsersByLabelName
注:https方式类似。
请求头信息:
Content-Type: application/json; charset=utf-8
Authorization: Bearer xxxx
请求参数:
http://self.xxx.com/linkid/api/user/public/pageQueryUsersByLabelName?size=2&number=1&labelName=标签1
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
size | String | 是 | 每页数量 |
number | String | 是 | 页码 |
labelName | String | 是 | 标签名称 |
返回结果:
{
"code": 200,
"message": "OK",
"data": {
"totalElements": 2,
"totalPages": 1,
"currentPage": 1,
"pageSize": 2,
"content": [
{
"GH": "YT00563",
"updatedTime": 1641439416524,
"ZHZT": "true",
"RYZT": "01",
"JXRYZT": "02",
"SFLBDM": "01",
"szdwAndGwmc": [
{
"szdw": "RJDZZZ",
"gwmc": null,
"type": null,
"szdwSource": null
},
{
"szdw": "R6153cb7dc3daab00067a9951",
"gwmc": null,
"type": "rule",
"szdwSource": null
}
],
"PASSWORD": null,
"isDeleted": false,
"XM": "YT00563",
"LABEL": [
"61319d79db686c000603371d",
"60810fca6de5f83120b9d86a",
"6142adeca861bf000628360c",
"6152952642847000068da1da",
"61614c3f4fad650006f1e32b",
"616fd82defc6a9000642990c",
"618c811d5a415600079d6af8"
],
"SZDW": [
"R6153cb7dc3daab00067a9951",
"RJDZZZ"
],
"objectId": "61518c8f659a7600067f6e78"
},
{
"GH": "43567432",
"updatedTime": 1641439417818,
"ZHZT": "true",
"IDCARD": "185472120682",
"RYZT": "01",
"JXRYZT": "01",
"SFZJLXM": "A",
"SFLBDM": "01",
"szdwAndGwmc": [
{
"szdw": "RJDZZZ",
"gwmc": null,
"type": null,
"szdwSource": null
},
{
"szdw": "R6153cb7dc3daab00067a9951",
"gwmc": null,
"type": "rule",
"szdwSource": null
}
],
"PASSWORD": null,
"isDeleted": false,
"XM": "2345675432",
"LABEL": [
"60810fc76de5f83120b9d79f",
"6152952642847000068da1da",
"6142adeca861bf000628360c",
"61614c3f4fad650006f1e32b",
"616fd82defc6a9000642990c",
"618c811d5a415600079d6af8"
],
"SZDW": [
"R6153cb7dc3daab00067a9951",
"RJDZZZ"
],
"objectId": "6151ad39499a580006afe28e"
}
]
}
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
code | int | 返回状态code |
message | String | 返回状态消息 |
data | 自定义对象 | 返回值的自定义对象 |
GH | String | 账号, 参照客户真实“标准”配置 |
XM | String | 姓名 |
SFLBDM | String | 身份类别代码,参照客户真实“标准”配置 |
LASTCHANGEPASSWORDTIME | String | 上次修改密码时间 |
更多返回信息 | 更多返回信息含义,请查看标准 |
三、1:N 认证接口(特征值或照片)
应用上传一张照片或特征值,并在 SID中保存的底库照片或特征值进行比对,获取相似度最高的人的信息。
请求⽅式: POST(HTTPS或HTTP)
请求地址: http://self.xxx.com/faceid/public/auth/search
请求头信息:
Content-Type: application/json; charset=utf-8
Authorization: Bearer xxxx
注:https方式类似。
请求参数:
{
"feature":"xTKzP.....ACAPw==",//(与file二选一)
"file":{ //(与feature二选一)
"image":"/9j/4AAQSkZJRgAB......OMCuquxOVH//2Q==",
"ext":"jpg"
}
}
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
feature | String | 如传输file则不用传输此参数 | 照片的特征值 |
file | 自定义对象 | 如传输feature则不用传输此参数 | 照片对象 |
image | String | 是 | 照片的base64 |
ext | String | 是 | 照片后缀 |
返回结果:
{
"code": 200,
"message": "OK",
"data": {
"userId": "testface",
"image": "/group1/M00/00/09/rBEITl-XwYCAD1-MAAHfytyTzvE998.jpg",
"score": 0.9973,
"appScore": 0.63,
"hasPass": true,
"manyIds": [{
"userId":"testface",
"identityCode":"01"
}],
}
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
code | int | 返回状态code |
message | String | 返回状态消息 |
data | 自定义对象 | 返回值的自定义对象 |
userId | String | 用户账号 |
image | String | 照片对应的存储路径 |
score | Double | 相似值 |
appScore | Double | 厂商相似值标准 |
hasPass | Boolean | 照片是否通过 |
manyIds | 自定义对象 | 用户的所有身份信息 |
—userId | String | 所有身份信息的用户账号 |
—identityCode | String | 所有身份信息的身份code |
四、两张照片相似度比对
上传两张照片进行相似度比对
请求⽅式: POST(HTTPS或HTTP)
请求地址: http://self.xxx.com/faceid/public/auth/compare
请求头信息:
Content-Type: application/json; charset=utf-8
Authorization: Bearer xxxx
请求参数:
{
"imageA": {
"image": "/9j/xxxxxxxxxxxxxxxxxxx==",
"ext": "jpg"
},
"imageB": {
"image": "/9j/xxxxxxxxxxxxxxxxxxx==",
"ext": "jpg"
}
}
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
image | String | 是 | 照片base64 |
ext | String | 是 | 格式 |
返回结果:
//异常情况
{
"code": 412,
"message": "Precondition Failed",
"data": {
"errorCode": 8000008,
"errorMessage": "人脸认证失败,请重新尝试一次"
}
}
//正常情况
{
"code": 200,
"message": "OK",
"data": {
"score": 0.9999772,
"appScore": 0.5,
"hasPass": true
}
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
score | Double | 相似值 |
appScore | Double | 厂商相似值标准 |
hasPass | Boolean | 照片是否通过 |
五、基于身份证或手机号查询人员信息
请求⽅式: GET(HTTPS或HTTP)
请求地址: http://self.xxx.com/linkid/api/aggregate/user/public/find/userInfo/api/all/{certOrTel}
注:https方式类似。
请求头信息:
Content-Type: application/json; charset=utf-8
Authorization: Bearer xxxx
请求参数:
http://self.xxx.com/linkid/api/aggregate/user/public/find/userInfo/api/all/185472120682
参数说明:**
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
certOrTel | String | 是 | 身份证或手机号 |
返回结果:
{
"code": 200,
"message": "OK",
"data": [
{
"GH": "43567432",
"ZHZT": "true",
"UPDATETIME": "2022-01-06T03:23:37.818+0000",
"IDCARD": "185472120682",
"RYZT": "01",
"JXRYZT": "01",
"SFZJLXM": "A",
"SFLBDM": "01",
"PASSWORD": "50P1VZYIZ2yVqEB69/rpYg==",
"XM": "2345675432",
"USERID": "43567432",
"orgInfo": [
{
"org": [
{
"title": "党政组织",
"code": "RJDZZZ",
"key": "RJDZZZ",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": null
}
],
"gangwei": [],
"gongzuo": [],
"organizationMethod": null
},
{
"org": [
{
"title": "测试规则组织定义",
"code": "123413",
"key": "6153cb7bc3daab00067a994f",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": "rule"
},
{
"title": "01",
"code": "rule_organization_4",
"key": "R6153cb7dc3daab00067a9951",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": "rule"
}
],
"gangwei": [],
"gongzuo": [],
"organizationMethod": "rule"
}
],
"LABEL": [
"60810fc76de5f83120b9d79f",
"6152952642847000068da1da",
"6142adeca861bf000628360c",
"61614c3f4fad650006f1e32b",
"616fd82defc6a9000642990c",
"618c811d5a415600079d6af8"
],
"personId": "6151ad39499a580006afe28c",
"CREATETIME": "2021-09-27T11:38:33.816+0000",
"objectId": "6151ad39499a580006afe28e",
"SFLBMC": "员工"
}
]
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
code | int | 返回状态code |
message | String | 返回状态消息 |
data | 自定义对象 | 返回值的自定义对象 |
GH | String | 账号, 参照客户真实“标准”配置 |
XM | String | 姓名 |
SFLBDM | String | 身份类别代码,参照客户真实“标准”配置 |
LASTCHANGEPASSWORDTIME | String | 上次修改密码时间 |
更多返回信息 | 更多返回信息含义,请查看标准 |
六、基于身份证或手机号查询人员有效身份信息
请求⽅式: GET(HTTPS或HTTP)
请求地址: http://self.xxx.com/linkid/api/aggregate/user/public/find/userInfo/api/valid/{certOrTel}
注:https方式类似。
请求头信息:
Content-Type: application/json; charset=utf-8
Authorization: Bearer xxxx
请求参数:
http://self.xxx.com/linkid/api/aggregate/user/public/find/userInfo/api/valid/185472120682
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
certOrTel | String | 是 | 身份证或手机号 |
返回结果:
{
"code": 200,
"message": "OK",
"data": [
{
"GH": "43567432",
"ZHZT": "true",
"UPDATETIME": "2022-01-06T03:23:37.818+0000",
"IDCARD": "185472120682",
"RYZT": "01",
"JXRYZT": "01",
"SFZJLXM": "A",
"SFLBDM": "01",
"PASSWORD": "50P1VZYIZ2yVqEB69/rpYg==",
"XM": "2345675432",
"USERID": "43567432",
"orgInfo": [
{
"org": [
{
"title": "党政组织",
"code": "RJDZZZ",
"key": "RJDZZZ",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": null
}
],
"gangwei": [],
"gongzuo": [],
"organizationMethod": null
},
{
"org": [
{
"title": "测试规则组织定义",
"code": "123413",
"key": "6153cb7bc3daab00067a994f",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": "rule"
},
{
"title": "01",
"code": "rule_organization_4",
"key": "R6153cb7dc3daab00067a9951",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": "rule"
}
],
"gangwei": [],
"gongzuo": [],
"organizationMethod": "rule"
}
],
"LABEL": [
"60810fc76de5f83120b9d79f",
"6152952642847000068da1da",
"6142adeca861bf000628360c",
"61614c3f4fad650006f1e32b",
"616fd82defc6a9000642990c",
"618c811d5a415600079d6af8"
],
"personId": "6151ad39499a580006afe28c",
"CREATETIME": "2021-09-27T11:38:33.816+0000",
"objectId": "6151ad39499a580006afe28e",
"SFLBMC": "员工"
}
]
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
code | int | 返回状态code |
message | String | 返回状态消息 |
data | 自定义对象 | 返回值的自定义对象 |
GH | String | 账号, 参照客户真实“标准”配置 |
XM | String | 姓名 |
SFLBDM | String | 身份类别代码,参照客户真实“标准”配置 |
LASTCHANGEPASSWORDTIME | String | 上次修改密码时间 |
更多返回信息 | 更多返回信息含义,请查看标准 |
七、基于身份证或手机号查询人员失效身份信息
请求⽅式: GET(HTTPS或HTTP)
请求地址: http://self.xxx.com/linkid/api/aggregate/user/public/find/userInfo/api/failure/{certOrTel}
注:https方式类似。
请求头信息:
Content-Type: application/json; charset=utf-8
Authorization: Bearer xxxx
请求参数:
http://self.xxx.com/linkid/api/aggregate/user/public/find/userInfo/api/failure/185472120682
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
certOrTel | String | 是 | 身份证或手机号 |
返回结果:
{
"code": 200,
"message": "OK",
"data": [
{
"GH": "43567432",
"ZHZT": "true",
"UPDATETIME": "2022-01-06T03:23:37.818+0000",
"IDCARD": "185472120682",
"RYZT": "01",
"JXRYZT": "01",
"SFZJLXM": "A",
"SFLBDM": "01",
"PASSWORD": "50P1VZYIZ2yVqEB69/rpYg==",
"XM": "2345675432",
"USERID": "43567432",
"orgInfo": [
{
"org": [
{
"title": "党政组织",
"code": "RJDZZZ",
"key": "RJDZZZ",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": null
}
],
"gangwei": [],
"gongzuo": [],
"organizationMethod": null
},
{
"org": [
{
"title": "测试规则组织定义",
"code": "123413",
"key": "6153cb7bc3daab00067a994f",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": "rule"
},
{
"title": "01",
"code": "rule_organization_4",
"key": "R6153cb7dc3daab00067a9951",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": "rule"
}
],
"gangwei": [],
"gongzuo": [],
"organizationMethod": "rule"
}
],
"LABEL": [
"60810fc76de5f83120b9d79f",
"6152952642847000068da1da",
"6142adeca861bf000628360c",
"61614c3f4fad650006f1e32b",
"616fd82defc6a9000642990c",
"618c811d5a415600079d6af8"
],
"personId": "6151ad39499a580006afe28c",
"CREATETIME": "2021-09-27T11:38:33.816+0000",
"objectId": "6151ad39499a580006afe28e",
"SFLBMC": "员工"
}
]
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
code | int | 返回状态code |
message | String | 返回状态消息 |
data | 自定义对象 | 返回值的自定义对象 |
GH | String | 账号, 参照客户真实“标准”配置 |
XM | String | 姓名 |
SFLBDM | String | 身份类别代码,参照客户真实“标准”配置 |
LASTCHANGEPASSWORDTIME | String | 上次修改密码时间 |
更多返回信息 | 更多返回信息含义,请查看标准 |
八、基于uuid(账号)获取人员信息
请求⽅式: GET(HTTPS或HTTP)
请求地址: http://self.xxx.com/linkid/api/aggregate/user/public/find/userInfo/api/{userId}
注:https方式类似。
请求头信息:
Content-Type: application/json; charset=utf-8
Authorization: Bearer xxxx
请求参数:
http://self.xxx.com/linkid/api/aggregate/user/public/find/userInfo/api/YT00563
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
userId | String | 是 | 账号 |
返回结果:
{
"code": 200,
"message": "OK",
"data": {
"GH": "YT00563",
"ZHZT": "true",
"UPDATETIME": "2022-01-06T03:23:36.524+0000",
"RYZT": "01",
"JXRYZT": "02",
"SFLBDM": "01",
"PASSWORD": "gbtD494Vi8egI3eEmCG4nw==",
"XM": "YT00563",
"USERID": "YT00563",
"orgInfo": [
{
"org": [
{
"title": "党政组织",
"code": "RJDZZZ",
"key": "RJDZZZ",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": null
}
],
"gangwei": [],
"gongzuo": [],
"organizationMethod": null
},
{
"org": [
{
"title": "测试规则组织定义",
"code": "123413",
"key": "6153cb7bc3daab00067a994f",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": "rule"
},
{
"title": "01",
"code": "rule_organization_4",
"key": "R6153cb7dc3daab00067a9951",
"isLeaf": true,
"category": null,
"children": null,
"status": null,
"official": null,
"departmentId": null,
"organizationMethod": "rule"
}
],
"gangwei": [],
"gongzuo": [],
"organizationMethod": "rule"
}
],
"LABEL": [
"61319d79db686c000603371d",
"60810fca6de5f83120b9d86a",
"6142adeca861bf000628360c",
"6152952642847000068da1da",
"61614c3f4fad650006f1e32b",
"616fd82defc6a9000642990c",
"618c811d5a415600079d6af8"
],
"personId": "61518c8f659a7600067f6e76",
"CREATETIME": "2021-09-27T09:19:11.215+0000",
"objectId": "61518c8f659a7600067f6e78",
"SFLBMC": "员工"
}
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
code | int | 返回状态code |
message | String | 返回状态消息 |
data | 自定义对象 | 返回值的自定义对象 |
GH | String | 账号, 参照客户真实“标准”配置 |
XM | String | 姓名 |
SFLBDM | String | 身份类别代码,参照客户真实“标准”配置 |
LASTCHANGEPASSWORDTIME | String | 上次修改密码时间 |
更多返回信息 | 更多返回信息含义,请查看标准 |
字典码值映射
1.身份证件类型字典码值:
序号 | 码值 | 名称 |
---|---|---|
1 | 1 | 居民身份证 |
2 | 15 | 港澳居民来往内地通行证 |
3 | 16 | 港澳居民居住证 |
4 | 17 | 台湾居民居住证 |
5 | 8 | 台湾居民来往内地通行证 |
6 | A | 护照 |
2.性别字典码值
序号 | 码值 | 名称 |
---|---|---|
1 | 0 | 未知的性别 |
2 | 1 | 男性 |
3 | 2 | 女性 |
4 | 9 | 未说明的性别 |
3.人员状态字典码值
序号 | 码值 | 名称 |
---|---|---|
1 | 01 | 正常 |
2 | 02 | 下落不明 |
3 | 03 | 死亡 |
接口调用失败请查看开发指南-Token与Api调用失败须知