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
curl -X POST https://api.platic.ai/v1/tools/databases/$DB_ID/enable \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.tools.databases.enable("db_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
databaseId | string | The 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
| Status | details.code | When it happens |
|---|---|---|
403 | FORBIDDEN or INSUFFICIENT_SCOPE | The person behind the token does not have access to Integrations, or the token does not have write permission |
404 | NOT_FOUND | There is no connection with that id in the workspace |
Notes
- Enabling a connection that is already enabled changes nothing.