AI Chat

Let the chat's sandbox use a project's database.

Changed on

The sandbox gets a database of its own on each PostgreSQL service linked to the project, and a role that can use that database and no other. Commands the assistant runs there receive the credentials as the same POSTGRES_* variables a deployment gets; the values are never shown to the model.

post/ai/conversations/{public_id}/sandbox/projects

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/ai/conversations/{public_id}/sandbox/projects
  • Auth: HTTP bearer

Path parameters

public_idstring required

Conversation public id

Request body

project_idinteger required

The project whose services the sandbox may use.

Response

Sandbox connected

connected_service_idsinteger[] required

Services the sandbox can now reach.

project_idsinteger[] required

Projects the sandbox is now linked to services through.

skipped_service_idsinteger[] required

Linked services left out because their type cannot give a sandbox credentials of its own yet.

variable_namesstring[] required

Names (never values) of the variables commands now run with.

Changes