Important Changes to API and SeaTable Cloud with Version 5.0

Hi, Benjamin

I would like to make how SeaTable and the SDK work more clear.

In SeaTable v5.0, we have added api-gateway component which will make the API calling more efficiency. If you use the latest version of Python SDK to connect with SeaTable 5.0, the process of Python script should be:

  1. base.auth(), after authentication, the SDK will know that api-gateway feature is enabled in the server (the returned value from the server contains “use_api_gateway=True”). Subsequent calls of the SDK will always use the api-gateway URL.
  2. base.list_rows(), the api-gateway URL will be used with convert_keys=true, the server should return data using column_names.

Can you check

  1. Which server version do you use? Do you use version 5.0?
  2. If 5.0 is used, can you check whether https://{server}/api-gateway/api/v2/dtables/{base_uuid}/rows/ is called via the SDK with convert_keys=true?

By design, if you use latest Python SDK to connect SeaTable 5.0, list_rows() should return rows with column names as keys. You don’t need manually add the parameter convert_keys=true

Best regards,
Ranjiwei

Hi Ranjiwei,
Thanks for your answer,
Yes, I use v5 on the cloud. When you updated to 5.0, list_rows() returned keys, and I had to modify the _row_server_url function of the seatable-api python lib to make it return the columns’ names again as explained in this previous post.

Since the last 5.0.8 update, everything seems to be back to normal: the list_rows function returns the columns’ names even without the _row_server_url modification (the function is called with convert_keys=true).

I’m afraid you didn’t get the point of my last post. The idea was just the following:

That’s why, as it’s not a big modification, I thought that I could be a good idea to standardize the functions’ parameters by adding the convert_keys input parameter to the python function with a default false value. In this way, both functions would operate identically (same input parameters, same default values => same documentation).

1 Like

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