GET /connectors/providers for the current list.
If an app is not in the catalog, or you already have your own integration, ingest its data yourself as app sources.
1. Set up a connector
Setting up a connector takes four calls, made once. The example connects one Slack workspace; every provider uses the same calls, and only the credentials and resource types change. Set up your SDK client before running the Python or TypeScript examples.Step 1: Pick a provider
GET /connectors/providers returns the catalog; use an entry’s provider value in the next call. With ?id={provider}, it describes one provider, including credential_schema, the credentials it needs.
List providers and describe one: Python, TypeScript, or cURL
List providers and describe one: Python, TypeScript, or cURL
webhook_support is true for providers whose data arrives by webhook instead of scheduled syncs, such as Supabase.Step 2: Create the connector
POST /connectors stores the credentials for one provider account and says which database and collection the synced data goes to. Nothing syncs yet.
Create a Slack connector: Python, TypeScript, or cURL
Create a Slack connector: Python, TypeScript, or cURL
connector_id: every later call uses it.Step 3: Discover what the credentials can reach
GET /connectors/{id}/discover asks Slack which channels the token can see; for GitHub it returns repositories, and for Notion it returns pages and databases. Each entry has an id, a name, and a resource_type, which you pass to the next call. Providers that sync a whole account return one entry with id all.
Discover Slack channels: Python, TypeScript, or cURL
Discover Slack channels: Python, TypeScript, or cURL
limit (1 to 100) and cursor, and keep going while has_more is true.Step 4: Configure the resources to sync
POST /connectors/{id}/configure activates the resources you choose and starts the first sync right away. The example keeps both channels in the connector’s collection and tags each with a department, so one query searches both and a filter can narrow to one.
Configure two channels: Python, TypeScript, or cURL
Configure two channels: Python, TypeScript, or cURL
configured is the number of resources saved. A warnings list names resources that were saved but returned no records when HydraDB tested them; they stay configured and index nothing until they have data.What each property means
Set the account scope per provider
- Slack: the workspace id, which starts with
T. Open Slack in a browser: it is theT...segment ofapp.slack.com/client/T.../. - GitHub: the organization or user login from your GitHub URL, as in
github.com/my-github-org. - Linear: the workspace name shown in Settings, under Workspace.
- Notion: the workspace name shown at the top of Settings, under Workspace.
- Gmail: leave it empty. To scope queries to one mailbox, filter on
account_emailinadditional_metadatainstead.
Linear workspace documents
Linear documents do not belong to one team or project, so they sync as one always-present resource. Discovery returns it alongside the teams and projects, and you configure it like any other resource. Each document is indexed as aknowledge_base app source. Its Markdown body is searchable, and files uploaded to it (hosted on uploads.linear.app) are downloaded, parsed, and indexed too. Links to external URLs are kept as metadata, not fetched.
The Linear workspace resource in discover and configure: JSON
The Linear workspace resource in discover and configure: JSON
collection to route them elsewhere. In the dashboard, tick “Workspace Documents” in the resource list, the same way you tick a team or project.Klaviyo audience links
Klaviyo campaigns link to their configured included and excluded list or segment audiences throughtargets and excludes, respectively; these links describe audience configuration, not message delivery. Segments link to lists or segments referenced in their definitions through related_to; a reference in a negative rule does not assert positive membership.
Sentry project and team links
Sentry issues link to their project throughpart_of and, when assigned to a team, to that team through related_to. Projects link to each owning team through part_of. These links use native Sentry project and team IDs, not display names, and are fully resolved only after the target is indexed in the same database and collection.
Event-to-issue and user-assignee-to-member links are not provided. An event’s numeric group ID does not identify the issue’s short ID, and a user ID is distinct from an organization member ID.
2. Check that it is syncing
Data usually appears within a few minutes of configure.GET /connectors/{id}/status reports the connector and each resource in one call.
Check connector status: Python, TypeScript, or cURL
Check connector status: Python, TypeScript, or cURL
status is the overall health, such as healthy, degraded, or failed, and lifecycle is what the connector is doing: ingesting until the first sync lands data, then active. Each resource reports its own result, with an action when it failed. Get Connector Status explains every value.
From then on, HydraDB syncs every active resource every sync_interval_seconds (one hour by default). Each sync fetches only what changed since the resource’s saved position (its cursor) and ingests it as app sources. Call POST /connectors/{id}/sync when you need data sooner; a 202 means the sync was started, not that it finished.
Once lifecycle is active, query the data with POST /query like any other knowledge. Section 5 shows how to scope a query to one connector or one channel.
3. Change a connector after setup
Use the call that matches what you want to change. The update calls change only the fields you send.- One resource’s instructions or ACL: Update Connector Resource,
PATCH /connectors/{id}/resources/{resource_id}. - The connector’s instructions, sync interval, or credentials: Update Connector,
PATCH /connectors/{id}. Sendingcredentialsreconnects the connector after a token expired or was revoked; it keeps its id, resources, and sync positions. - Which resources sync, and their collection or metadata: call Configure Connector again. Resources you leave out are not touched. For each resource you list, send
nameandresource_typeagain, because omitted values are cleared. Its sync position, instructions, and ACL are kept. - Stop syncing a resource: Delete Connector Resource.
- Stop syncing for a while: Pause Connector, then Resume Connector. Each resource resumes from its saved position, so nothing created in the meantime is skipped.
- Remove the connector: Delete Connector.
4. Custom ingestion instructions
A custom ingestion instruction is free text that a connector reads at sync time and includes when it extracts entities and relationships from every document it syncs. Use one to explain what the documents do not spell out: a product rename, what a channel is for, or what an internal term means. Suppose your product was renamed from Aurora to Nimbus. Years of Slack threads and Confluence pages mention only the old name, so a search for “Nimbus” misses them. One instruction on the connector fixes that at ingestion time, with no reconnection.Set an instruction on a connector: Python, TypeScript, or cURL
Set an instruction on a connector: Python, TypeScript, or cURL
custom_instructions in configure, or afterwards on its own:
Override one channel, then clear the override: Python, TypeScript, or cURL
Override one channel, then clear the override: Python, TypeScript, or cURL
updateResourceAcl takes customInstructions and acl as top-level fields.GET /connectors/{id} returns the connector’s instruction, and GET /connectors/{id}/resources returns each resource’s, absent when the resource inherits. In the dashboard, the Instructions dialog lists both levels, each resource marked override or inherits.
Before you write one:
- Future syncs only: documents already indexed are not indexed again; each keeps the instruction it was ingested under. Set instructions before the first sync when you can.
- Up to 4,000 characters: longer values are rejected with
400, and the stored value stays as it was. - Cost: the text goes into the extraction prompt for every synced document, so a long instruction on a busy connector costs on every sync. Say what matters and stop.
- Be explicit: “X was renamed to Y; they are the same product; index under Y” works far better than vague guidance. Name the exact terms and keep unrelated rules in separate sentences.
- Interpretation only: instructions do not change which documents sync, where they are stored, or who can read them. Use resource selection, collections, and ACLs for those.
5. Filter on what HydraDB writes
Every source a connector syncs carries two metadata layers, the same two that Metadata describes for all context.metadata contains fields declared in your database’s metadata schema. Filter them with top-level metadata_filters keys. HydraDB always writes connector_id and provider here for every synced source. Your own metadata from configure is merged first, so connector_id and provider win on conflict.
additional_metadata contains free-form fields and needs no schema. HydraDB always writes connector_id and resource_id here, plus provider-native fields such as a Slack message timestamp, a GitHub issue number, or a Linear identifier. Your own additional_metadata from configure is merged first, so provider-generated fields win on conflict.
This is the layer to filter on to scope a query to one connector, channel, repository, or table:
Scope a query to one connector: JSON
Scope a query to one connector: JSON
resource_id the same way to scope to one channel, repository, or table.GET /connectors/providers?id={provider}. Its filterable_fields each carry the filter_key to use in metadata_filters. Its searchable_fields are combined into each document’s searchable text, so you search them together, not one at a time.
6. ACL on synced content
For supported providers, HydraDB captures the provider’s ACL on every sync, so you do not maintain a second access model. Capture and enforcement are separate: the connector’senforce_acl setting controls ACL enforcement on reads. Query explains principals and what a query’s acl matches. To change a source’s ACL, use Update Source Metadata.
enforce_acl is false by default. Omitting it on create leaves the new connector unenforced, and existing connectors remain unenforced until an owner or writer enables it. While it is false, access control is opt-in on each request: send the caller’s identity in acl to filter content, and a request without acl is not filtered by caller identity. This holds for content from a non-enforced connector even when the same request also reads content from an enforced connector. MCP OAuth does not enforce caller identity for a non-enforced connector; send acl when that request needs caller filtering.
What each provider captures
acl_supported and summarizes it in acl_description. Check Get Connector Status for an acl_warning after the first sync. For any other provider, set your own rule on the resource.
Google Drive files shared with a group
This section applies only to Google Drive. No other connector expands groups this way or reports this check. A Drive file shared with a Google Group carries the grantgroup:google:<group email>. To let group members read it, HydraDB reads the group’s members through the Google Workspace Directory API. That needs a Drive connection made by a Workspace admin with Directory access.
When you connect Google Drive, HydraDB checks this access once. The connection check reports the result as google_group_membership_resolves, and the dashboard shows it as a notice:
true: group membership can be read. Members of a group can read the files shared with that group.false: group membership cannot be read. A file shared only through a group keeps itsgroup:google:grant, which no caller matches, so the file stays restricted. With ACL enforcement on, group members cannot see it. A requestaclsees it only if it names the group. The same applies to a group too large to expand.
false, reconnect Google Drive as a Workspace admin with Directory access.
Enforce ACL
Setenforce_acl to true to make reads from this connector use the authenticated caller’s identity against the ACL HydraDB captured. The provider must report acl_supported: true in List Connector Providers. Set it on POST /connectors, or enable or change it later with PATCH /connectors/{id}. In the dashboard, an owner or writer can use the Enforce ACL control in the connector settings. A change takes effect on the next content request for already-synced sources and does not require re-ingestion.
HydraDB decides which providers report acl_supported. If it stops reporting it for a provider, that provider’s connectors stop enforcing within about a minute and keep their stored enforce_acl value. Enforcement resumes when support returns.
Only workspace owners and writers can set or change enforce_acl; readers can view it. The API requires an owner or writer in a signed-in dashboard session: a request authenticated with an API key can create a connector with the default false value, but cannot choose or change the setting.
When enforcement is enabled, HydraDB selects the identity from authentication rather than trusting a caller-supplied acl:
- API key or pasted-key MCP: the email of the person who created the key.
- MCP OAuth: the signed-in user.
- Dashboard: the signed-in user.
acl, HydraDB ignores it for content from connectors with enforcement enabled; the acl still scopes content from non-enforced connectors. A successful response includes exactly one machine-readable warning for the override in meta.warnings:
Set your own rule on a resource
Every source synced from a resource inherits the resource’s rule. Set it inacl at configure time, or afterwards on its own:
Restrict one channel to one person: Python, TypeScript, or cURL
Restrict one channel to one person: Python, TypeScript, or cURL
acl_warning until the next successful read. Your own resource rule still applies; a resource with no rule is readable by everyone.
Restore resource permissions
To remove a source’s own ACL and use its connector resource permissions again, sendacl_inherit: true without acl to Update Source Metadata. Use the ID of a source synced by a configured connector. Uploads and manually ingested sources have no connector resource to inherit from.
acl combined with acl_inherit: true is invalid. acl_inherit: false or an omitted acl_inherit is a no-op and can accompany acl. HydraDB rejects inheritance for uploads and sources without connector resource attribution.
Deleting a connector resource rule does not widen access on its own. To open a restricted resource, set its ACL to ["__public__"].
7. Connect several accounts of one provider
One provider can have several connectors: two Slack workspaces, two GitHub organizations, or a personal and a work Gmail. Each is independent, with its own credentials and resources. Give each Slack, GitHub, Linear, or Notion connector a distinctprovider_account_scope; otherwise sources from two accounts that share an external id overwrite each other in the same database and collection. Gmail has no account scope; tell mailboxes apart with account_email.
All of them can sync into the same collection, so one query searches every account; filter on connector_id to narrow to one. If one account’s data must never meet the others in a query, set collection per resource in configure.
Common mistakes
- Editing an existing resource with
POST /connectors/{id}/resources: the call returns409and changes nothing. UsePATCH /connectors/{id}/resources/{resource_id}for instructions and ACLs, or configure again for routing and metadata. - Reconfiguring without
nameandresource_type: omitted values are cleared. Send both every time you list a resource. - Expecting a resource instruction to add to the connector default: the resource instruction replaces the connector default. Repeat anything from the default that the resource still needs.
- Two accounts of one provider with the same
provider_account_scope: sources that share an external id overwrite each other. Set a distinct scope per account. - Filtering on a provider field as a top-level key: provider-native fields live in
additional_metadata. Use thefilter_keyfrom the provider description. - Querying before the first sync has landed:
lifecyclereadsingestinguntil then. Wait foractive, or checkGET /connectors/{id}/status.
Related
- Connectors API reference: every endpoint, and which one changes what
- Context: the ingestion model synced sources use, and how to ingest from your own integration
- Metadata: schema-backed and free-form metadata
- Databases and Collections: routing resources to databases and collections
- Query: querying connector-synced data
