ListTableRows - Amazon Honeycode

To our valued customers: After careful consideration, we have made the decision to end the Amazon Honeycode beta service, effective February 29, 2024. New customer sign-ups and account plan upgrades are no longer available. Existing customers will be able to use Honeycode and your Honeycode apps as normal (and add team members to your existing account) until February 29, 2024, when the service will be discontinued. After this date, you will no longer be able to use Honeycode or any of the apps you created in Honeycode. To learn more about this change, and how to download your data, visit the Community Discussions.

ListTableRows

The ListTableRows API allows you to retrieve a list of rows in a table in a workbook.

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

In the examples below, replace <workbook-id> with your workbook id and <table-id> with the table id returned by the ListTables API call. Note that maxResults is set to 3 to show how pagination works.

AWS CLI Example

aws honeycode list-table-rows \ --workbook-id "<workboook-id>" \ --table-id "<table-id>" \ --max-results 3

Python SDK Example

response = honeycode_client.list_table_rows( workbookId = '<workbook-id>', tableId = '<table-id>', maxResults = 3)

Response

{ "columnIds": [ "<symbol-column-id>", "<price-column-id>", "<previous-price-column-id>", "<percentage-change-column-id>", "<last-update-column-id>" ], "nextToken": "<token-for-page-2>", "rows": [ { "cells": [ { "format": "AUTO", "formattedValue": "AMZN", "rawValue": "AMZN" }, { "format": "CURRENCY", "formattedValue": "$3,241.16", "rawValue": "3241.16" }, { "format": "CURRENCY", "formattedValue": "$3,048.41", "rawValue": "3048.41" }, { "format": "PERCENTAGE", "formattedValue": "6.32%", "formula": "=[Price]/[Previous Price]-1", "rawValue": "0.06322968367116" }, { "format": "DATE_TIME", "formattedValue": "11/4/20 6:00 PM", "rawValue": "44139.75" } ], "rowId": "<amzn-row-id>" }, { "cells": [ { "format": "AUTO", "formattedValue": "AAPL", "rawValue": "AAPL" }, { "format": "CURRENCY", "formattedValue": "$114.95", "rawValue": "114.95" }, { "format": "CURRENCY", "formattedValue": "$110.44", "rawValue": "110.44" }, { "format": "PERCENTAGE", "formattedValue": "4.08%", "formula": "=[Price]/[Previous Price]-1", "rawValue": "0.040836653386454" }, { "format": "DATE_TIME", "formattedValue": "11/4/20 6:00 PM", "rawValue": "44139.75" } ], "rowId": "<aapl-row-id>" }, { "cells": [ { "format": "AUTO", "formattedValue": "FB", "rawValue": "FB" }, { "format": "CURRENCY", "formattedValue": "$287.38", "rawValue": "287.38" }, { "format": "CURRENCY", "formattedValue": "$265.30", "rawValue": "265.3" }, { "format": "PERCENTAGE", "formattedValue": "8.32%", "formula": "=[Price]/[Previous Price]-1", "rawValue": "0.083226535996985" }, { "format": "DATE_TIME", "formattedValue": "11/4/20 6:00 PM", "rawValue": "44139.75" } ], "rowId": "<fb-row-id>" } ], "workbookCursor": 1288302476 }

Note that the nextToken in the response indicates that there is more data to load. You can pass that value as the nextToken parameter in a subsequent request to retrieve page 2. The new response will have no nextToken since all 6 rows in the table have been loaded.

AWS CLI Example (nextToken)

aws honeycode list-table-rows \ --workbook-id "<workboook-id>" \ --table-id "<table-id>" \ --max-results 3 \ --next-token "<token-for-page-2>"

Python SDK Example (nextToken)

response = honeycode_client.list_table_rows( workbookId = '<workbook-id>', tableId = '<table-id>', maxResults = 3, nextToken = '<token-for-page-2>')

Response (nextToken)

