REST API for mass partial update
Perform partial update of many records that pertain to one entity in one single bulk operation.
Note that the mass partial update operation will not invoke the Before-Saving process.
Request
PATCH /services/rest/data/{containerName}/{entity}/bulk
Request URL
http://{serverurl}/talendmdm/services/rest/data/{containerName}/{entity}/bulk
Query Parameters
- containerName: This is a String value which specifies the name of the data container where you want to perform the mass partial update.
- entity: This is a String value which represents the entity on which you want to perform the mass partial update.
- updateReport: This is a Boolean value which controls whether to generate a journal entry (update report). By default, it is True.
Headers
- Content-Type: application/xml
- Authorization: Basic Authentication scheme
Request Body
An XML representation of records that will be used to update the existing data records partially.
Each record contains:
- one or more primary key fields with values, which are mandatory because they will be used to specify the record you want to update,
- an arbitrary number of other fields, with values which will be used to update the existing ones.
Example:
<records>
<Product>
<Id>1</Id>
<Name>New Name</Name>
<Price>30</Price>
</Product>
<Product>
<Id>2</Id>
<Name>New Name2</Name>
</Product>
</records>
Response Body
No content.
Response Code
- 200 OK: Indicates that all specified records are updated successfully.
- 403 FORBIDDEN: Indicates that users do not have read or write access to the specified container or entity.
-
400 Bad Request: Indicates that the mass partial update operation
failed. Possible reasons are:
- The container name specified in the request URL is different from the entity provided in the request body.
- There is no primary key field in the request body.
- There is no primary key value in the request body.
- One or more specified records in the request body do not exist.
- The value is missing for one or more mandatory fields in the request body.
- Invalid data records exist in the request body.
Information noteAttention: If you do not have write access to the specified field(s), the mass
partial update operation will continue to process other fields without throwing any
exceptions. However, you can read the error message in the MDM log file. For example, User
'user' is not allowed to perform following operation(s): update field 'Description' of type
'Product'.