Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions api-reference/v2/endpoint/add-connector-resource.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,35 @@

<RequestExample>

```python Python SDK
client.connectors.create_resource(
"{connector_id}",
resource_id="C0123456789",
resource_type="channel",
display_name="general",
filters={"lookback_days": 30},
)
```

```typescript TypeScript SDK
await client.connectors.createResource({
id: "{connector_id}",
resourceId: "C0123456789",
resourceType: "channel",
displayName: "general",
filters: { lookback_days: 30 },
});
```

```bash cURL
curl -X POST 'https://api.hydradb.com/connectors/{id}/resources' \
-H "Authorization: Bearer $HYDRA_DB_API_KEY" \
-H "API-Version: 2" \
-H "Content-Type: application/json" \
-d '{
"resource_id": "C0123456789",

Check warning on line 43 in api-reference/v2/endpoint/add-connector-resource.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/add-connector-resource.mdx#L43

Did you really mean 'resource_id'?
"resource_type": "channel",

Check warning on line 44 in api-reference/v2/endpoint/add-connector-resource.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/add-connector-resource.mdx#L44

Did you really mean 'resource_type'?
"display_name": "general",

Check warning on line 45 in api-reference/v2/endpoint/add-connector-resource.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/add-connector-resource.mdx#L45

Did you really mean 'display_name'?
"collection_override": "all-hands",
"filters": { "lookback_days": 30 }
}'
```
Expand All @@ -39,12 +58,12 @@
"resource_type": "channel",
"display_name": "general",
"status": "active",
"provider_cursor": "",

Check warning on line 61 in api-reference/v2/endpoint/add-connector-resource.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/add-connector-resource.mdx#L61

Did you really mean 'provider_cursor'?
"database_override": "",

Check warning on line 62 in api-reference/v2/endpoint/add-connector-resource.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/add-connector-resource.mdx#L62

Did you really mean 'database_override'?
"collection_override": "all-hands",
"collection_override": "",

Check warning on line 63 in api-reference/v2/endpoint/add-connector-resource.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/add-connector-resource.mdx#L63

Did you really mean 'collection_override'?
"tenant_id_override": "",

Check warning on line 64 in api-reference/v2/endpoint/add-connector-resource.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/add-connector-resource.mdx#L64

Did you really mean 'tenant_id_override'?
"sub_tenant_id_override": "all-hands",
"sub_tenant_id_override": "",

Check warning on line 65 in api-reference/v2/endpoint/add-connector-resource.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/add-connector-resource.mdx#L65

Did you really mean 'sub_tenant_id_override'?
"provider_metadata": null,

Check warning on line 66 in api-reference/v2/endpoint/add-connector-resource.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/add-connector-resource.mdx#L66

Did you really mean 'provider_metadata'?
"filters": {
"lookback_days": 30
}
Expand Down
52 changes: 46 additions & 6 deletions api-reference/v2/endpoint/configure-connector.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,54 @@
- The resource's sync position is kept, so it does not sync again from the beginning.
- `custom_instructions` and `acl` are kept when you omit them. To clear instructions, send `""` with [Update Connector Resource](/api-reference/v2/endpoint/update-connector-resource); configure cannot clear them.

<Tip>
To change only a resource's instructions or access rule, use [Update Connector Resource](/api-reference/v2/endpoint/update-connector-resource) instead. It changes just the fields you send.
</Tip>
To change only a resource's instructions or access rule, use [Update Connector Resource](/api-reference/v2/endpoint/update-connector-resource) instead. It changes just the fields you send.

<RequestExample>

```python Python SDK
result = client.connectors.configure(
"{connector_id}",
lookback_days=30,
resources=[
{
"resource_id": "C0123456789",
"resource_type": "channel",
"name": "general",
"metadata": {"department": "all-hands"},
"additional_metadata": {"internal_label": "general-slack"},
},
{
"resource_id": "C0987654321",
"resource_type": "channel",
"name": "incidents",
"custom_instructions": "These threads are incident retros. Extract root cause, impact and owner.",
},
],
)
```

```typescript TypeScript SDK
const result = await client.connectors.configure({
id: "{connector_id}",
lookbackDays: 30,
resources: [
{
resourceId: "C0123456789",
resourceType: "channel",
name: "general",
metadata: { department: "all-hands" },
additionalMetadata: { internal_label: "general-slack" },
},
{
resourceId: "C0987654321",
resourceType: "channel",
name: "incidents",
customInstructions: "These threads are incident retros. Extract root cause, impact and owner.",
},
],
});
```