{ "columnIds": [ "<symbol-column-id>", "<price-column-id>", "<previous-price-column-id>", "<percentage-change-column-id>", "<last-update-column-id>" ], "rows": [ { "cells": [ { "format": "AUTO", "formattedValue": "GOOG", "rawValue": "GOOG" }, { "format": "CURRENCY", "formattedValue": "$1,749.13", "rawValue": "1749.13" }, { "format": "CURRENCY", "formattedValue": "$1,650.21", "rawValue": "1650.21" }, { "format": "PERCENTAGE", "formattedValue": "5.99%", "formula": "=[Price]/[Previous Price]-1", "rawValue": "0.05994388592967" }, { "format": "DATE_TIME", "formattedValue": "11/4/20 6:00 PM", "rawValue": "44139.75" } ], "rowId": "<goog-row-id>" }, { "cells": [ { "format": "AUTO", "formattedValue": "NFLX", "rawValue": "NFLX" }, { "format": "CURRENCY", "formattedValue": "$496.95", "rawValue": "496.95" }, { "format": "CURRENCY", "formattedValue": "$487.22", "rawValue": "487.22" }, { "format": "PERCENTAGE", "formattedValue": "2.00%", "formula": "=[Price]/[Previous Price]-1", "rawValue": "0.019970444563031" }, { "format": "DATE_TIME", "formattedValue": "11/4/20 6:00 PM", "rawValue": "44139.75" } ], "rowId": "<nflx-row-id>" }, { "cells": [ { "format": "AUTO", "formattedValue": "MSFT", "rawValue": "MSFT" }, { "format": "CURRENCY", "formattedValue": "$216.39", "rawValue": "216.39" }, { "format": "CURRENCY", "formattedValue": "$206.43", "rawValue": "206.43" }, { "format": "PERCENTAGE", "formattedValue": "4.82%", "formula": "=[Price]/[Previous Price]-1", "rawValue": "0.04824880104636" }, { "format": "DATE_TIME", "formattedValue": "11/4/20 6:00 PM", "rawValue": "44139.75" } ], "rowId": "<msft-row-id>" } ], "workbookCursor": 1288302476 }

ListTableRows API can also be called with specific row ids in the input. In this case, the API returns only the requested row ids.

AWS CLI Example (row ids)

aws honeycode list-table-rows \ --workbook-id "<workboook-id>" \ --table-id "<table-id>" \ --row-ids '["<amzn-row-id>", "<msft-row-id>"]'

Python SDK Example (row ids)

response = honeycode_client.list_table_rows( workbookId = '<workbook-id>', tableId = '<table-id>', rowIds = ['<amzn-row-id>', '<msft-row-id>'])

Response

{ "columnIds": [ "<symbol-column-id>", "<price-column-id>", "<previous-price-column-id>", "<percentage-change-column-id>", "<last-update-column-id>" ], "rows": [ { "cells": [ { "format": "AUTO", "formattedValue": "AMZN", "rawValue": "AMZN" }, { "format": "CURRENCY", "formattedValue": "$3,241.16", "rawValue": "3241.16" }, { "format": "CURRENCY", "formattedValue": "$3,048.41", "rawValue": "3048.41" }, { "format": "PERCENTAGE", "formattedValue": "6.32%", "formula": "=[Price]/[Previous Price]-1", "rawValue": "0.06322968367116" }, { "format": "DATE_TIME", "formattedValue": "11/4/20 6:00 PM", "rawValue": "44139.75" } ], "rowId": "<amzn-row-id>" }, { "cells": [ { "format": "AUTO", "formattedValue": "MSFT", "rawValue": "MSFT" }, { "format": "CURRENCY", "formattedValue": "$216.39", "rawValue": "216.39" }, { "format": "CURRENCY", "formattedValue": "$206.43", "rawValue": "206.43" }, { "format": "PERCENTAGE", "formattedValue": "4.82%", "formula": "=[Price]/[Previous Price]-1", "rawValue": "0.04824880104636" }, { "format": "DATE_TIME", "formattedValue": "11/4/20 6:00 PM", "rawValue": "44139.75" } ], "rowId": "<msft-row-id>" } ], "workbookCursor": 1288302476 }