Bulk operations
Execute multiple SCIM operations in a single request.
Authorization: Requires admin role in the organisation.
Supported Operations:
POST- Create new resources (Users, Groups, Roles)PUT- Replace existing resourcesPATCH- Partially update resourcesDELETE- Remove resources
Limits:
- Maximum operations per request: 100
- Maximum payload size: 1MB
Execution:
- Operations are processed sequentially in order
failOnErrorscontrols how many errors to tolerate before aborting- Cross-references between operations use
bulkId
RFC Reference: RFC 7644 Section 3.7
Body
required
application/json
Responses
- application/scim+json
- application/scim+json
- application/scim+json
- application/scim+json
- application/scim+json
Request Example for post/v2/scim2/Bulk
curl https://api.consentio.co/v2/scim2/Bulk \
--request POST \
--header 'Content-Type: application/scim+json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:BulkRequest"
],
"failOnErrors": 1,
"Operations": [
{
"method": "POST",
"path": "/Users",
"bulkId": "user1",
"data": {
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:consentio:params:scim:schemas:extension:User:1.0"
],
"userName": "john.smith@acme.com",
"name": {
"givenName": "John",
"familyName": "Smith"
},
"emails": [
{
"value": "john.smith@acme.com",
"primary": true
}
],
"active": true,
"urn:consentio:params:scim:schemas:extension:User:1.0": {
"roles": [
"role_purchasing_manager"
]
}
}
},
{
"method": "PATCH",
"path": "/Groups/grp_purchasing",
"data": {
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"Operations": [
{
"op": "add",
"path": "members",
"value": [
{
"value": "bulkId:user1"
}
]
}
]
}
}
]
}'
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:BulkResponse"
],
"Operations": [
{
"method": "string",
"path": "string",
"bulkId": "string",
"status": "string",
"location": "https://example.com",
"response": {}
}
]
}