Getting Started with Honeycode APIs

Honeycode APIs

Amazon Honeycode has two APIs to let you programmatically interact with Honeycode apps:

  • GetScreenData
  • InvokeScreenAutomation

You can use these APIs to read, write, update, or delete data stored in Honeycode workbooks—much as you would interacting with Honeycode apps.

GetScreenData

This API allows you to retrieve data from a screen in a Honeycode app. You can set local variables in the screen to filter, sort, or otherwise affect what is displayed on the screen. This is a read-only API and will not affect data in your workbooks.

InvokeScreenAutomation

This API allows you to invoke an action defined in a screen in a Honeycode app, such as overwriting data, adding, or deleting a row of data. You can set local variables, which can then be used in the automation you’re invoking.


Connecting Honeycode to AWS

The AWS Management Console is where you can connect Amazon Honeycode to AWS. The console enables you to connect a Honeycode team to an AWS account and upgrade or downgrade your team plans.

If you do not have an AWS account, start by creating one. Once you have an AWS account, you can connect it to Honeycode by following these instructions.

Accessing developer tools and APIs

Upgrading to a Plus or Pro plan is a prerequisite to accessing developer tools and Honeycode APIs. Benefits include:

  • Using the AWS Software Developer Kit (SDK) with Honeycode
  • Authorizing team connections and API requests with Identity and Access Management (IAM)
  • Using Honeycode Application Program Interfaces (APIs)

AWS Software Developer Kit (SDK)

The AWS Software Development Kit (SDK) is a software library that enables you to interact with AWS Application Programming Interfaces (APIs). The AWS SDK supports Amazon Honeycode APIs. To use the SDK you will need to connect your Amazon Honeycode team to an AWS account and upgrade your plan to Plus or Pro .

Identity and Access Management (IAM)

AWS Identity and Access Management (IAM) is a service that helps you securely control access to AWS resources. You can use IAM to control who is authenticated (signed in) and authorized (has permissions) to use resources.


Setting up for API access

To use Amazon Honeycode APIs you’ll need to first create a table and add some data. Then build an app and add a screen specific to each API action or automation. Although you can use any app for this purpose, we recommend you create an app solely for API access.

Create a table

You will need a workbook with tables to set up APIs. If you haven’t already done so, create a new workbook and add a new table either by importing a CSV file or by adding data manually. In the example below, we start with a simple tasks table.

Task table

Start building your app

Open Honeycode Builder from the left navigation, click the + and select “Build your own.” Formatting, font, and colors aren’t important for this app, so you can leave the app styling as default, if you wish.

Name your app objects

Honeycode APIs return the names of blocks and data cells, along with the values of data cells. Be thoughtful as you name your objects as they are visible in the API response.


Configuring app screens

There are many ways you can configure your app, but here we’ll show you how to set up screens for some common actions that you can use APIs to execute.

For the examples below, we used the managed policy, AmazonHoneycodeWorkbookFullAccess .

To read data

Based on the Tasks table above, let’s say you want to read items filtered by the Status column. Here’s an example of one way to set up a screen that allows you to use the GetScreenData API to read screen data programatically.

  • Insert a Column list object, which can include a preconfigured filter

  • Choose to filter by the Status column =$[Status filter]

  • Make the =$[Status filter] data cell editable, if it isn’t already

  • Check that the list source is set to =FILTER(Tasks,"(Tasks[Status]=$[Status filter] OR $[Status filter]="""")")

  • Confirm that both data cells in the list shared, and set the sources to the Tasks column and the Status column

Note: The Column list is a preconfigured app object that includes some UI features not shown in the image above.


To add a row

If you want to manipulate data using the InvokeScreenAutomation API to add rows, then set up the screen and corresponding button in your app.

  • Add variable data cells and name them Task and Status

  • Make the data cells editable

  • To add the automation, select the button and click on the Actions tab in the button properties panel

  • Configure your automation to take data from the variable data cell =$[Tasks] and write it to the Tasks column

  • Repeat the automation for the variable data cell =$[Status]


To overwrite a row

If you want to manipulate data using the InvokeScreenAutomation API to overwrite existing rows, then set up the screen and corresponding button in your app.

  • Add a variable data cell, make it editable, and name it Row

  • Under the Display tab, format the data cell as a rowlink and set the source as the Tasks table

  • Add a block and set the data source as the variable data cell =$[Row]

  • Add a variable data cell, name it Task, make it editable, and set the data source to the Task column =[Task]

  • Repeat the above step, naming it Status and setting the data source to to the Status column =[Status]

  • To add the automation, select the button and click on the Actions tab in the button properties panel

  • Configure your automation to take data from the variable data cell =$[Tasks] and overwrite the old data with the new data in the Tasks column

  • Repeat the automation for the variable data cell =$[Status]


To delete a row

If you want to manipulate data using the InvokeScreenAutomation API to delete existing rows, then set up the screen and corresponding button in your app.

  • Add a variable data cell, make it editable, and name it Row
  • Under the Display tab, format the data cell as a rowlink and set the data source as the Tasks table
  • To add the automation, select the button and click on the Actions tab in the button properties panel
  • Configure your automation to delete the context row (aka the triggering row) or a specified row

ARNs and Honeycode IDs

Amazon Resource Names (ARNs) uniquely identify AWS resources and are required for many actions related to IAM policies and API calls.

Accessing ARN and IDs

Please note that you must be on an Amazon Honeycode Plus or Pro plan to access ARNs and IDs in Honeycode. In any app screen, you can right-click to bring up a menu. Select Get ARN and IDs.

Access ARN IDs

From the modal that appears, you can copy the ARN and IDs for the workbook, app, and screen.

Get ARN and ID


ARNs and authorization

If you are using the managed IAM policies AmazonHoneycodeWorkbookFullAccess or AmazonHoneycodeFullAccess , you will not need the ARN for authorization. The ARN is only required to to set up authorization using IAM at a granular level.


Defining Honeycode resources

If you are using a managed policy you can skip this section. If you wish to restrict access at a more granular level, read on. The Honeycode resources that need to be defined in custom IAM policies for APIs are:

  • GetScreenData : screen
  • InvokeScreenAutomation : screen-automation

Screen format

The ARN format for a screen is:

arn:aws:honeycode:AWS Region:AWS account ID:screen:workbook/Workbook ID/app/App ID/screen/Screen ID

You can also use wildcards to specify parts of the ARN and include multiple resources underneath.To specify all screens in a single app you can use the following resource ARN:

arn:aws:honeycode:AWS Region:AWS account ID:screen:workbook/Workbook ID/app/App ID/screen/*

To specify all screens in all apps in a workbook, use the following resource ARN:

arn:aws:honeycode:AWS Region:AWS account ID:screen/Workbook ID/app/*


Screen-automation format

The ARN format for a screen automation is:

arn:aws:honeycode:AWS Region:AWS account ID:screen-automation:workbook/Workbook ID/app/App ID/screen/Screen ID/automation/Automation ID

You can also use wildcards to specify parts of the ARN and include multiple resources underneath. To specify all automations in a specific screen, you can use the following resource ARN in your IAM policy:

arn:aws:honeycode:AWS Region:AWS account ID:screen-automation:workbook/Workbook ID/app/App ID/screen/Screen ID/automation/Automation ID/automation/

Similarly, to specify all automations in a single app you can use the following resource ARN in your IAM policy:

arn:aws:honeycode:AWS Region:AWS account ID:screen-automation:workbook/Workbook ID/app/App ID/screen/*

To specify all automations in all apps in a workbook, use the following resource ARN:

arn:aws:honeycode:AWS Region:AWS account ID:screen-automation:workbook/Workbook ID/app/*

Finally, to specify all automations in all workbooks in your account, you can either use the resource ARN "*" or an ARN in the following format:

arn:aws:honeycode:AWS Region:AWS account ID:screen-automation:workbook/*


GetScreenData parameters

If you want to read a screen programmatically using the GetScreenData API, you will need:

Required:

  • Workbook ID
  • App ID
  • Screen ID

Optional:

  • Max results (default value is 100)
  • Next token (if the previous request specified a pagination token and you’d like to load the next page)
  • Variables (may be required if your screen requires variables to render correctly)

Syntax (AWS CLI):

aws honeycode get-screen-data \
  --profile <profile-name> \
  --workbook-id <workbook-id> \
  --app-id <app-id> \
  --screen-id <screen-id> \
  --max-results <max-results> \
  --next-token <next-token> \
  --variables <variables-json>

There is no reference to logged-in user when calling the GetScreenData API. Formulas with SYS_USER and personalization will not work.


InvokeScreenAutomation parameters

Required:

  • Workbook ID
  • App ID
  • Screen ID
  • Screen automation ID
  • Client request token (it is used to reduce multiple requests in case of retries after transient timeouts)

Optional:

  • Row ID (needed only if the automation is specified inside a block with source)
  • Variables (used to set the value of the variable used in the automation)

Syntax (AWS CLI):

aws honeycode invoke-screen-automation \
  --profile <profile-name> \
  --workbook-id <workbook-id> \
  --app-id <app-id> \
  --screen-id <screen-id> \
  --screen-automation-id <screen-automation-id> \
  --client-request-token <client-request-token> \
  --row-id <row-id> \
  --variables <variables-json>

You can write only as many rows into Honeycode as your screen would at one time (e.g., no batched writes with arbitrary number of rows at once, but 1-n rows at a time based on how you have set up the screen).

As with GetScreenData , there is no notion of logged-in user. Using SYS_USER to write column values will not work. The InvokeScreenAutomation API only allows writing to variable data cells. The API cannot be used to write to shared data cells .


API calls using AWS CLI

At this stage, you’re all set to use Honeycode APIs. If you’ve already set up AWS CLI, this might be the easiest way to verify that everything is working. If you haven’t already set up the CLI, follow the guide.


Making a basic query

An example of a basic query to read a list of tasks using the GetScreenData API.

Request:

aws honeycode get-screen-data \
  --profile <my-auth-profile>\
  --workbook-id <workbook-id> \
  --app-id <app-id> \
  --screen-id <screen-id> \
  --max-results 2

Response:
It loads the first two tasks from the Tasks table. Since there are more than two rows that match the list formula, nextToken is included in the response to continue loading data in subsequent calls.

{
  "nextToken": "<<Next Token Value>>",
  "results": {
    "Tasks List": {
      "headers": [
        {
          "format": "Text",
          "name": "Task"
        },
        {
          "format": "Text",
          "name": "Status"
        }
      ],
      "rows": [
        {
          "dataItems": [
            {
              "formattedValue": "Try Honeycode",
              "rawValue": "Try Honeycode"
            },
            {
              "formattedValue": "In Progress",
              "rawValue": "In Progress"
            }
          ],
          "tableRowId": "<<A Row ID is here>>"
        },
        {
          "dataItems": [
            {
              "formattedValue": "Create a new app in Honeycode",
              "rawValue": "Create a new app in Honeycode"
            },
            {
              "formattedValue": "Not Started",
              "rawValue": "Not Started"
            }
          ],
          "tableRowId": "<<A Row ID is here>>"
        }
      ]
    }
  },
  "workbookCursor": <<A number is here>>
}

Note the format field in the header for rows where the format is set on the formulas on the screen.


Using next token

This GetScreenData example takes the pagination token from the previous response and includes it in the input JSON file for the next call. Remaining parameters are the same as in previous request.

Note that nextToken is different for different calls, even with the same set of parameters. The token expires after one hour, so if you paste the request below, you’ll l get an error response that the token is expired. You’ll need to run the previous request and copy the token from the output into this request.

Request:

aws honeycode get-screen-data \
  --profile <my-auth-profile> \
  --workbook-id <workbook-id> \
  --app-id <app-id> \
  --screen-id <screen-id> \
  --max-results 2' \
  --next-token <Next Token Value>

Response:
Includes data for the next two tasks. If there are more results matching the query, a new pagination token is included in the response.

{
  "nextToken": "<<Next Token Value>>",
  "results": {
    "Tasks List": {
        "headers": [
        {
          "format": "Text",
          "name": "Task"
        },
        {
          "format": "Text",
          "name": "Status"
        }
      ],
      "rows": [
        {
          "dataItems": [
            {
              "formattedValue": "Try API in Honeycode",
              "rawValue": "Try API in Honeycode"
            },
            {
              "formattedValue": "Not Started",
              "rawValue": "Not Started"
            }
          ],
          "tableRowId": "<<A Row ID is here>>"
        },
        {
          "dataItems": [
            {
              "formattedValue": "Read a book",
              "rawValue": "Read a book"
            },
            {
              "formattedValue": "Not Started",
              "rawValue": "Not Started"
            }
          ],
          "tableRowId": "<<A Row Id is here>>"
        }
      ]
    }
  },
  "workbookCursor": <<A number is here>>
}

Passing named variables

This GetScreenData example loads the the list used in the previous example, filtered by the status “Not Started.”

Request:

aws honeycode get-screen-data \
  --profile <my-auth-profile>\
  --workbook-id <workbook-id> \
  --app-id <app-id> \
  --screen-id <screen-id> \
  --max-results 2 \
  --variables '{"Status Filter": { "rawValue": "Not Started"}}'

Response:
Includes data for the for all the tasks that match the specified status. If there are more results matching the query, a new pagination token is included in the response.

{
  "nextToken": "<<Next Token Value>>",
  "results": {
    "Tasks List": {
        "headers": [
        {
          "format": "Text",
          "name": "Task"
        },
        {
          "format": "Text",
          "name": "Status"
        }
      ],
      "rows": [
         {
          "dataItems": [
            {
              "formattedValue": "Create a new app in Honeycode",
              "rawValue": "Create a new app in Honeycode"
            },
            {
              "formattedValue": "Not Started",
              "rawValue": "Not Started"
            }
          ],
          "tableRowId": "<<A Row ID is here>>"
        },
        {
          "dataItems": [
            {
              "formattedValue": "Try API in Honeycode",
              "rawValue": "Try API in Honeycode"
            },
            {
              "formattedValue": "Not Started",
              "rawValue": "Not Started"
            }
          ],
          "tableRowId": "<<A Row ID is here>>"
        },
        {
          "dataItems": [
            {
              "formattedValue": "Read a book",
              "rawValue": "Read a book"
            },
            {
              "formattedValue": "Not Started",
              "rawValue": "Not Started"
            }
          ],
          "tableRowId": "<<A Row ID is here>>"
        }
      ]
    }
  },
  "workbookCursor": <<A number is here>>
}

Adding a row

This InvokeScreenAutomation example adds a new row with the values “Test” and “Not Started” in the Tasks table.

The variables field of the InvokeScreenAutomation request is an optional field. It is used to set the value of the variable used in the automation. It is a map with the variable name as the map key and the value to set as the map value. In the example below, the variables used in the automation are $[Task] and $[Status] .

{
    "Task": {
      "rawValue": "Test"
    },
    "Status": {
      "rawValue": "Not Started"
    }
}

Request :

aws honeycode invoke-screen-automation \
  --profile <my-auth-profile> \
  --workbook-id <workbook-id> \
  --app-id <app-id> \
  --screen-id <screen-id> \
  --screen-automation-id <screen-automation-id> \
  --client-request-token <client-request-token> \
  --variables '{"Task": {"rawValue": "Test"}, "Status":{"rawValue": "Not Started"}}'

Response:
A new task with the name “Test” is added to the Tasks table.

Overwriting a row

In this InvokeScreenAutomation example, the variables used in the automation are $[Row] , $[Task] and $[Status] . The table row ID for the variable $[Row] is located in the output of the GetScreenData calls.

{
    "Row": {
      "rawValue": "<<Table row ID goes here>>"
    },
    "Task": {
      "rawValue": "Test"
    },
    "Status": {
      "rawValue": "In Progress"
    }
}

Request :

aws honeycode invoke-screen-automation \
 --profile <my-auth-profile> \
 --workbook-id <workbook-id> \
 --app-id <app-id> \
 --screen-id <screen-id> \
 --screen-automation-id <screen-automation-id> \
 --client-request-token <client-request-token> \
 --variables '{"variables": {"Row": {"rawValue": "<<Table row ID goes here>>"}, "Task": {"rawValue": "Test"}, "Status":{"rawValue": "In Progress"}}'

Response:
The status of the “Test” task is updated .


Deleting a row

In this example, the variable used in the automation is $[Row] . The table row ID for the variable $[Row] is be located in the output of the GetScreenData calls. A sample call might look like:

{
    "Row": {
      "rawValue": "<<Table row ID goes here>>"
    }
}

Request:

aws honeycode invoke-screen-automation \
  --profile <my-auth-profile> \
  --workbook-id <workbook-id> \
  --app-id <app-id> \
  --screen-id <screen-id> \
  --screen-automation-id <screen-automation-id> \
  --client-request-token <client-request-token> \
  --variables '{"Row": {"rawValue": "<<Table row ID goes here>>"}}'

Response:
The “Test” task is deleted.


API calls using Python with SDK

In this section, we will make the same calls as above using Python script with the AWS SDK. If you haven't installed the SDK already,follow the guide (https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html).

You can use the code snippet below to set up a client. Here, we're using a profile to set up the session, but you can choose to do it in other ways.

import boto3
import json

session = boto3.Session(profile_name = 'sample-honeycode-profile')
honeycode_client = session.client('honeycode', region_name = 'us-west-2')

Making a basic query

An example of a basic query to read a list of tasks using the GetScreenData API. The following code snippet can be used to make a call to get rows from the Tasks table.

Request:

response = honeycode_client.get_screen_data(
    workbookId = '<workbookId>',
    appId = '<appId>',
    screenId = '<screenId>',
    maxResults = 2)
print(json.dumps(response, indent = 4))

Note that we set maxResults to 2 to demonstrate pagination. The default is 100, and its inclusion is optional.

Output:

{
  "ResponseMetadata": {
    "RequestId": "<<RequestId is here>>",
    "HTTPStatusCode": 200,
    "HTTPHeaders": {
      "content-type": "application/json",
      "content-length": "1295",
      "connection": "keep-alive",
      "date": "Tue, 05 May 2020 22:01:41 GMT",
      "x-amzn-requestid": "<<RequestId is here>>",
      "x-amzn-remapped-x-amzn-requestid": "<<RequestId is here>>",
      "x-amzn-remapped-content-length": "1295",
      "x-amz-apigw-id": "MFBK0F3WPHcFcCg=",
      "x-amzn-trace-id": "<<TraceId is here>>",
      "x-amzn-remapped-date": "<<Timestamp here>>",
    },
    "RetryAttempts": 0
  },
  "results": {
  "nextToken": "<<Next Token Value>>",
  "results": {
    "Tasks List": {
        "headers": [
        {
          "format": "Text",
          "name": "Task"
        },
        {
          "format": "Text",
          "name": "Status"
        }
      ],
      "rows": [
        {
          "dataItems": [
            {
              "formattedValue": "Try API in Honeycode",
              "rawValue": "Try API in Honeycode"
            },
            {
              "formattedValue": "Not Started",
              "rawValue": "Not Started"
            }
          ],
          "tableRowId": "<<A Row ID is here>>"
        },
        {
          "dataItems": [
            {
              "formattedValue": "Read a book",
              "rawValue": "Read a book"
            },
            {
              "formattedValue": "Not Started",
              "rawValue": "Not Started"
            }
          ],
          "tableRowId": "<<A Row Id is here>>"
        }
      ]
    }
  },
  "workbookCursor": <<A number is here>>,
  "nextToken": "<< Token string is here>>"
}

Using next token

This GetScreenData example takes the pagination token from the previous response and includes it in the input JSON file for the next call. Remaining parameters are the same as in previous request.

Note that nextToken is different for different calls, even with the same set of parameters. The token expires after one hour, so if you paste the request below, you’ll l get an error response that the token is expired. You’ll need to run the previous request and copy the token from the output into this request.

response = honeycode_client.get_screen_data(
    workbookId = '<workbook-id>',
    appId = '<app-id>',
    screenId = '<screen-id>',
    maxResults = 2)

next_token = response['nextToken']

response = honeycode_client.get_screen_data(
    workbookId = '<workbook-id>',
    appId = '<app-id>',
    screenId = '<screen-id>',
    maxResults = 2,
    nextToken = next_token)
print(json.dumps(response, indent = 2))

Passing named variables

Request:
This GetScreenData example filters the Tasks table to display only tasks that are with the status “Not Started.”

response = honeycode_client.get_screen_data(
    workbookId = '<workbook-id>',
    appId = '<app-id>',
    screenId = '<screen-id>',
    variables = {"Status Filter": { "rawValue": "Not Started"}})
print(json.dumps(response, indent = 2))

Adding, overwriting, and deleting rows

This InvokeScreenAutomation example shows how to add, overwrite, and delete rows in a Tasks table.

Add a row

honeycode_client.invoke_screen_automation(
    workbookId = '<workbook-id>',
    appId = '<app-id>',
    screenId = '<create-row-screen-id>',
    screenAutomationId = ' <screen-automation-id>',
    variables = {"Task": {"rawValue": "Test"}, "Status":{"rawValue": "Not Started"}})

Overwrite a row

honeycode_client.invoke_screen_automation(
    workbookId = '<workbook-id>',
    appId = '<app-id>',
    screenId = '<update-row-screen-id>',
    screenAutomationId = ' <screen-automation-id>',
    variables = {"Row": {"rawValue": "<<Table row ID goes here>>"}, "Task": {"rawValue": "Test"}, "Status":{"rawValue": "In Progress"}})

Delete a row

honeycode_client.invoke_screen_automation(
    workbookId = '<workbook-id>',
    appId = '<app-id>',
    screenId = '<delete-row-screen-id>',
    screenAutomationId = ' <screen-automation-id>',
    variables = {"Row": {"rawValue": "<<Table row ID goes here>>"}})

API integration with AWS CloudTrail

Amazon Honeycode APIs are integrated with AWS CloudTrail, a service that records all API calls and events for AWS accounts. CloudTrail is enabled when you create an AWS account.

Using the information recorded by CloudTrail, you can identify trends and further isolate activity by attributes, such as what API call was made, when, who made the request, and the IP address.

To learn more about CloudTrail, see the AWS CloudTrail User Guide.


Honeycode activity in CloudTrail

When API activity occurs in Amazon Honeycode apps, the activity is recorded in a CloudTrail event. You can view, search, and download recent events in your AWS account.

For an ongoing record of events in Amazon Honeycode, as well as your other AWS accounts, you can create a trail. A trail enables CloudTrail to continuously deliver events as log files to an Amazon S3 bucket.

All Amazon Honeycode API actions are logged by CloudTrail. For example, any calls to the GetScreenData or InvokeScreenAutomation actions generate entries in the CloudTrail log files.

Every event or log entry contains information about who generated the request. The identity information helps you determine:

  • Whether the request was made with root or AWS IAM user credentials
  • Whether the request was made with temporary security credentials for a role or federated user
  • Whether the request was made by another AWS service

For more information, see the CloudTrail userIdentity Element.

If you don't configure a trail, you can still view the most recent events in the CloudTrail console's in event history. For more information, see Viewing Events with CloudTrail Event History.


Honeycode log files on CloudTrail

CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the Amazon Honeycode API calls, so they won't appear in any specific order.

The following example shows a CloudTrail log entry of the GetScreenData action.

{
    "awsRegion": "us-west-2",
    "eventID": "3b61e597-4bf1-4c17-aac5-70440468f7d9",
    "eventName": "GetScreenData",
    "eventSource": "honeycode.amazonaws.com",
    "eventTime": "2020-05-21T07:07:39Z",
    "eventType": "AwsApiCall",
    "eventVersion": "1.05",
    "readOnly": true,
    "recipientAccountId": "123456789012",
    "requestID": "73ae2ce0-214b-4dc8-9378-a7a2e2d7aa4e",
    "requestParameters": {
        "appId": "9507a45a-8e7c-4b9b-bdc7-80c29b5ee3e2",
        "maxResults": 10,
        "screenId": "44e50421-8b7c-4074-a6bd-ba5d581ab020",
        "variables": "***",
        "workbookId": "cf8aff9e-3aa3-45e4-b60e-1512a2fa462c"
    },
    "responseElements": null,
    "sourceIPAddress": "12.345.67.890",
    "userAgent": "Jersey/${project.version} (HttpUrlConnection 1.8.0_201)",
    "userIdentity": {
        "accessKeyId": "ACESSKEYIDEXAMPLE12",
        "accountId": "123456789012",
        "arn": "arn:aws:sts::123456789012:assumed-role/honeycode-full-access/HoneycodeTests-cf9c31ee-dcfd-439c-9ba0-8bb68766bcfe",
        "principalId": "PRINCIPALIDEXAMPLE1234:HoneycodeTests-cf9c31ee-dcfd-439c-9ba0-8bb68766bcfe",
        "sessionContext": {
            "attributes": {
                "creationDate": "2020-05-21T07:07:39Z",
                "mfaAuthenticated": "false"
            },
            "sessionIssuer": {
                "accountId": "123456789012",
                "arn": "arn:aws:iam::123456789012:role/honeycode-full-access",
                "principalId": "PRINCIPALIDEXAMPLE1234",
                "type": "Role",
                "userName": "honeycode-full-access"
            },
            "webIdFederationData": {}
        },
        "type": "AssumedRole"
    }
}

Similarly, the following example shows a CloudTrail log entry of the InvokeScreenAutomation action.

{
    "awsRegion": "us-west-2",
    "eventID": "30c82beb-4d38-41ef-9dd2-961ed827412a",
    "eventName": "InvokeScreenAutomation",
    "eventSource": "honeycode.amazonaws.com",
    "eventTime": "2020-05-21T07:07:29Z",
    "eventType": "AwsApiCall",
    "eventVersion": "1.05",
    "readOnly": false,
    "recipientAccountId": "123456789012",
    "requestID": "18e22c8a-495c-4c0f-b3d3-e308541baef5",
    "requestParameters": {
        "appId": "5c132f99-d482-45be-b4f5-6deaf8067d0a",
        "automationId": "124bb3c9-8ab3-4d39-b380-6a43b63dc666",
        "clientRequestToken": "c5f201b9-76ed-4329-bb46-d4a6cc4fc638",
        "rowId": "row:6655a2f2-1e70-45a9-86ec-4d3c63d443b6/f9b70edb-486a-36b4-b72b-89df6f92be44",
        "screenAutomationId": "124bb3c9-8ab3-4d39-b380-6a43b63dc666",
        "screenId": "d2d4b6c6-c5e4-45fc-b342-019132ffb4f8",
        "variables": "***",
        "workbookId": "aa34dd68-2077-440e-abca-470deef13e9b"
    },
    "responseElements": {
        "workbookCursor": 815985817
    },
    "sourceIPAddress": "54.244.61.237",
    "userAgent": "Jersey/${project.version} (HttpUrlConnection 1.8.0_201)",
    "userIdentity": {
        "accessKeyId": "ACESSKEYIDEXAMPLE12",
        "accountId": "123456789012",
        "arn": "arn:aws:sts::123456789012:assumed-role/honeycode-full-access/HoneycodeTests-3941fe61-25ee-4df1-ba85-411bb7e01472",
        "principalId": "PRINCIPALIDEXAMPLE1234:HoneycodeTests-3941fe61-25ee-4df1-ba85-411bb7e01472",
        "sessionContext": {
            "attributes": {
                "creationDate": "2020-05-21T07:07:26Z",
                "mfaAuthenticated": "false"
            },
            "sessionIssuer": {
                "accountId": "123456789012",
                "arn": "arn:aws:iam::123456789012:role/honeycode-full-access",
                "principalId": "PRINCIPALIDEXAMPLE1234",
                "type": "Role",
                "userName": "honeycode-full-access"
            },
            "webIdFederationData": {}
        },
        "type": "AssumedRole"
    }
}

More AWS CloudTrail resources

Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following:


FAQs

How many transactions can the APIs handle per second?

APIs are throttled at 25 reads per second and 5 writes per second per AWS account. There are a couple things to keep in mind as you think about load on APIs.

  • The maximum number of transactions an API can handle will depend on the construction and particulars of your workbook. If there are many calculations, especially filter cells that are not written optimally, your workbook can be particularly slow. As a rule of thumb, a well constructed Honeycode workbook can handle about 5-10 requests across read and write actions.
  • The maximum requests your workbook can serve is shared between your users, using either sheets, app builder or apps, and API calls. For instance, if your workbook supports 10 requests per second and you generate 5 requests per second with APIs, your users can only generate about 5 requests a second before performance begins to degrade.

Can I do bulk adding/overwriting/deleting rows?

No, but you can set your app up so that it can add/overwrite/delete a fixed set of rows at once. For example, in the example screen we built in this “Add a row” subsection in the “Configuring your app” section , the create app could have had four data pills instead of two (=$[Task1], =$[Status1] , =$[Task2], =$[Status2]) . With this set up, the automation could have had two add row blocks which could have written these four local variables into two rows. With this set up, you can create up to two rows at a time.


Can I trigger code elsewhere based on an event in Honeycode, such as loading the Honeycode app or on a button click on the Honeycode app?

This functionality is not currently available. In the interim you can set up columns in your tables to capture timestamps when they change and read periodically for rows that have timestamps from after your last API read.


Can I use system variables like SYS_USER, conditional visibility, or personalization in screens I intend to use with Honeycode APIs?

No. These concepts are meant to control the app experience for users. However, since there is no concept of logged-in user when interacting with apps programmatically, they will not be expressed when screens are read from the APIs.


Can I get a history of Honeycode API calls made on my account for security analysis and operational troubleshooting purposes?

Yes. To receive a history of Honeycode API calls made on your account, simply turn on CloudTrail in the AWS Management Console. The AWS API call history produced by CloudTrail enables security analysis, resource change tracking, and compliance auditing. Learn more about CloudTrail at the AWS CloudTrail.

3 Likes