```bash cURL
curl -X POST 'https://api.hydradb.com/connectors/{id}/configure' \
-H "Authorization: Bearer $HYDRA_DB_API_KEY" \
Expand All @@ -36,15 +78,13 @@
"resource_id": "C0123456789",
"resource_type": "channel",
"name": "general",
"collection": "all-hands",
"metadata": { "department": "all-hands" },
"additional_metadata": { "internal_label": "general-slack" }
},
{
"resource_id": "C0987654321",
"resource_type": "channel",
"name": "incidents",
"collection": "engineering",
"custom_instructions": "These threads are incident retros. Extract root cause, impact and owner."
}
]
Expand All @@ -60,7 +100,7 @@
"connector_id": "{connector_id}",
"configured": 2,
"backfill": false,
"first_sync_at": "2026-06-01T13:00:00Z",

Check warning on line 103 in api-reference/v2/endpoint/configure-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/configure-connector.mdx#L103

Did you really mean 'first_sync_at'?
"message": "First sync is running. Data usually appears within a few minutes; the connector reports lifecycle 'ingesting' until data has synced."
}
```
Expand All @@ -84,4 +124,4 @@
- **Next:** [Get Connector Status](/api-reference/v2/endpoint/get-connector-status): follow the first sync
- [Update Connector Resource](/api-reference/v2/endpoint/update-connector-resource): change one resource's instructions or access rule
- [Discover Resources](/api-reference/v2/endpoint/discover-connector-resources): find resource ids before configuring
- [Connectors - Overview](/api-reference/v2/endpoint/connectors-overview): how synced metadata is merged
- [Connectors: Overview](/api-reference/v2/endpoint/connectors-overview): how synced metadata is merged
8 changes: 8 additions & 0 deletions api-reference/v2/endpoint/connector-resources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@

<RequestExample>

```python Python SDK
resources = client.connectors.list_resources("{connector_id}")
```

```typescript TypeScript SDK
const resources = await client.connectors.listResources({ id: "{connector_id}" });
```

