API: import_csv OK, append_csv buggy?

Hi all,

I try to use the API to create a table from a CSV file, and afterwards I want to append rows from a second CSV file.

Creating the table with https://DOMAIN/dtable-server/api/v1/dtables/:base_uuid/import-csv/ works fine.

Trying to append a CSV using https://DOMAIN/dtable-server/api/v1/dtables/:base_uuid/append-csv/ does not work correctly (I used curl and httpie for testing):

  • If I use the regular append command, I get an 400 error: “SyntaxError: Unexpected token - in JSON at position 0”.
  • If I replace Content-type:‘application/json’ with enctype:‘multipart/form-data’ in the command (which actually is used in the “import-csv” request, and honestly I don’t understand why we should set JSON content-type here), the appending is done correctly, but the command takes about a minute to finish and then stops with a 504 error (gateway timeout).

Any ideas? Can anybody assure that the syntax for appending CSVs that is currently given in the API docs is correct?

I use Seatable 2.8 on an on-premise system.

Thanks a lot!


@Karlheinz Could you have a look?

Thanks for the report! I have forwarded the bug you found to our developers.

I can assure you that the API docs is correct. However, if you changed the content-type and it works differently, it means some parts of your CSV is not correctly parsed. If it’s OK, we’d like to have a look at your CSV file.

On the other hand: that the 504 error is returned after 1 minute is a minor bug in the current version. The appending has been done immediately after the request. This doesn’t affect the functionality. It’s only that the there’s no respond to this action so after 1 minute a 504 is automatically generated.

We can reproduce the problem of append_csv. We will take a look at it.

Great - thanks for looking into this!

It is a bug. The fix will be included in 3.0 version.

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