更新同步配置
更新时间:2020-07-10
接口描述
本接口用于创建或者更新一个认证源/应用的同步配置,若认证源/应用下已经有认证源则为更新,否则创建一个同步配置
请求结构
POST /v{version}/target/{targetId}/sync/config HTTP/1.1
Host: idaas.baidubce.com
Authorization: authorization string
{
"projectId":"projectId",
"targetType":"targetType",
"targetActorType":"targetActorType",
"protocol":"protocol",
"status":status,
"syncDirection":"syncDirection",
"permission": [],
"mapping": {...}
}
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号 |
targetId | String | 是 | URL参数 | 应用或者认证源的id |
projectId | String | 否 | RequestBody参数 | 项目id |
targetType | String | 是 | RequestBody参数 | 同步目标的类型 APP/PROVIDER |
targetActorType | String | 是 | RequestBody参数 | 目标实体类型 OU/ACCOUNT/SUBUSER/ROLE |
protocol | String | 是 | RequestBody参数 | 同步协议 SCIM/LDAP |
mapping | Object | 是 | RequestBody参数 | 见Mapping对象 |
permission | List | 否 | RequestBody参数 | 用户权限 |
status | Integer | 是 | RequestBody参数 | 是否开启同步,1为开启,0为不开启 |
syncDirection | String | 是 | RequestBody参数 | 同步方向 FROM_IDAAS/TO_IDAAS |
响应头域
除公共头域外,无其它特殊头域。
响应参数
见SyncConfig模型
请求示例
POST https://idaas.baidubce.com/v1/target/d83eccd2e6094f6cabe49928ce6fca46/sync/config
Host: idaas.baidubce.com
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
{
"projectId": "cadd0f870d304c5fa6eccdd4002145dd",
"targetType": "APP",
"targetActorType": "SUBUSER",
"protocol": "SCIM",
"status": 1,
"syncDirection": "FROM_IDAAS",
"permission": [],
"mapping": {
"organizationUnitId": "a2d7ed14191e460a96f0f5cabc4100b7"
}
}
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Wed, 08 Jul 2015 03:28:11 GMT
x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
Server: BWS
{
"projectId": "cadd0f870d304c5fa6eccdd4002145dd",
"targetType": "APP",
"targetActorType": "SUBUSER",
"protocol": "SCIM",
"status": 1,
"syncDirection": "FROM_IDAAS",
"permission": [],
"mapping": {
"organizationUnitId": "a2d7ed14191e460a96f0f5cabc4100b7"
}
}