批量端点
批量端点¶
此端点允许在单个批量请求中创建、编辑或删除多个用户,它公开在以下路径中:
<api-root>/scim/v2/Bulk
操作¶
| 操作 | Http 方法 | 请求正文 | 路径变量 | 查询字符串参数 | 响应正文 | HTTP 响应状态 | 响应状态(SCIM 异常) |
|---|---|---|---|---|---|---|---|
| 批量 | POST | BulkRequest | - | - | BulkResponse | 200 (OK) | 400 (Bad Request) |
SCIM 异常¶
调用示例
| HTTP 状态 | 描述 |
|---|---|
| 400 (Bad Request) | 当批量请求不符合服务规范时发生,例如在批量请求内为多个操作提供相同的批量 ID 或缺少某些必需属性。 |
支持的 BulkRequest 字段¶
支持的标准 SCIM 用户字段列在下表中。
| SCIM 用户字段 | 支持的基数(仅限集合) | 支持的值 |
|---|---|---|
| Operations | 1..* | - |
Operations 字段¶
支持的标准 SCIM Operations 字段列在下表中。并非所有 SCIM Operations 标准字段目前都由 CCH Tagetik 支持。
| SCIM 用户字段 | 支持的基数(仅限集合) | 支持的值 |
|---|---|---|
| method | 1..* | - |
| bulkId | - | - |
| path | - | - |
| data | - | - |
| location | - | - |
| response | - | - |
| status | - | - |
示例¶
| 列出所有用户 | |
|---|---|
| 方法 | POST |
| URL | <api-root>/scim/v2/Bulk |
| Body | { "schemas": ["urn:ietf:params:scim:api:messages:2.0:BulkRequest"], "Operations": [{ "method": "POST", "path": "/Users", "bulkId": "1", "data": { "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], "externalId": "testUser1", "userName": "testUser1", "name": { "familyName": "testUser1", "givenName": "testUser1" }, "urn:tgk:params:scim:schemas:extension:2.0:User": { "userReferences": ["TAGETIK"] } } },{ "method": "POST", "path": "/Users", "bulkId": "2", "data": { "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], "externalId": "testUser2", "userName": "testUser2", "name": { "familyName": "testUser1", "givenName": "testUser1" }, "urn:tgk:params:scim:schemas:extension:2.0:User": { "userReferences": ["TAGETIK"] } } },{ "method": "DELETE", "path": "/Users/testUser3" }]} |
| 示例响应 | { "schemas": ["urn:ietf:params:scim:api:messages:2.0:BulkResponse"], "Operations": [ { "method": "POST", "bulkId": "1", "location": "/Users/testUser1", "status": "201" },{ "method": "POST", "bulkId": "2", "location": "/Users/testUser2", "status": "201" },{ "method": "DELETE", "location": "/Users/testUser3", "status": "200" } ] } |
| 说明 | 此调用合并了两个用户创建操作(testUser1、testUser2)和一个删除操作(testUser3)。 |