Enable a database

SDK platic.tools.databases.enable()

Set the connection to enabled. Agents that already have its tools can use them again without reconnecting them.

Example

await platic.tools.databases.enable("db_123");

Path parameters

ParameterTypeDescriptionRequired
databaseIdstringThe id of the connection✓

It has no body.

Response

200 OK. data has the connection with the fields in get a database.

{
  "status": "success",
  "message": "Connection enabled: agents see its tools",
  "data": {
    "id": "Xb2mQe7LtR9sKd4fHw1N",
    "name": "store",
    "status": "enabled",
    "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
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

Notes

  • Enabling a connection that is already enabled changes nothing.