接口调用说明
此页面上的所有端点都以BaseUrl为首拼接,您的baseUrl如下所示:
https://${yourXAuthDomain}
SSWS Token:
请求以下的API需要包含api_token, 通过管理员登录XAuth的控制台,【API】-【Token】-【创建token】来创建调用管理API的Token
查看部门下的成员列表
GET ${baseUrl}/api/v1/account/org/{OrgId}/department/{depId}/member
查看指定组织的部门下的所有成员信息。
请求示例
curl -X 'GET' \
'https://${yourXAuthDomain}/api/v1/account/org/:orgId/department/:depId/member' \
-H 'accept: application/json' \
-H 'Authorization: SSWS ${api_token}' \
-d 'orgId:string'\
-d 'depId:string'
参数 | 描述 | 是否必填 | 类型 |
---|---|---|---|
orgId | 组织ID | 是 | String |
depId | 部门ID | 是 | String |
响应示例
{
"count": 5,
"members": [
{
"id": "RPW2FHeT",
"account": "3222",
"displayName": "马璐",
"wayToAdd": {
"fromRule": []
},
"status": 2,
"depIds": null,
"lastUpdated": "2022-07-19T07:33:36.361717",
"created": "2022-07-19T07:33:36.361750"
},
{
"id": "mPLpsSTu",
"account": "172",
"displayName": "张雪梅",
"wayToAdd": {
"fromRule": []
},
"status": 2,
"depIds": null,
"lastUpdated": "2022-07-19T07:33:36.361717",
"created": "2022-07-19T07:33:36.361750"
},
{
"id": "jYNHDpiA",
"account": "634",
"displayName": "顾玲",
"wayToAdd": {
"fromRule": []
},
"status": 4,
"depIds": null,
"lastUpdated": "2022-07-19T07:33:36.361717",
"created": "2022-07-19T07:33:36.361750"
},
{
"id": "t9jfDZR3",
"account": "1238",
"displayName": "赖阳",
"wayToAdd": {
"fromRule": []
},
"status": 4,
"depIds": null,
"lastUpdated": "2022-07-19T07:33:36.361717",
"created": "2022-07-19T07:33:36.361750"
},
{
"id": "8KGpV9HM",
"account": "3376",
"displayName": "孙辉",
"wayToAdd": {
"fromRule": []
},
"status": 4,
"depIds": null,
"lastUpdated": "2022-07-19T07:33:36.361717",
"created": "2022-07-19T07:33:36.361750"
}
]
}
更新组织的部门成员
PUT ${baseUrl}/api/v1/account/org/:orgId/department/:depId/member/:memberId
更新组织的部门成员(移动成员到某个部门)
请求示例
curl -X 'PUT' \
'https://${yourXAuthDomain}/api/v1/account/org/:orgId/department/:depId/member/:memberId' \
-H 'Content-Type:application/json'\
-H 'accept: application/json' \
-H 'Authorization: SSWS ${api_token}'\
-d 'orgId:string,depId:string,memberId:string'
参数 | 描述 | 是否必填 | 类型 |
---|---|---|---|
orgId | 组织ID | 是 | String |
depId | 部门ID | 是 | String |
memberId | 成员ID | 否 | String |
响应示例
null
移除部门特定成员
DELETE ${baseUrl}/api/v1/account/org/:orgId/department/:depId/member/:memberId
移除所在组织的部门特定成员 memberId 请求示例
curl -X 'POST' \
'https://${yourXAuthDomain}/api/v1/account/org/:orgId/department/:depId/member/:memberId' \
-H 'accept: application/json' \
-H 'Authorization: SSWS ${api_token}' \
-d 'orgId:string'\
-d 'depId:string'\
-d 'memberId'
参数 | 描述 | 是否必填 | 类型 |
---|---|---|---|
orgId | 组织ID,该属性必须唯一 | 是 | String |
depId | 部门ID,该属性必须唯一 | 是 | String |
memberId | 成员ID,该属性必须唯一 | 是 | String |
响应示例
null
更新组织的部门的上级部门
PUT ${baseUrl}/api/v1/account/org/:orgId/department/:depId/shift/:dstDepId
更新组织的部门的上级部门(移动该depId部门到dstDepId部门下)
请求示例
curl -X 'PUT' \
'https://${yourXAuthDomain}/api/v1/account/org/:orgId/department/:depId/shift/:dstDepId' \
-H 'Content-Type:application/json'\
-H 'accept: application/json' \
-H 'Authorization: SSWS ${api_token}'\
-d 'orgId:string,depId:string,dstDepId:string'
参数 | 描述 | 是否必填 | 类型 |
---|---|---|---|
orgId | 组织ID | 是 | String |
depId | 部门ID | 是 | String |
dstDepId | 部门ID | 否 | String |
响应示例
null
##