Skip to Content
We are live but in Staging 🎉
API ReferenceIngestService API

IngestService API

Package: dodil.k3.ingest.v1

IngestService owns ingestion rules, source discovery/ingest triggers, and ingest job status.

What It Is For

  • Define source matching rules and map them to pipelines.
  • Trigger discovery scans and ingestion runs.
  • Monitor ingest jobs and retry strategies.

Endpoint Map

Rules

gRPC methodHTTP route
CreateRulePOST /:bucket/rules
ListRulesGET /:bucket/rules
GetRuleGET /:bucket/rules/:rule_id
UpdateRulePATCH /:bucket/rules/:rule_id
DeleteRuleDELETE /:bucket/rules/:rule_id

Source Discovery/Sync

gRPC methodHTTP route
TriggerDiscoveryPOST /:bucket/sources/:source_id/discover
TriggerIngestionPOST /:bucket/sources/:source_id/ingest
GetSyncStatusGET /:bucket/sources/:source_id/sync

Ingest Jobs

gRPC methodHTTP route
TriggerIngestPOST /:bucket/ingest
ListIngestJobsGET /:bucket/ingest/jobs
GetIngestStatusGET /:bucket/ingest/jobs/:job_id

Key Arguments

Create rule

FieldTypeRequiredPurpose
bucketstringyesBucket scope
source_idstringyesSource to match against
pipeline_idstringyesDestination pipeline (canonical)
namestringyesRule name
include_patternsstring[]noGlob include list
exclude_patternsstring[]noGlob exclude list
include_mime_typesstring[]noMIME allow-list
exclude_mime_typesstring[]noMIME deny-list
min_size_bytesint64noMinimum object size
max_size_bytesint64noMaximum object size (0 = no limit)
enabledboolnoEnable rule
priorityint32noHigher value matches first

Important:

  • Route decisions should use pipeline_id.
  • binding in responses is derived display metadata, not routing authority.

Trigger discovery

FieldTypeRequiredPurpose
bucketstringyesBucket scope
source_idstringyesSource to scan
full_syncboolnoIgnore checkpoint and rescan
rule_idstringnoScope discovery to one rule

Trigger ingestion from source queue

FieldTypeRequiredPurpose
bucketstringyesBucket scope
source_idstringyesSource to ingest
rule_idstringnoRestrict to one rule
source_object_idstringnoRestrict to one source object
retry_failedboolnoInclude failed/partial objects

Trigger one object ingest

FieldTypeRequiredPurpose
object.bucketstringyesObject bucket
object.keystringyesObject key
pipeline_idstringnoExplicit pipeline override
rule_idstringnoExplicit rule override
optionsmap<string,string>noPer-event option overlay

Examples

Create an ingest rule

curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/rules" \ -H "Authorization: Bearer $K3_TOKEN" \ -H "x-organization-id: $K3_ORG" \ -H "Content-Type: application/json" \ -d '{ "bucket": "kb-prod", "source_id": "src_123", "pipeline_id": "pipe_456", "name": "pdf-contracts", "include_patterns": ["contracts/**/*.pdf"], "enabled": true, "priority": 100 }'

Trigger full discovery

curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/sources/src_123/discover" \ -H "Authorization: Bearer $K3_TOKEN" \ -H "x-organization-id: $K3_ORG" \ -H "Content-Type: application/json" \ -d '{"bucket":"kb-prod","source_id":"src_123","full_sync":true}'

Trigger ingestion and retry failed

curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/sources/src_123/ingest" \ -H "Authorization: Bearer $K3_TOKEN" \ -H "x-organization-id: $K3_ORG" \ -H "Content-Type: application/json" \ -d '{ "bucket": "kb-prod", "source_id": "src_123", "retry_failed": true }'

Trigger a one-shot ingest for one object

curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/ingest" \ -H "Authorization: Bearer $K3_TOKEN" \ -H "x-organization-id: $K3_ORG" \ -H "Content-Type: application/json" \ -d '{ "object": {"bucket": "kb-prod", "key": "contracts/acme-2026.pdf"}, "pipeline_id": "pipe_456" }'

Common Use Cases

  1. Rule-based document routing by path, MIME, and size constraints.
  2. Controlled replay of failed documents after pipeline fixes.
  3. Single-document reprocess workflows for rapid QA.

Next: VectorService