BatchUpdateTableRows - Amazon Honeycode

BatchUpdateTableRows

The BatchUpdateTableRows API can be used to update the data in one or more columns of specific rows in a table.

To find more details about using this API check the BatchUpdateTableRows API Reference page.

The following example demonstrates using BatchUpdateTableRows API to update the price column of one row and the date column of another row in the same request. Replace <workbook-id> with your workbook id and <table-id> with the table id from the response of ListTables API call. The row ids <aaa-row-id> and <bbb-row-id> are from the output of the BatchCreateTableRows API call.

AWS CLI Example

aws honeycode batch-update-table-rows \ --workbook-id "<workboook-id>" \ --table-id "<table-id>" \ --rows-to-update '[ { "rowId": "<aaa-row-id>", "cellsToUpdate": { "<price-column-id>": { "fact": "24.74" } } }, { "rowId": "<bbb-row-id>", "cellsToUpdate": { "<last-updated-column-id>": { "fact": "11/7 5:59 PM" } } } ]'

Python SDK Example

response = honeycode_client.batch_update_table_rows( workbookId = '<workbook-id>', tableId = '<table-id>', rowsToUpdate = [ { "rowId": "<aaa-row-id>", "cellsToUpdate": { "<price-column-id>": { "fact": "24.74" } } }, { "rowId": "<bbb-row-id>", "cellsToUpdate": { "<last-updated-column-id>": { "fact": "11/7 5:59 PM" } } } ])

Response

{ "workbookCursor": 1288538679 }

After the rows are updated, this is how the table looks: