Enables clients to send a potentially large collection of resource operations in a single request.
The body of a bulk operation contains a set of HTTP resource operations using one of the HTTP methods supported by the API, i.e., POST, PUT, PATCH, or DELETE.
Bulk requests are identified using the following schema URI: "urn:ietf:params:scim:api:messages:2.0:BulkRequest".
Bulk responses are identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:BulkResponse".
Bulk requests and bulk responses share many attributes.
Note: If a bulk job is processed successfully, HTTP response code
200 OKmust be returned; otherwise, an appropriate HTTP error code must be returned.
The service provider must continue performing as many changes as possible and disregard partial failures. The client may override this behavior by specifying a value for the failOnErrors attribute. The failOnErrors attribute defines the number of errors that the service provider should accept before failing the remaining operations returning the response.
To be able to reference a newly created resource, the bulkId attribute may be specified when creating new resources. The bulkId is defined by the client as a surrogate identifier in a POST operation (see Section 3.7.2). The bulkId can then be used by the client to map the service provider id with the bulkId of the created resource.
An integer specifying the number of errors that the service provider will accept before the operation is terminated and an error response is returned.
Defines operations within a bulk job. Each operation corresponds to a single HTTP request against a resource endpoint.
[ { "method": "POST", "path": "/Users", "bulkId": "qwerty", "data": { … } }, { "method": "POST", "path": "/Groups", "bulkId": "ytrewq", "data": { … } }, { "method": "PUT", "path": "/Users/b7c14771-226c-4d05-8860-134711653041", "data": { … } }, { "method": "PATCH", "path": "/Users/5d8d29d3-342c-4b5f-8683-a3cb6763ffcc", "data": { … } }, { "method": "DELETE", "path": "/Users/e9025315-6bea-44e1-899c-1e07454e468b" } ]
curl -i -X POST \
https://innovario.apishowdown.com/_mock/catalog/api-showdown/api-hub/admin/openapi/scim/v2/Bulk \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:BulkRequest"
],
"failOnErrors": 1,
"Operations": [
{
"method": "POST",
"path": "/Users",
"bulkId": "qwerty",
"data": {
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:User"
],
"userName": "Alice"
}
},
{
"method": "POST",
"path": "/Groups",
"bulkId": "ytrewq",
"data": {
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
],
"displayName": "Tour Guides",
"members": [
{
"type": "User",
"value": "bulkId:qwerty"
}
]
}
},
{
"method": "PUT",
"path": "/Users/b7c14771-226c-4d05-8860-134711653041",
"data": {
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id": "b7c14771-226c-4d05-8860-134711653041",
"userName": "Bob"
}
},
{
"method": "PATCH",
"path": "/Users/5d8d29d3-342c-4b5f-8683-a3cb6763ffcc",
"data": {
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"Operations": [
{
"op": "remove",
"path": "nickName"
},
{
"op": "add",
"path": "userName",
"value": "Dave"
}
]
}
},
{
"method": "DELETE",
"path": "/Users/e9025315-6bea-44e1-899c-1e07454e468b"
}
]
}'Successfully performed operations.
An integer specifying the number of errors that the service provider will accept before the operation is terminated and an error response is returned.
Defines operations within a bulk job. Each operation corresponds to a single HTTP request against a resource endpoint.
[ { "location": "https://example.com/v2/Users/92b725cd-9465-4e7d-8c16-01f8e146b87a", "method": "POST", "bulkId": "qwerty", "status": "201" }, { "location": "https://example.com/v2/Groups/e9e30dba-f08f-4109-8486-d5c6a331660a", "method": "POST", "bulkId": "ytrewq", "status": "201" }, { "location": "https://example.com/v2/Users/b7c14771-226c-4d05-8860-134711653041", "method": "PUT", "status": "200" }, { "location": "https://example.com/v2/Users/5d8d29d3-342c-4b5f-8683-a3cb6763ffcc", "method": "PATCH", "status": "200" }, { "location": "https://example.com/v2/Users/e9025315-6bea-44e1-899c-1e07454e468b", "method": "DELETE", "status": "204" } ]
{ "schemas": [ "urn:ietf:params:scim:api:messages:2.0:BulkResponse" ], "Operations": [ { … }, { … }, { … }, { … }, { … } ] }