三元组对外API
三元组对外api描述SID向应用提供的标准接口,以便外部应用调用。标准接口如下:
一、增量获取组织信息
增量获取组织信息
请求⽅式: GET(HTTPS或HTTP)
请求地址: http://self.xxx.com/linkid/api/aggregate/keTan/public/findOrganizationsByDate?timestamp={timestamp}
注:https方式类似。
请求参数:
http://ljw.sso.rghall.com.cn/linkid/api/aggregate/keTan/public/findOrganizationsByDate?timestamp=1601000903868
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
timestamp | long | 是 | 时间戳 |
返回结果:
//有数据
{
"errno": 0,
"error": null,
"entities": [
{
"organizeId": "a",
"organizeCode": "1"
"organizeName": "a",
"parentOrganizeId": "RJXZZZ",
"parentOrganizeCode": "RJXZZZ",
"independent": false,
"timestamp": 1603347326598,
"disabled": false
},
{
"organizeId": "aaaaa",
"organizeCode": "11"
"organizeName": "aaa",
"parentOrganizeId": "",
"parentOrganizeCode": "",
"independent": true,
"timestamp": 1604302576033,
"disabled": true
},
{
"organizeId": "bbb",
"organizeCode": "112"
"organizeName": "bbb",
"parentOrganizeId": "",
"parentOrganizeCode": "",
"independent": true,
"timestamp": 1604302581061,
"disabled": true
}
],
"total": 3
}
//无数据
{
"errno": 1,
"error": "没有需要同步的组织数据",
"entities": null,
"total": 0
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
errno | int | 返回状态, 0 成功, 1 失败 |
error | String | 返回状态消息 |
entities | 自定义对象 | 返回值为部门信息列表 |
total | int | 总记录数 |
organizeId | string | 部门id |
organizeCode | string | 部门code |
organizeName | string | 部门名称 |
parentOrganizeId | string | 父部门id |
parentOrganizeCode | string | 父部门code |
independent | boolean | 是否独立,true 没有父部门 |
disabled | boolean | 是否有效,true 无效, false有效 |
timestamp | long | 时间戳 |
二、增量获取岗位信息
增量获取岗位信息
请求⽅式: GET(HTTPS或HTTP)
请求地址: http://self.xxx.com/linkid/api/aggregate/keTan/public/findPostsByDate?timestamp={timestamp}
注:https方式类似。
请求参数:
请求示例:
http://ljw.sso.rghall.com.cn/linkid/api/aggregate/keTan/public/findPostsByDate?timestamp=1601000903868
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
timestamp | long | 是 | 时间戳 |
返回结果:
{
"errno": 0,
"error": null,
"entities": [
{
"postCode": "88",
"postName": "测试",
"formal": false,
"category":"label",
"timestamp": 1603260786072,
"disabled": false
},
{
"postCode": "61",
"postName": "主任",
"formal": false,
"category":"label",
"timestamp": 1604646910939,
"disabled": false
},
{
"postCode": "62",
"postName": "组长",
"formal": false,
"category":"label",
"timestamp": 1604646926142,
"disabled": false
},
{
"postCode": "aaa",
"postName": "aaaa",
"formal": false,
"category":"label",
"timestamp": 1605099529978,
"disabled": false
}
],
"total": 4
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
errno | int | 返回状态, 0 成功, 1 失败 |
error | String | 返回状态消息 |
entities | 自定义对象 | 返回值为岗位信息列表 |
postCode | string | 岗位编码 |
postName | string | 岗位名称 |
formal | boolean | 是否正式岗位(标签和身份类型作为正式岗位数据), true 是, false 否 |
category | String | 岗位数据来源类型: formal:正式岗位 virtual: 虚拟岗位 label:标签 identity: 身份类别 |
timestamp | long | 时间戳 |
disabled | boolean | 是否有效, true无效, false有效 |
三、增量获取用户信息
增量获取用户信息
请求⽅式: GET(HTTPS或HTTP)
请求地址: http://self.xxx.com/linkid/api/aggregate/keTan/public/findUsersByDate?timestamp={timestamp}
注:https方式类似。
请求参数:
示例: http://ljw.sso.rghall.com.cn/linkid/api/aggregate/keTan/public/findUsersByDate?timestamp=1601000903868
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
timestamp | long | 是 | 时间戳 |
返回结果:
{
"errno": 0,
"error": null,
"entities": [
{
"account": "00000002",
"name": "gzx123",
"email": "null",
"phone": "13305902541",
"timestamp": 1601458338487,
"disabled": true
},
{
"account": "1987121",
"name": "郭知",
"email": "null",
"phone": "13305902541",
"timestamp": 1602666383817,
"disabled": true
}
],
"total": 2
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
errno | int | 返回状态, 0 成功, 1 失败 |
error | String | 返回状态消息 |
entities | 自定义对象 | 返回值为用户信息列表 |
account | string | 账号 |
name | string | 姓名 |
string | 邮箱 | |
phone | string | 手机号 |
timestamp | long | 时间戳 |
disabled | boolean | 是否有效, true无效, false有效 |
四、增量获取三元组关系接口
增量获取三元组关系
请求⽅式: GET(HTTPS或HTTP)
请求地址: http://self.xxx.com/linkid/api/aggregate/keTan/public/findUserOrganizationPost?timestamp={timestamp}
注:https方式类似。
请求参数:
示例: http://ljw.sso.rghall.com.cn/linkid/api/aggregate/keTan/public/findUserOrganizationPost?timestamp=1601000903868
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
timestamp | long | 是 | 时间戳 |
返回结果:
{
"errno": 0,
"error": null,
"entities": [
{
"account": "vincent",
"postCode": "10",
"deptCode": null,
"userCode": null,
"timestamp": 1601458338487,
"disabled": true
},
{
"account": "vincent",
"postCode": "10",
"deptCode": null,
"userCode": null,
"timestamp": 1602666383817,
"disabled": true
}
],
"total": 2
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
errno | int | 返回状态, 0 成功, 1 失败 |
error | String | 返回状态消息 |
entities | 自定义对象 | 返回值为三元组信息列表 |
account | string | 账号 |
postCode | string | 岗位编码 |
deptCode | string | 部门编码 |
userCode | 废弃 | 废弃 |
timestamp | long | 时间戳 |
disabled | boolean | 是否有效, true无效, false有效 |
五、分页获取用户三元组信息
分页增量获取三元组关系
请求⽅式: GET(HTTPS或HTTP)
注:https方式类似。
请求示例:
请求参数:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
timestamp | long | 是 | 时间戳 |
pageSize | int | 是 | 每页条数 |
currentPage | int | 是 | 当前页数 |
返回结果:
{
"errno": 0,
"error": null,
"entities": [
{
"account": "vincent",
"postCode": "10",
"deptCode": null,
"timestamp": 1601458338487,
"disabled": true
},
{
"account": "vincent",
"postCode": "11",
"deptCode": null,
"timestamp": 1602666383817,
"disabled": true
}
],
"total": 2
}
//无数据
{
"errno": 1,
"error": "没有需要同步的组织数据",
"entities": null,
"total": 0
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
errno | int | 返回状态, 0 成功, 1 失败 |
error | String | 返回状态消息 |
entities | 自定义对象 | 返回值为三元组信息列表 |
account | string | 账号 |
postCode | string | 岗位编码 |
deptCode | string | 部门编码 |
timestamp | long | 时间戳 |
disabled | boolean | 是否有效, true无效, false有效 |
total | long | 总人数 |
六、分页获取用户部门岗位数据
分页获取用户部门岗位数据。
请求⽅式: POST(HTTPS或HTTP)
请求地址: http://self.xxx.example.com/linkid/api/aggregate/relationship/public/getUserPostDeptRelations
请求类型: application/json;charset=utf-8
认证参数: Authorization: Bearer {token}
注:https方式类似。
请求参数:
{
"currentPage": 1,
"pageSize": 10,
"reqParam": {
"zzid": "组织id",
"timestamp": 1733399112452,
"deptCode": "部门code",
"userId": "1320***1170",
"userName": "用户姓名",
"postCode": "岗位code"
}
}
参数说明:
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
zzid | String | 是 | 组织id |
deptCode | String | 否 | 部门code |
userId | String | 否 | 用户账号 |
userName | String | 否 | 用户姓名 |
postCode | String | 否 | 岗位code |
timestamp | Long | 是 | 增量查询时间戳(首次传0) |
currentPage | int | 是 | 当前页数 (从1开始) |
pageSize | int | 否 | 每页条数 (最多2000条,默认10条) |
返回结果:
{
"code": 200,
"message": "OK",
"data": {
"totalElements": 16,
"totalPages": 2,
"currentPage": 1,
"pageSize": 10,
"content": [
{
"id": "6757e5f9***100063e84d1",
"zzid": "R**ZZZ",
"userId": "112***1018",
"userName": "zl**005",
"postCode": "ZR1**23",
"postName": "主任",
"deptCode": "RJ**ZZ",
"deptName": "行政组织",
"updatedTime": "2024-12-10T06:55:53.403+00:00",
"deleted": false
},
……
]
}
}
参数说明:
参数 | 类型 | 说明 |
---|---|---|
code | int | 返回状态code |
message | String | 返回状态消息 |
data | 自定义对象 | 返回值的自定义对象 |
id | String | 主键id |
zzid | String | 组织id |
userId | String | 用户账号 |
userName | String | 用户姓名 |
deleted | Boolean | 是否删除(true为失效数据,false为生效数据) |
postCode | String | 岗位code |
postName | String | 岗位名称 |
deptCode | String | 部门code |
deptName | String | 部门名称 |
updatedTime | String | 更新时间 |
接口调用失败请查看开发指南-Token与Api调用失败须知