Skip to main content
Connectors bring external app data into HydraDB automatically. Instead of manually ingesting documents, you authenticate once, pick which resources to sync, and HydraDB continuously replicates provider content as searchable app sources in your knowledge store.

How it works

A connector runs three stages on every sync cycle:
  1. Discover - the connector lists all available resources from the provider: Slack channels, GitHub repos, Linear teams, projects and Workspace Documents, Notion databases and pages, Gmail labels. Call GET /connectors/:id/discover to see what’s available before committing.
  2. Configure - you choose which resources to activate and set sync options. Call POST /connectors/:id/configure with the list of resource IDs to enable.
  3. Sync - HydraDB fetches objects from each active resource since the last cursor and ingests them as app sources. Sync runs on a schedule (default: hourly) or on demand via POST /connectors/:id/sync.

Authentication

All connector endpoints use the same API key as the rest of HydraDB:

Creating a connector

provider_account_scope

provider_account_scope tells HydraDB which external account this connector belongs to. It becomes part of the deduplication key for every object the connector syncs, so two objects with the same content but from different accounts don’t overwrite each other. What value to use and where to find it: Why it matters: if you create two Slack connectors for different workspaces but give them the same provider_account_scope (or omit it on both), their synced messages share a deduplication namespace and will overwrite each other. Set a distinct value per connector whenever you connect more than one account of the same provider.

Configuring resources

After creation, activate specific resources to sync:
lookback_days controls how far back in time the first sync fetches historical data (default: 30). After the initial sync, only new content since the last cursor is fetched. Each resource accepts the following optional fields: See Metadata on synced objects for how these merge with system-generated fields.

Linear Workspace Documents

Linear documents (the docs you write inside Linear) do not belong to a single team or project, so they sync as one always-present resource instead of per team or project. Discovery returns it alongside the teams and projects:
Each document is indexed as a knowledge_base app source. Its markdown body is searchable. Files uploaded into the document (Linear-hosted uploads.linear.app files) are downloaded, parsed, and indexed too. Plain links to external URLs are kept as metadata, not fetched. From the dashboard: tick “Workspace Documents” in the resource list, the same way you tick a team or project. From the API: include the linear_workspace resource in your configure call. To put the documents in their own sub-tenant partition, set sub_tenant_id on it, the same as any other resource:
If you leave sub_tenant_id empty, the documents inherit the connector’s sub-tenant partition.

Metadata on synced objects

Every object synced by a connector lands in HydraDB with two metadata layers:

Tenant metadata (metadata)

Tenant metadata is the schema-declared layer. Fields here are defined once per tenant via database_metadata_schema and are indexed for fast, exact-match filtering. This is what you use for stable high-cardinality fields you filter on often - department, region, status, priority. HydraDB always writes provider into tenant metadata for every synced object. You can extend this with your own fields by passing metadata on each resource in POST /connectors/:id/configure. User-supplied fields are merged first; provider always takes precedence.

Document metadata (additional_metadata)

Document metadata is the free-form layer. No schema required. Each connector automatically populates this with provider-specific fields on every synced object: connector ID, resource ID, provider account scope, and provider-native identifiers (Slack TS, GitHub issue number, Linear identifier, etc.). You can extend this with your own fields by passing additional_metadata on each resource in POST /connectors/:id/configure. User-supplied fields are merged first; provider-generated fields always take precedence. This is what you filter on when you want to scope a query to a specific connector, channel, repo, or inbox.
Querying with document metadata filter

Inspect what a connector stores

Connector contracts are provider-owned and available through the API for every supported connector.

List available providers

GET /connectors/providers without a query parameter returns the catalog of connectable providers:
GET /connector-catalog returns the same providers with two extra properties: rbac_support, whether HydraDB captures this provider’s own access permissions as document ACLs, and rbac_description, a one-line summary of what is captured. See Access Control.

Inspect a single provider

Pass a provider identifier (a provider value from the list above) as the id query parameter:
The response returns the provider identity, which provider streams get indexed, which field values are reachable by search, which keys can filter a query, and the JSON Schema for the credentials the provider needs:
You cannot pinpoint or search over a single searchable field. All searchable_fields are combined into one indexed document text, and search queries run over that combined text as a whole. To narrow results, use filterable_fields with metadata_filters - that is the only per-field targeting mechanism.
Each entry in searchable_fields and filterable_fields includes: To scope a query with a filterable field, place its filter_key inside metadata_filters. A dotted key like additional_metadata.container_id nests under additional_metadata; tenant-scoped keys like provider and connector_id are passed top-level:
Filtering by a provider's filterable field
Filtering by tenant-scoped keys
For classic providers, credential_schema is HydraDB’s own contract - slack and linear each take a single access_token. For MOVEIT-synced providers it is the tap’s schema - dropbox takes app_key, app_secret, and refresh_token.
Connector contracts come from the same normalizers that prepare synced data. Query this endpoint instead of relying on a static field list: it covers the complete connector catalog and stays current as connector normalization changes.
For Gmail, filter on account_email (filter key additional_metadata.account_email) rather than provider_account_scope when scoping to a connected account. The Gmail provider response calls out this exception in its field description.

Permissions on synced content

For supported providers, HydraDB reads the source app’s permissions on every sync and applies them as document ACLs, so a query made on behalf of one user cannot surface a private channel, a restricted Drive file, or a repo they have no access to. Slack, Google Drive, GitHub, Confluence, and Jira have capture paths today; GET /connector-catalog reports which are live for your account. You can also set your own rule per resource, either at configure time with the acl field above or afterwards, on its own:
The change applies to every already-synced document from that resource on the next query, with no re-sync. Full semantics, including how provider-captured permissions and your own rules interact, are in Access Control.

Multiple connectors per provider

You can create more than one connector for the same provider - two Slack workspaces, two GitHub accounts, a personal and a work Gmail. Each connector is independent: its own credentials, its own resources, its own provider_account_scope. Set distinct provider_account_scope values per connector. This value is part of every object’s deduplication key - without it, objects from two accounts of the same provider collide. You can also route different resources from the same connector into different sub-tenants via POST /connectors/:id/configure:

  • App Sources - ingestion model connector objects use
  • Metadata - tenant metadata vs document metadata in depth
  • Multi-Tenant - routing resources to tenants and sub-tenants
  • Query - querying connector-synced data with query_apps: true
  • Access Control - restricting who can retrieve synced content