Where can I find my tableID

Hi!
I'd like to test Honeycode functions listTableRows and queryTableRows. Both thoose functions require tableId as a parameter. I can't find tableId for any of my tables (where should I click to get that???). Can you please show me from where I can take thatinformation?
Regards
Andrzej

Hi @Andr-576d, nice to see you here, thanks for your post! :honeybee:

You can find the name of your table at the top next to the name of your workbook:

Hope that helps, and let us know if you have any other questions as you create your formulas. :honey_pot: :slight_smile:

Hello Alyssa,
I'm reffering to "tableId" from boto3 documentation of e.g. list_table_rows function (documentation: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/honeycode.html#Honeycode.Client.list_table_rows).

I think tableID is something different (same as workbookID is not the same as workbook name). Also, I've already tried execute mentioned function with table name used in tableID field (see lambda code below):

const AWS = require('aws-sdk');
    const HC = new AWS.Honeycode({ region: 'us-west-2' });
     
    var params = {
        tableId: 'collection_activity',
        workbookId: 'my-workbook-id taken usind Right click on app and --> Get ARN and IDs'
    };
    
    try {
        var retData = await HC.listTableRows(params).promise();
        console.log("Successfull read: " + retData);
    } catch (e) {
        console.error("Error: " + e);
    }

And executing such code gives me below error:

ERROR	Error: ValidationException: 2 validation errors detected: Value 'collection_activity' at 'tableId' failed to satisfy constraint: Member must satisfy regular expression 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}; Value 'collection_activity' at 'tableId' failed to satisfy constraint: Member must have length greater than or equal to 36
END RequestId: ddd76c12-9ee7-4f44-95d6-5b957b0d9470

Summarizing, I'm pretty sure tableID is not equal to table name. My issue is I can't find tableID information and I can't find any documentation that will clarify that.

Thanks in advance!

Hi @Andr-576d :honey_pot:

Got it, thanks for the clarity! To get table IDs from your workbooks for API calls, you can use ListTables. Here's an article with more info on this: ListTables - Amazon Honeycode

AWS CLI:

aws honeycode list-tables \
  --workbook-id "<workbook-id>"

Python SDK:

response = honeycode_client.list_tables(
    workbookId = '<workbook-id>')

You'll just enter in your workbook ID, and the response will list all of the associated tables IDs :slight_smile: :honeybee:

It works, thanks Alyssa!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.