```bash cURL
curl 'https://api.hydradb.com/connectors/{id}/resources' \
-H "Authorization: Bearer $HYDRA_DB_API_KEY" \
Expand All @@ -27,17 +35,17 @@
"resources": [
{
"connector_id": "{connector_id}",
"resource_id": "C0123456789",

Check warning on line 38 in api-reference/v2/endpoint/connector-resources.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connector-resources.mdx#L38

Did you really mean 'resource_id'?
"resource_type": "channel",

Check warning on line 39 in api-reference/v2/endpoint/connector-resources.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connector-resources.mdx#L39

Did you really mean 'resource_type'?
"display_name": "general",

Check warning on line 40 in api-reference/v2/endpoint/connector-resources.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connector-resources.mdx#L40

Did you really mean 'display_name'?
"status": "active",
"provider_cursor": "{cursor}",

Check warning on line 42 in api-reference/v2/endpoint/connector-resources.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connector-resources.mdx#L42

Did you really mean 'provider_cursor'?
"database_override": "",

Check warning on line 43 in api-reference/v2/endpoint/connector-resources.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connector-resources.mdx#L43

Did you really mean 'database_override'?
"collection_override": "all-hands",

Check warning on line 44 in api-reference/v2/endpoint/connector-resources.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connector-resources.mdx#L44

Did you really mean 'collection_override'?
"tenant_id_override": "",

Check warning on line 45 in api-reference/v2/endpoint/connector-resources.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connector-resources.mdx#L45

Did you really mean 'tenant_id_override'?
"sub_tenant_id_override": "all-hands",

Check warning on line 46 in api-reference/v2/endpoint/connector-resources.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connector-resources.mdx#L46

Did you really mean 'sub_tenant_id_override'?
"custom_instructions": "Prioritize decisions and owners.",

Check warning on line 47 in api-reference/v2/endpoint/connector-resources.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connector-resources.mdx#L47

Did you really mean 'custom_instructions'?
"provider_metadata": null,

Check warning on line 48 in api-reference/v2/endpoint/connector-resources.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connector-resources.mdx#L48

Did you really mean 'provider_metadata'?
"filters": {
"lookback_days": 30
}
Expand Down
6 changes: 2 additions & 4 deletions api-reference/v2/endpoint/connectors-overview.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "Connectors - Overview"
title: "Connectors: Overview"
description: "Every connector endpoint, the order to call them in, and which one to use to change what."
---

Connectors keep data from an external app (Slack, GitHub, Google Drive, Supabase and more) synced into your database without manual ingestion. [List Connector Providers](/api-reference/v2/endpoint/list-connector-providers) returns every provider you can connect.

Check warning on line 6 in api-reference/v2/endpoint/connectors-overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connectors-overview.mdx#L6

Did you really mean 'Supabase'?

## Endpoints

Expand Down Expand Up @@ -45,16 +45,14 @@

## Which endpoint changes what

<Warning>
To change a resource that is already configured, use `PATCH /connectors/{id}/resources/{resource_id}`. `POST /connectors/{id}/resources` on an existing `resource_id` replaces the whole resource: every field you leave out is cleared, and the resource syncs again from the beginning.
</Warning>
To change a resource that is already configured, use `PATCH /connectors/{id}/resources/{resource_id}`. `POST /connectors/{id}/resources` on an existing `resource_id` replaces the whole resource: every field you leave out is cleared, and the resource syncs again from the beginning.

- Instructions or access rule on one resource: `PATCH /connectors/{id}/resources/{resource_id}`. Only the fields you send change.
- Instructions, sync interval or credentials for the whole connector: `PATCH /connectors/{id}`. Only the fields you send change.
- Name, type, database, collection or metadata of resources: `POST /connectors/{id}/configure`. Resources you leave out of the list are not touched. For each resource you list, send `name` and `resource_type` every time, because omitted values are cleared. Its sync position, instructions and access rule are kept.
- A brand new resource: `POST /connectors/{id}/configure` or `POST /connectors/{id}/resources`.

In paths, `{resource_id}` is the resource's id as returned by the Discover and List Resources endpoints, for example a Slack channel id or a Supabase `schema.table` name. URL-encode it when it contains spaces or other reserved characters.

Check warning on line 55 in api-reference/v2/endpoint/connectors-overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connectors-overview.mdx#L55

Did you really mean 'Supabase'?

## Authentication

Expand All @@ -68,9 +66,9 @@
## Key concepts

- **Connector:** an authenticated connection to one external provider account. It owns every resource synced from that account.
- **Resource:** a syncable unit inside the account, such as a Slack channel, a GitHub repository, a Notion database or a Supabase table. You choose which resources to sync.

Check warning on line 69 in api-reference/v2/endpoint/connectors-overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connectors-overview.mdx#L69

Did you really mean 'syncable'?

Check warning on line 69 in api-reference/v2/endpoint/connectors-overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connectors-overview.mdx#L69

Did you really mean 'Supabase'?
- **Cursor:** each resource's saved sync position. Syncs are incremental: each one fetches only what changed since the cursor.
- **provider_account_scope:** an identifier for the external account, such as a Slack workspace id. It is part of every synced object's deduplication key, so set a distinct value per account when you connect several accounts of one provider.

Check warning on line 71 in api-reference/v2/endpoint/connectors-overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connectors-overview.mdx#L71

Did you really mean 'provider_account_scope'?

Check warning on line 71 in api-reference/v2/endpoint/connectors-overview.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/connectors-overview.mdx#L71

Did you really mean 'deduplication'?

## Metadata on synced objects

Expand Down
34 changes: 29 additions & 5 deletions api-reference/v2/endpoint/create-connector.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,35 @@

Optional settings you can also pass here, and change later with [Update Connector](/api-reference/v2/endpoint/update-connector):

- `custom_instructions`: guidance for how this connector's documents are interpreted and indexed. See [Custom Ingestion Instructions](/essentials/v2/connector-instructions).
- `custom_instructions`: guidance for how this connector's documents are interpreted and indexed. See [Custom Ingestion Instructions](/essentials/v2/connectors#custom-ingestion-instructions).
- `sync_interval_seconds`: how often scheduled syncs run. Omit it for the provider default (one hour for most providers).

<RequestExample>

```python Python SDK
connector = client.connectors.create(
provider="slack",
name="acme-engineering",
database="acme_corp",
collection="company_docs",
provider_account_scope="T12345ACME",
credentials={"access_token": "xoxp-..."},
)
connector_id = connector.connector_id
```

```typescript TypeScript SDK
const connector = await client.connectors.create({
provider: "slack",
name: "acme-engineering",
database: "acme_corp",

Check warning on line 34 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L34

Did you really mean 'acme_corp'?
collection: "company_docs",

Check warning on line 35 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L35

Did you really mean 'company_docs'?
providerAccountScope: "T12345ACME",
credentials: { access_token: "xoxp-..." },
});
const connectorId = connector.connectorId;
```

```bash cURL
curl -X POST 'https://api.hydradb.com/connectors' \
-H "Authorization: Bearer $HYDRA_DB_API_KEY" \
Expand All @@ -23,9 +47,9 @@
-d '{
"provider": "slack",
"name": "acme-engineering",
"database": "acme_corp",

Check warning on line 50 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L50

Did you really mean 'acme_corp'?
"collection": "engineering",
"collection": "company_docs",

Check warning on line 51 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L51

Did you really mean 'company_docs'?
"provider_account_scope": "T12345ACME",

Check warning on line 52 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L52

Did you really mean 'provider_account_scope'?
"credentials": {
"access_token": "xoxp-..."
}
Expand All @@ -42,15 +66,15 @@
"provider": "slack",
"name": "acme-engineering",
"database": "acme_corp",
"collection": "engineering",
"collection": "company_docs",
"tenant_id": "acme_corp",

Check warning on line 70 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L70

Did you really mean 'tenant_id'?
"sub_tenant_id": "engineering",
"sub_tenant_id": "company_docs",

Check warning on line 71 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L71

Did you really mean 'sub_tenant_id'?
"provider_account_scope": "T12345ACME",
"lifecycle": "pending_setup",

Check warning on line 73 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L73

Did you really mean 'pending_setup'?
"sync_status": "idle",

Check warning on line 74 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L74

Did you really mean 'sync_status'?
"sync_interval_seconds": 3600,

Check warning on line 75 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L75

Did you really mean 'sync_interval_seconds'?
"next_sync_at": "2026-06-01T12:05:00Z",

Check warning on line 76 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L76

Did you really mean 'next_sync_at'?
"first_sync_at": "2026-06-01T12:05:00Z",

Check warning on line 77 in api-reference/v2/endpoint/create-connector.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/create-connector.mdx#L77

Did you really mean 'first_sync_at'?
"message": "Connector created. Configure resources to start syncing; the first scheduled sync runs in about 5 minutes."
}
```
Expand All @@ -73,4 +97,4 @@
- **Next:** [Discover Resources](/api-reference/v2/endpoint/discover-connector-resources): see what the credentials can reach
- **Next:** [Configure Connector](/api-reference/v2/endpoint/configure-connector): choose resources and start syncing
- [List Connector Providers](/api-reference/v2/endpoint/list-connector-providers): the credential schema for a provider
- [Connectors - Overview](/api-reference/v2/endpoint/connectors-overview)
- [Connectors: Overview](/api-reference/v2/endpoint/connectors-overview)
47 changes: 22 additions & 25 deletions api-reference/v2/endpoint/create-tenant.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Create Database"
description: "Creates a space for storing context. "
description: "Create an isolated database, with an optional metadata schema."
openapi: "api-reference/v2/openapi.json POST /databases"
---

Expand All @@ -16,7 +16,6 @@ response = client.databases.create(
"name": "category",
"data_type": "VARCHAR",
"max_length": 256,
"enable_match": True,
},
{
"name": "product_description",
Expand All @@ -37,7 +36,6 @@ const response = await client.databases.create({
name: "category",
dataType: "VARCHAR",
maxLength: 256,
enableMatch: true,
},
{
name: "product_description",
Expand All @@ -61,8 +59,7 @@ curl -X POST 'https://api.hydradb.com/databases' \
{
"name": "category",
"data_type": "VARCHAR",
"max_length": 256,
"enable_match": true
"max_length": 256
},
{
"name": "product_description",
Expand All @@ -79,13 +76,9 @@ curl -X POST 'https://api.hydradb.com/databases' \

## Request body

<Note>
`database` and `collection` are the current field names (formerly `tenant_id` and `sub_tenant_id`). The old names remain accepted as deprecated aliases for full backward compatibility.
</Note>

| Name | Description |
| --- | --- |
| <Field name="database" type="string" required /> | Account-scoped database identifier. Use a stable, case-sensitive ID up to 25 characters; prefer lowercase letters, numbers, and underscores for portability. Formerly `tenant_id`; the `tenant_id` alias is still accepted (deprecated). |
| <Field name="database" type="string" required /> | Account-scoped database identifier. Use a stable ID up to 255 characters of lowercase letters, digits, `-`, and `_`; anything else, including uppercase or spaces, returns `400`. Formerly `tenant_id`; the `tenant_id` alias is still accepted (deprecated). |
| <Field name="database_metadata_schema" type="array" /> | Defines database-level metadata fields. See the [Scoping using metadata](/essentials/v2/metadata#step-1a-declare-the-schema-at-database-creation) guide for detailed schema parameters. Formerly `tenant_metadata_schema`; the `tenant_metadata_schema` alias is still accepted (deprecated). (default=`null`) |

## Successful response
Expand Down Expand Up @@ -129,33 +122,37 @@ Always check if a database is ready before using it. Use [Database Status](/api-

## What happens after database creation?

1. Create the database with `POST /databases`
1. **Wait for provisioning:** creation is asynchronous. Poll [Database Status](/api-reference/v2/endpoint/tenant-status) until `infra.ready_for_ingestion` is `true`.
2. **Default collection:** No collection exists until your first write. The first time you ingest without an explicit `collection`, HydraDB creates the database's default collection, which then stores all context written without a `collection`. Create additional collections at any time to scope data to users, teams, or projects.
3. **Retry failed databases:** If a database appears in `data.failed_databases`, re-create that database with `POST /databases` after addressing the reported issue. Poll status again before ingestion.
4. Start [ingesting context](/api-reference/v2/endpoint/ingest-context) once databases are ready
5. Check status of [ingestion](/api-reference/v2/endpoint/source-status). Start querying the database once the recently ingested sources show `completed`
3. **Retry failed databases:** If a database appears in `data.failed_databases` from [List Databases](/api-reference/v2/endpoint/list-tenants), re-create that database with `POST /databases` after addressing the reported issue. Poll status again before ingestion.
4. **Ingest:** start [ingesting context](/api-reference/v2/endpoint/ingest-context) once the database is ready.
5. **Query:** check [ingestion status](/api-reference/v2/endpoint/source-status), and start querying once sources show `graph_creation` (searchable) or `completed`.

---

## Defining metadata schema

<Warning>
Schema field names are **immutable** after database creation. You can add per-document free-form metadata fields at ingestion time, and add new database-level fields later with [Update Metadata Schema](/api-reference/v2/endpoint/update-metadata-schema), but updates are additive only: no delete, rename, type change, or Milvus backfill for newly added dense/sparse metadata lanes. Plan your schema carefully before creating the database.
</Warning>
Schema field names are **immutable** after database creation. You can add per-document free-form metadata fields at ingestion time, and add new database-level fields later with [Update Metadata Schema](/api-reference/v2/endpoint/update-metadata-schema), but updates are additive only: no delete, rename, or type change. Dense and sparse metadata lanes (`enable_dense_embedding`, `enable_sparse_embedding`) can only be declared here, at creation. Plan your schema before you create the database.

You can define a custom schema at database creation to declare the `metadata` fields you filter on, and to enable semantic/BM25 search over metadata text fields (`enable_dense_embedding` / `enable_sparse_embedding`). Each dense or sparse flag adds one vector field, so a field with both uses two; a database can have at most 6. Going over returns `400`, as does declaring an `ARRAY` field.

For detailed parameters, valid data types, limits, and comprehensive examples, see the [metadata](/essentials/v2/metadata) guide.

---

You can define a custom schema at database creation to enable exact-match metadata filtering (`enable_match`) or semantic/BM25 search over metadata text fields (`enable_dense_embedding` / `enable_sparse_embedding`).
## Errors

For detailed parameters, valid data types, limits, shorthand flags, and comprehensive examples, see the [metadata](/essentials/v2/metadata) guide.
Common codes: `400 INVALID_INPUT` (missing or invalid `database`, or an invalid schema), `403 FORBIDDEN` (your plan's database limit is reached), `409 DATABASE_ALREADY_EXISTS` (the `database` is already in use; the deprecated `POST /tenants` route returns `INVALID_INPUT` instead), and `500 INTERNAL_ERROR` (retry; if the message says the rollback also failed, delete the database first, then create it again). See [Error Responses](/api-reference/v2/error-responses) for the full list.

---

<div className="api-before-related-resources" />

## **Related Resources**

- **Next:** [Database Status](/api-reference/v2/endpoint/tenant-status) - poll until provisioning completes
- **Next:** [Ingest Context](/api-reference/v2/endpoint/ingest-context) - start ingesting data once status is ready
- **Related:** [Update Metadata Schema](/api-reference/v2/endpoint/update-metadata-schema) - add metadata schema fields later
- **Related:** [Delete Database](/api-reference/v2/endpoint/delete-tenant) - teardown
- **Read more:** [Concepts → Multi-Tenant Support](/essentials/v2/multi-tenant)
- **Read more:** [Usage → Metadata](/essentials/v2/metadata)
- **Next:** [Database Status](/api-reference/v2/endpoint/tenant-status): poll until provisioning completes
- **Next:** [Ingest Context](/api-reference/v2/endpoint/ingest-context): start ingesting data once status is ready
- **Related:** [Update Metadata Schema](/api-reference/v2/endpoint/update-metadata-schema): add metadata schema fields later
- **Related:** [Delete Database](/api-reference/v2/endpoint/delete-tenant): teardown
- **Read more:** [Multi-tenancy](/essentials/v2/multi-tenant)
- **Read more:** [Usage: Metadata](/essentials/v2/metadata)
15 changes: 5 additions & 10 deletions api-reference/v2/endpoint/delete-collection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,21 @@ You do not need one to reuse the name safely. Ingestion creates a missing collec

## Behavior notes

<Warning>
**Irreversible action.** Ingested documents, memories, embeddings, graph nodes, and storage objects for this collection are permanently removed. Other collections in the same database are not touched. There is no recovery window.
</Warning>

- **Async cleanup:** The endpoint returns immediately after accepting the request. Cleanup of vector stores, graphs, and storage objects runs in the background.
- **Repeat calls are the retry path:** Deleting the same collection again is idempotent. A duplicate call while cleanup is still running joins the delete in progress rather than starting a second one. If a cleanup fails part-way, the collection stays fenced and re-issuing the same `DELETE` re-runs it.
- **Stopping work first is still kinder:** The API cancels this collection's in-flight ingestion for you, but a job cancelled mid-run is reported as failed to whatever started it. Draining your own writers first avoids that noise.
- **Dashboard:** Owners can also expand a database on the Databases page and delete a collection from the inline list.

## Errors

Common codes: `400 VALIDATION_ERROR`, `404 DATABASE_NOT_FOUND`, `401 UNAUTHORIZED`. See [Error Responses](/api-reference/v2/error-responses) for the full list.
Common codes: `400 INVALID_INPUT` (`database` or `collection` is missing), `404 DATABASE_NOT_FOUND` (a database that is itself being deleted returns `404 NOT_FOUND`), `401 UNAUTHORIZED`, `503 SERVICE_UNAVAILABLE` (an earlier failed deletion of this collection is still releasing its lock; the collection stays fenced, so retry in a few seconds), and `500 INTERNAL_ERROR` (transient; retry the same `DELETE`). See [Error Responses](/api-reference/v2/error-responses) for the full list.

<div className="api-before-related-resources" />

<Tip>
**Related Resources**

- **Before this:** [List Collections](/api-reference/v2/endpoint/list-sub-tenants) - find the collection ID
- **Alternative:** [Delete Context](/api-reference/v2/endpoint/delete-source) - remove specific knowledge or memories without deleting the collection
- **Larger scope:** [Delete Database](/api-reference/v2/endpoint/delete-tenant) - remove the entire database
- **Read more:** [Concepts → Multi tenancy](/essentials/v2/multi-tenant)
- **Before this:** [List Collections](/api-reference/v2/endpoint/list-sub-tenants): find the collection ID
- **Alternative:** [Delete Context](/api-reference/v2/endpoint/delete-source): remove specific knowledge or memories without deleting the collection
- **Larger scope:** [Delete Database](/api-reference/v2/endpoint/delete-tenant): remove the entire database
- **Read more:** [Concepts: Multi tenancy](/essentials/v2/multi-tenant)
</Tip>
8 changes: 8 additions & 0 deletions api-reference/v2/endpoint/delete-connector-resource.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@

<RequestExample>

```python Python SDK
client.connectors.delete_resource("{connector_id}", "{resource_id}")

Check warning on line 14 in api-reference/v2/endpoint/delete-connector-resource.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cortex-e852fafe) - vale-spellcheck

api-reference/v2/endpoint/delete-connector-resource.mdx#L14

Did you really mean 'resource_id'?
```

```typescript TypeScript SDK
await client.connectors.deleteResource({ id: "{connector_id}", resourceId: "{resource_id}" });
```

```bash cURL
curl -X DELETE 'https://api.hydradb.com/connectors/{id}/resources/{resource_id}' \
-H "Authorization: Bearer $HYDRA_DB_API_KEY" \
Expand Down
Loading
Loading