Skip to main content
The Data Sources API lets you list and manage connected data sources programmatically. Use it to automate workspace provisioning, audit your connected integrations, or connect new databases and SaaS tools as part of your infrastructure-as-code workflow. Connecting and removing sources requires the admin scope; listing sources requires only the read scope.

GET /v1/data-sources — List Data Sources

Retrieve all data sources connected to your workspace.

Request example

cURL

Response — 200 OK

200 OK
string
Unique identifier for the data source.
string
Human-readable name given to the data source when it was connected.
string
The data source type (e.g. postgres, mysql, bigquery, snowflake, stripe).
string
Current sync status. One of:
  • active — syncing normally
  • syncing — a sync is currently in progress
  • error — the last sync failed; check your credentials or network configuration
  • paused — syncing is manually paused
string
ISO 8601 timestamp of the most recently completed sync. null if the source has never synced successfully.

POST /v1/data-sources — Connect a Data Source

Connect a new data source to your Cano Analytics workspace. This endpoint requires the admin scope.
Never log, print, or expose the credentials object. It contains sensitive secrets such as database passwords and API keys. Treat it with the same care as your API key — store it in a secrets manager and transmit it only over HTTPS.

Body parameters

string
required
A descriptive name for this data source (e.g. "Production Postgres", "Stripe Live").
string
required
The type of data source to connect. Supported values include: postgres, mysql, bigquery, snowflake, redshift, stripe, salesforce, hubspot, segment
object
required
Connection credentials. The required fields depend on the type:
  • postgres / mysql / redshift: host, port, database, username, password
  • bigquery: project_id, dataset, service_account_key (JSON object)
  • snowflake: account, warehouse, database, username, password
  • stripe: api_key
  • salesforce / hubspot: access_token or OAuth credentials
object
Optional sync schedule. When omitted, Cano Analytics uses the default cadence for your plan.
  • frequency (string) — hourly, daily, or weekly
  • time (string) — preferred sync time in HH:MM UTC format (applies to daily and weekly)

Request example — connecting a PostgreSQL source

POST /v1/data-sources

Response — 201 Created

201 Created
When a new source is created, its status is initially "testing" while Cano Analytics verifies the credentials and establishes a connection. The status transitions to active once the first sync completes successfully, or error if the connection check fails.

DELETE /v1/data-sources/ — Remove a Data Source

Disconnect and remove a data source from your workspace. This endpoint requires the admin scope.
Removing a data source does not delete historical data that has already been synced into Cano Analytics. Your previously synced tables, events, and reports derived from this source remain intact and queryable. Only future syncs are stopped.

Path parameters

string
required
The unique identifier of the data source to remove.

Request example

cURL

Response — 204 No Content

A successful deletion returns HTTP 204 with no response body.