rename-table
Rename a Data Table. The table's triggers are read back and written with the new name, so renaming never disables its automation.
What it is called on each surface
The wire name is rename-table everywhere: it is what the Wexa MCP server advertises, the REST path is
POST /v1/rename-table, and each SDK exposes it under its own language's naming convention.
| Surface | Name |
|---|---|
| Wexa MCP server | rename-table |
| REST API | POST /v1/rename-table |
| TypeScript SDK | fabric.renameTable() |
| Python SDK | fabric.rename_table() |
Arguments
2 of the 2 arguments are required. Omitting a required one is refused before the tool runs, at the validation stage, so it costs nothing and changes nothing.
| Argument | Type | Required | Notes |
|---|---|---|---|
table_id | string | Required | Table id from list-tables. |
table_name | string | Required | New name. |
project_id, projectID, organization_id and executed_by are not arguments you pass: the
platform binds all four from the credential you authenticated with, and both SDKs refuse them
before the request leaves your process — see
server-bound arguments.
What it returns
The three surfaces wrap this differently, and code written against one will not read another correctly — see return shape.
A real response, captured from a live call to rename-table:
{
"lifecycle_id": "qlc_000202",
"result": {
"table_id": "6ab196817566f41b5c28e31f",
"table_name": "docs_fixture_scratch_renamed",
"triggers_preserved": 0
}
}Keeping the lifecycle_id is what lets you ask later why a call was allowed, refused or held.
Calling it
The same call on all four surfaces. Pick a tab once and every code block in the documentation follows it.
The ids in this example are real, and resolve against the project the documentation is written
against. Swap them for your own. A value in angle brackets is one only you can supply, and the
platform refuses a literal <...>.
curl -sS https://fabric.wexa.ai/v1/rename-table \
-H "authorization: Bearer $FABRIC_API_KEY" \
-H "content-type: application/json" \
-d '{"table_id":"6ab1944e7566f41b5c28e2eb","table_name":"<table_name>"}'Errors
Both SDKs raise the same typed errors, chosen from the gateway's own error string first and its
HTTP status second. rename-table checks the fabric:table.write grant, and reaches the seven classes every
tool reaches — listed under the common set. These are the ones specific to it:
| Error | Status | Raised when |
|---|---|---|
NotFound | 404 | table_id matches no table in this project. |
ConfigurationError | 5xx | rename-table is not available to you. Retrying will not help. |
Governance
Every call to rename-table runs through the same ten-stage lifecycle as every other Wexa tool: the
credential is resolved to a scope, the fabric:table.write grant is checked, quota is drawn down, the arguments are
validated, policy rules are evaluated, the call is executed, the result is shaped and redacted, and an audit
record is written. The lifecycle_id in the response is the handle to that record.
rename-table is marked consequential, which means it changes something rather than only reading. It is audited
in full, and a call made with an API key or an SDK session waits for a person to approve it: the call returns
202 and an ApprovalRequired error carrying the approval id and a resume token, and the SDKs can wait for the
decision and resume rather than making you call again. This gate is on by default for every project, admin API
keys included. It is a breaking change for code that expected this call to run at once. A project admin can turn
the gate off, or back on, in the project's settings. Actions taken by a person in the console are not held.