Create or update records in batch mode
Creates or updates multiple data records pertaining to one or several entities in a data container in batch mode. The records will be provided in the request content as XML or JSON.
Information noteNote: Your submitted ID will be
used to create the record even if the ID is set to be auto-generated in the data model. An
update operation will be performed if a record with the same ID already exists in MDM.
You can also perform partial update of many records that pertain to one entity in one single bulk operation through the REST API. For more information, see How to perform mass partial update on MDM data records through the REST API.
Request |
The body is an XML or JSON representation of one or more records to be created or updated. The records in XML representation must be enclosed by a root tag with an arbitrary name, such as records. Each record contains:
|
Parameters |
|
Headers |
|
Response | No content. |
Status |
|
Limitation | This REST API does not support creating or updating multiple records in batch mode for the Role entity in the PROVISIONING system data container. |
Sample request in XML format
<records>
<Store>
<Id>100001</Id>
<Address>Beijing APM</Address>
</Store>
<Store>
<Id>100002</Id>
<Address>Beijing Department Store</Address>
</Store>
<Product>
<Picture>/imageserver/upload/TalendShop/dog.jpg</Picture>
<Id>231035933</Id>
<Name>Talend Dog T-Shirt</Name>
<Description>Doggie t-shirt from American Apparel</Description>
<Features>
<Sizes>
<Size>Small</Size>
<Size>Medium</Size>
<Size>Large</Size>
<Size>X-Large</Size>
</Sizes>
<Colors>
<Color>White</Color>
</Colors>
</Features>
<Availability>false</Availability>
<Price>16.99</Price>
<Family>[3]</Family>
<OnlineStore>Talend Shop@@http://www.cafepress.com/Talend.231035933</OnlineStore>
<Stores>
<Store>100001</Store>
<Store>100002</Store>
</Stores>
</Product>
</records>
Sample request in JSON format
[
{
"Store": {
"Id": "100001",
"Address": "Beijing APM"
}
},
{
"Store": {
"Id": "100002",
"Address": "Beijing Department Store"
}
},
{
"Product": {
"Picture": "/imageserver/upload/TalendShop/dog.jpg",
"Id": "231035933",
"Name": "Talend Dog T-Shirt",
"Description": "Doggie t-shirt from American Apparel",
"Features": {
"Sizes": {
"Size": [
"Small",
"Medium",
"Large",
"X-Large"
]
},
"Colors": {"Color": "White"}
},
"Availability": "false",
"Price": "16.99",
"Family": "[3]",
"OnlineStore": "Talend Shop@@http://www.cafepress.com/Talend.231035933",
"Stores": {
"Store": [
"100001",
"100002"
]
}
}
}
]