Export API HTTP Error 406

Your Setup:

  • SeaTable Cloud

Describe the Problem/Error/Question:

Hey i am trying to automate the export fo my bases via API for a backup.

Therefore i am trying to use the Export Base endpoint ( Export Base ).

As i want to do that from a windows computer i am using the powershellcode of the api.seatable.com website:

$headers=@{}
$headers.Add("accept", "application/x-zip-compressed")
$headers.Add("authorization", "Bearer TOKEN")
$response = Invoke-RestMethod -Uri 'https://cloud.seatable.io/api/v2.1/workspace/72349/synchronous-export/export-dtable/?dtable_name=LinuxBackup&ignore_asset=true' -Method GET -Headers $headers

As you can see my workspace_id is 72349 and the dtable_name is LinuxBackup. So i assumed the dtable_name should be the name of the BASE i want to export.

Am i doing anything wrong?

PS: The TOKEN is a Account-Token. Created and working via: Get Account-Token with Username and Password

Here is an example of getting a list of my bases:

$headers=@{}
$headers.Add("accept", "application/json")
$headers.Add("authorization", "Bearer TOKEN")
$response = Invoke-RestMethod -Uri 'https://cloud.seatable.io/api/v2.1/user-admin-dtables/' -Method GET -Headers $headers
{
  "personal": [
    {
      "id": 12345678,
      "workspace_id": 72394,
      "uuid": "d741a223-b0b4-4390-8de4-7209d495983b",
      "name": "LinuxBackup",
      "created_at": "2025-12-16T09:20:22+01:00",
      "updated_at": "2025-12-16T09:21:31+01:00",
      "color": null,
      "text_color": null,
      "icon": null,
      "is_encrypted": false,
      "in_storage": true
    }
  ],
  "groups": []
}

Error Messages:

Following error occurs:

HTTP 406

{
  "detail": "Could not satisfy the request Accept header."
}

Hi @mge, and welcome to the SeaTable forum!

I was able to reproduce your problem, and just manage to get the file by getting rid of the "accept": "application/x-zip-compressed" mention.
Please note however that I tested using Python, so:

  • the behavior might not be exactly the same
  • I received a raw (bytes) response, so I add to write in a *.dtable base file

Hope this helps…

Bests,
Benjamin

Hey thanks for you response.
I think i have a follow up error. But this is maybe based on my onpremise server setup and is not related to the first one at all?

Invoke-WebRequest : Page unavailable
Sorry, but the requested page is unavailable due to a server hiccup.
Our engineers have been notified, so check back later.
In Zeile:3 Zeichen:13
+ $response = Invoke-WebRequest -Uri 'https://seatable.test.de ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Is the reason for this “hiccup” only a server error?
The server otherwise seems to respond just as usual if i access it via UI.

Hi again,
I see in your first post $response = Invoke-RestMethod -Uri 'https://cloud.seatable.io... whereas in this one there’s $response = Invoke-WebRequest -Uri 'https://seatable.test.de ..., and seatable.test.de actually doesn’t seem to exist… Isn’t there a mistake?

Bests,
Benjamin

I first tried to test the command. Therefore i used the seatable cloud. But actually i want to use that on a onpremise server.

The servername here does not matter. Its just a server which is only accessible internal.

The other commands, to authenticate for the Account-Token and to List the bases just work as before.