@@ -5465,6 +5465,98 @@ when any of the row values were changed during an incremental import.
54655465 "outBytes": 0,
54665466 "outBytesUncompressed": 0
54675467 }
5468+
5469+ ## Export Table from Workspace [/v2/storage/workspaces/{workspace_id}/table-export]
5470+
5471+ ### Export Table from Workspace [POST /v2/storage/workspaces/{workspace_id}/table-export]
5472+
5473+ Export a table from a workspace to file storage. This endpoint creates an asynchronous job that exports the specified table
5474+ from the workspace schema to file storage. The exported file can then be downloaded using the file ID returned in the job results.
5475+
5476+ **Note:** Currently only supported for Snowflake workspaces.
5477+
5478+ + Parameters
5479+ + workspace_id (required, number) - The workspace ID
5480+
5481+ + Attributes
5482+ + tableName (required, string) - Name of the table to export from the workspace
5483+ + fileName (optional, string) - Custom filename for the exported file. If not provided, a default filename will be generated.
5484+ + fileType (optional, enum[string]) - File type of the exported file
5485+ + Members
5486+ + csv - Export as CSV format
5487+ + parquet - Export as Parquet format (requires project feature support)
5488+ + Default: csv
5489+
5490+ + Request (application/json)
5491+ + Headers
5492+
5493+ X-StorageApi-Token: your_token
5494+
5495+ + Body
5496+
5497+ {
5498+ "tableName": "my_table",
5499+ "fileName": "custom_export",
5500+ "fileType": "csv"
5501+ }
5502+
5503+ + Response 202 (application/json)
5504+ + Body
5505+
5506+ {
5507+ "id": 12345678,
5508+ "status": "waiting",
5509+ "url": "https://connection.keboola.com/v2/storage/jobs/12345678",
5510+ "tableId": null,
5511+ "operationName": "workspaceTableExport",
5512+ "operationParams": {
5513+ "workspaceId": 504345774,
5514+ "tableName": "my_table",
5515+ "fileName": "custom_export.csv",
5516+ "format": "csv"
5517+ },
5518+ "createdTime": "2025-10-12T21:43:00+0000",
5519+ "startTime": null,
5520+ "endTime": null,
5521+ "runId": null,
5522+ "results": null,
5523+ "creatorToken": {
5524+ "id": "27978",
5525+ "description": "user@example.com"
5526+ },
5527+ "metrics": {
5528+ "inCompressed": false,
5529+ "inBytes": 0,
5530+ "inBytesUncompressed": 0,
5531+ "outCompressed": false,
5532+ "outBytes": 0,
5533+ "outBytesUncompressed": 0
5534+ }
5535+ }
5536+
5537+ + Response 404 (application/json)
5538+
5539+ Workspace not found
5540+
5541+ + Body
5542+
5543+ {
5544+ "error": "Workspace \"999999\" not found",
5545+ "code": 404
5546+ }
5547+
5548+ + Response 400 (application/json)
5549+
5550+ Table not found in workspace or workspace is not a table workspace
5551+
5552+ + Body
5553+
5554+ {
5555+ "error": "Table \"non_existent_table\" not found in workspace \"504345774\"",
5556+ "code": 400
5557+ }
5558+
5559+
54685560 }
54695561
54705562
0 commit comments