QueryTableRows - Amazon Honeycode

QueryTableRows

The QueryTableRows API allows you to use a filter formula to query for specific rows in a table.

Request Syntax

POST /workbooks/workbookId/tables/tableId/rows/query HTTP/1.1 Content-type: application/json { "filterFormula": { "contextRowId": "string", "formula": "string" }, "maxResults": number, "nextToken": "string" }

URI Request Parameters

The request uses the following URI parameters.

tableId

The ID of the table whose rows are being queried.

If a table with the specified id could not be found, this API throws ResourceNotFoundException.

Length Constraints: Fixed length of 36.

Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}

Required: Yes

workbookId

The ID of the workbook whose table rows are being queried.

If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.

Length Constraints: Fixed length of 36.

Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}

Required: Yes

Request Body

The request accepts the following data in JSON format.

filterFormula

An object that represents a filter formula along with the id of the context row under which the filter function needs to evaluate.

Type: Filter object

Required: Yes

maxResults

The maximum number of rows to return in each page of the results.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No

nextToken

This parameter is optional. If a nextToken is not specified, the API returns the first page of data.

Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API will throw ValidationException.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: ^(?!\s*$).+

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "columnIds": [ "string" ], "nextToken": "string", "rows": [ { "cells": [ { "format": "string", "formattedValue": "string", "formula": "string", "rawValue": "string" } ], "rowId": "string" } ], "workbookCursor": number }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

columnIds

The list of columns in the table whose row data is returned in the result.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Fixed length of 36.

Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}

nextToken

Provides the pagination token to load the next page if there are more results matching the request. If a pagination token is not present in the response, it means that all data matching the request has been loaded.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: ^(?!\s*$).+

rows

The list of rows in the table that match the query filter.

Type: Array of TableRow objects

workbookCursor

Indicates the cursor of the workbook at which the data returned by this request is read. Workbook cursor keeps increasing with every update and the increments are not sequential.

Type: Long

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient access to perform this action. Check that the workbook is owned by you and your IAM policy allows access to the resource in the request.

HTTP Status Code: 403

InternalServerException

There were unexpected errors from the server.

HTTP Status Code: 500

RequestTimeoutException

The request timed out.

HTTP Status Code: 504

ResourceNotFoundException

A Workbook, Table, App, Screen or Screen Automation was not found with the given ID.

HTTP Status Code: 404

ServiceUnavailableException

Remote service is unreachable.

HTTP Status Code: 503

ThrottlingException

Tps(transactions per second) rate reached.

HTTP Status Code: 429

ValidationException

Request is invalid. The message in the response contains details on why the request is invalid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: