API referenceConsole
Cloud provider
Polylane maps your Turso groups and databases, links them to the services that query them, and records every change. It never connects to your databases.

Connect

Connect Turso from the terminal. Pass --help for the flags Turso accepts, plus --no-browser for headless environments.

Terminal
polylane cloud connect --provider turso

How it works

Access

Polylane uses the Turso Platform API only. It does not connect to your databases and does not hold database credentials.

Infrastructure graph

Polylane syncs the organization every 15 minutes. It maps database groups and databases, with their locations, placement, branch parent and read and write status. A group contains its databases, a schema database manages the databases that use its schema, and a parent database defines each branch made from it.

Polylane stores the hostname of each database. A service elsewhere in your stack that connects to that hostname links to the database on the topology.

Usage checks

The Platform API gives usage as counters for the billing period, not as time series. Thus databases show no metric charts. Polylane reads the counters on each run and compares the change since the previous run with the history of the account. By default, it runs these checks every 30 minutes:

  • Rows read and rows written per hour.
  • Bytes synced per hour, which is the traffic of embedded replicas.
  • Storage growth per hour, and the number of databases.
  • The heaviest query across all active databases.
  • Quota burn: the plan quota that is closest to its limit, projected to the end of the billing period. A projection above the quota adds a capacity warning to the check run. It does not open an issue alone.

Investigations

Polylane has no Turso agent tools. During an investigation, agents read the synced groups and databases, their links to other services, and the results of the checks.

Troubleshooting

"Turso does not recognize this platform API token" error

  • A platform API token is different from a database auth token. Mint one with turso auth api-tokens mint polylane --org <organization> or in your organization settings.
  • Make sure that the token is not revoked in Turso.

"This Turso token is scoped to one organization" error

  • Enter the organization slug of the organization that the token was minted for.

"This Turso token cannot read the databases in this organization" error

  • Make sure that the organization slug is the one that the token was minted for.

"Multiple Turso organizations are reachable" error

  • The token can reach more than one organization. Name the organization to connect.
  • With the API, set the organization field to the organization slug.

Missing resources

  • The first sync can take a few minutes.
  • Click Sync in the account header to start a sync immediately.

Disconnecting

Disconnecting stops every sync and check, and deletes the token that Polylane stored. The token stays valid in Turso. Revoke it in your Turso organization settings or with turso auth api-tokens revoke.

Disconnect

Disconnecting stops every sync and check and deletes the credentials Polylane held. Everything Polylane set up in Turso is removed as well; nothing is left behind.

Terminal
polylane cloud disconnect <id>

Supported resources

2

Resource types that show up in your infrastructure graph.

Database Group
Database