Skip to main content Skip to complementary content
Close announcements banner

Update a record

Updates a data record completely in the specified data container. The record will be provided in the request content as XML or JSON.

If you want to preserve some existing values, use the partial update operation instead. For more information, see Update a record partially.

Request
PUT /services/rest/data/{containerName}

The body is an XML or JSON representation of the record to be updated. The element Id in the request body determines which record will be updated.

Parameters
  • containerName: This is a String value which specifies the name of the data container in which you want to update a data record.
  • container: This is a String value which represents the type of the data container. It is either MASTER (default) or STAGING.
  • updateReport: This is a Boolean value which controls whether to generate a journal entry (update report). By default, it is true.
  • beforeSaving: This is a Boolean value which controls whether to invoke a Before Saving process. By default, it is false. If the beforeSaving parameter is set to true, the updateReport parameter must also be set to true, since a journal entry (update report) needs to be generated to invoke the Before Saving process.
Headers
  • Content-Type: application/xml or text/xml or application/json
    Information noteNote: If the XML declaration is included in the XML request content and the encoding attribute is used, you must set its value to UTF-8.
  • Authorization: Basic Authentication scheme
Response No content.
Status
  • 200 OK: The operation is executed successfully, and the whole data record is replaced by the provided input.
  • 400 BAD REQUEST: The request contains invalid parameter, for example, nonexistent storage name, wrong XML document, invalid storage type, or nonexistent record Id.
  • 401 UNAUTHORIZED: Login fails, invalid username or password.
  • 403 FORBIDDEN: Missing required permission, for example, no required WRITE permission.
  • 404 NOT FOUND: The resource does not exist, for example, invalid service URL.
  • 500 INTERNAL SERVER ERROR: Other errors, for example, the Before Saving process returns error.
Limitation This REST API does not support updating a record for the Role entity in the PROVISIONING system data container.

Sample request in XML format

<Product>
  <Picture>/imageserver/upload/TalendShop/tshirt.jpg</Picture>
  <Id>231035936</Id>
  <Name>Talend Fitted T-Shirt</Name>
  <Description>Fitted T. ultra-fine combed ring spun cotton</Description>
  <Features>
    <Sizes/>
    <Colors/>
  </Features>
  <Availability>false</Availability>
  <Price>18</Price>
  <Family>[1]</Family>
  <OnlineStore>Talend Shop@@http://www.cafepress.com/Talend.231035936</OnlineStore>
  <Stores>
    <Store></Store>
  </Stores>
</Product>

Sample request in JSON format

{
    "Product": {
        "Picture": "/imageserver/upload/TalendShop/tshirt.jpg",
        "Id": "231035936",
        "Name": "Talend Fitted T-Shirt",
        "Description": "Fitted T. ultra-fine combed ring spun cotton",
        "Features": {
            "Sizes": {},
            "Colors": {}
        },
        "Availability": "false",
        "Price": "18",
        "Family": "[1]",
        "OnlineStore": "Talend Shop@@http://www.cafepress.com/Talend.231035936",
        "Stores": {}
    }
}

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!