Update a database

SDK platic.tools.databases.update()

Update the fields you send. If you send hiddenTables or hiddenColumns, the supplied list fully replaces the previous one.

Example

await platic.tools.databases.update("db_123", { hiddenColumns: ["customers.phone"] });

Path parameters

ParameterTypeDescriptionRequired
databaseIdstringThe id of the connection✓

Request body

It accepts the same fields as connect a database, all optional, with at least one. passwordSecretId: null stops using the current password; the secret stays in Secrets.

{
  "hiddenTables": ["payments"],
  "hiddenColumns": ["customers.phone", "customers.email"],
  "pageSize": 100
}

What happens when you change something

If you change…What happens
engine, host, port, database, user, or ssllastTest goes back to null: test it again
host, port, or sslThe same password is authorized for the new destination. If that is not possible, the response has passwordError and password.state stays needs_authorization
nameThe tools are renamed (db_<name>_…) and keep their id: agents that have them keep using them
password or passwordSecretIdReplaces the password. A new password is stored as another secret

Response

200 OK. data has the connection with the fields in get a database and message is Connection updated.

{
  "status": "success",
  "message": "Connection updated",
  "data": {
    "id": "Xb2mQe7LtR9sKd4fHw1N",
    "name": "store",
    "status": "enabled",
    "hiddenTables": ["payments"],
    "hiddenColumns": ["customers.phone", "customers.email"],
    "pageSize": 100,
    "password": { "state": "authorized", "secretId": "7e4a1c9b3d5f7a0c2e4b6d8f0a1c3e5b7d9f1a3c5e7b9d0f2a4c6e8b0d2f4a6c", "secretName": "Password of the store database" },
    "lastTest": { "ok": true, "at": "2026-11-14T16:01:12.000Z", "version": "PostgreSQL 16.4", "tableCount": 3 },
    "nextStep": "Ready. Give its tools to an agent with PUT /v1/agents/{agentId}/tools/{toolId} and a toolId from tools."
  }
}

The example omits some fields of the connection.

Errors

Statusdetails.codeWhen it happens
400INVALID_REQUESTThe body is empty, a value is not accepted, it has password and passwordSecretId together, or an unknown field. details.issues says which
400INVALID_NAME, INVALID_CONFIG, or INVALID_CONNECTION_STRINGAs in connect a database
403FORBIDDEN or INSUFFICIENT_SCOPEThe person behind the token does not have access to Integrations, or the token does not have write permission
404NOT_FOUNDThere is no connection with that id in the workspace
409NAME_TAKENThere is already another connection or tool with that name

Notes

  • This call is not retried on its own: a password sent twice would be stored in two secrets. If the response is lost, get the connection to see what was left.