Skip to main content

Update Related Items (transactions)

The following APIs are available for transactions that update related items simultaneously:

Here we take the ExecuteAction API as an example to demonstrate how to update related items at the same time.

ExecuteAction API overview

  • ExecuteAction:Execute the specified action
  • Method:POST
  • Request URL Format:/api/v0/applications/:app-id/datastores/:datastore-id/items/action/:item-id/:action-id

Usage

To update Item values in multiple related databases, use the ExecuteAction API to POST a payload with requests to add, update, or delete child Items related_ds_items : [ ... ].

item is parent data(estimate)

"item": {
"5e256923aeae8e212cb2e03b": "value", // text type
"58bbaa27fbfcba6098746061": "5d4c058baa39555618ac9e98", // select type
"58bbaa27fbfcba6098746067" : [ "58bbaa27fbfcba6098746015", "596e2327fbfcbab8283dde09"] // checkbox type
},

Include related item data in related_ds_items

"related_ds_items" : {
"estimateDetail" : [{明細行 },{ },{ },{ }... ]
},

Transaction processing

ensure_transaction : When true is specified, the data update of the header line will be transaction managed (success or all rolled back).