GetScreenData
The GetScreenData API allows retrieval of data from a screen in a Honeycode app. The API allows setting local variables in the screen to filter, sort or otherwise affect what will be displayed on the screen.
Request Syntax
POST /screendata HTTP/1.1
Content-type: application/json
{
"appId": "string
",
"maxResults": number
,
"nextToken": "string
",
"screenId": "string
",
"variables": {
"string
" : {
"rawValue": "string
"
}
},
"workbookId": "string
"
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- appId
-
The ID of the app that contains the screen.
Type: String
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
- maxResults
-
The number of results to be returned on a single page. Specify a number between 1 and 100. The maximum value is 100.
This parameter is optional. If you don't specify this parameter, the default page size is 100.
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
- screenId
-
The ID of the screen.
Type: String
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
- variables
-
Variables are optional and are needed only if the screen requires them to render correctly. Variables are specified as a map where the key is the name of the variable as defined on the screen. The value is an object which currently has only one property, rawValue, which holds the value of the variable to be passed to the screen.
Type: String to VariableValue object map
Key Length Constraints: Minimum length of 1. Maximum length of 255.
Key Pattern:
^(?!\s*$).+
Required: No
- workbookId
-
The ID of the workbook that contains the screen.
Type: String
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
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"nextToken": "string",
"results": {
"string" : {
"headers": [
{
"format": "string",
"name": "string"
}
],
"rows": [
{
"dataItems": [
{
"formattedValue": "string",
"overrideFormat": "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.
- 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 query has been loaded.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern:
^(?!\s*$).+
- results
-
A map of all the rows on the screen keyed by block name.
Type: String to ResultSet object map
- workbookCursor
-
Indicates the cursor of the workbook at which the data returned by this workbook 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: