Configure lineage policy

Get and revise connector-scoped lineage serving filters.

GET /v1/connectors/{connector_id}/lineage-policy

Returns the current immutable policy revision, policy hash, normalized filters, safe defaults, and repair progress. Both routes require an admin-scoped token and workspace admin role.

ParameterRequiredDescription
connector_idYesConnector whose evidence is being filtered.
workspace_idYesWorkspace containing the connector.
curl --get "https://api.embrasure.ai/v1/connectors/$CONNECTOR_ID/lineage-policy" \
  --header "Authorization: Bearer $EMBRASURE_API_TOKEN" \
  --data-urlencode "workspace_id=$WORKSPACE_ID"

PUT /v1/connectors/{connector_id}/lineage-policy

The request creates a new policy revision, preserving fusion weights and all previous revisions.

{
  "workspace_id": "workspace-1",
  "filters": {
    "schema_scope": {"include": [], "exclude": ["staging.*", "*.dev_*"]},
    "principals": {"mode": "exclude", "patterns": ["ANALYST_*"], "unmatched": "admit"},
    "statement_kinds": ["create_table_as", "create_view", "insert", "insert_overwrite", "merge"],
    "provider_rules": [
      {"provider_type": "query_log", "action": "exclude"},
      {"provider_type": "google_data_lineage", "action": "include", "engines": ["bigquery"]}
    ]
  }
}

schema_scope patterns are case-insensitive dotted globs. An exclusion wins, and either filtered endpoint suppresses a claim. For a provider, an include rule creates an allowlist for its configured engines and optional schema scope. exclude rules take precedence.

The response includes repair. repair_started reports whether an immediate worker drain was dispatched; the durable sweep still runs on the regular retry-drainer if a worker is temporarily unavailable. Suppressed edges are served as stale rather than deleted, and their explanations include policy:* dispositions.

To pause or resume evidence acquisition itself, rather than filtering what is served, use the lineage providers routes.