Skip to main content

Content ingestion

Sellable product

This capability is granted by an API key scoped to the `` product (product face). See the product reference below.

Generic multi-protocol inbound fetch engine. Register a source (rss | api | social | bulk); the engine fetches it conditionally (etag/last-modified unchanged-skip), rate-limited per domain, with retry/backoff, a per-domain circuit breaker, backpressure, and a replayable DLQ. Fetched items are pulled as opaque RawItems (GET /v1/items) or POSTed to a per-source callback_url. Per-source credentials are resolved server-side (Infisical), never accepted in body or persisted plaintext.

  • Group: Content & media
  • Contract: contracts/content-ingestion/v1/openapi.yaml
  • Public base: https://api.vagarylabs.com (the consolidated API gateway — one host, per-brand sibling api.<zone>)
  • Auth: a product API key (vgk_…) issued from the console — Authorization: Bearer vgk_…
  • Product face (customer-keyed):
    • https://api.vagarylabs.com/product/v1/ingestion/sources

Endpoints

MethodPathSummary
GET/healthLiveness + readiness (store connected, tenancy enforced, in-flight, backpressure)
GET/metricsPrometheus exposition
POST/v1/sourcesRegister a source (rss
GET/v1/sourcesList sources (org-scoped)
GET/v1/sources/&#123;source_id&#125;Get one source (org-scoped; credentials_ref is never echoed)
PATCH/v1/sources/&#123;source_id&#125;Update mutable source fields (cadence/callback/credentials_ref/enabled/config) — owner-strict
DELETE/v1/sources/&#123;source_id&#125;Retire a source (owner-strict)
GET/v1/sources/&#123;source_id&#125;/healthAdapter health for a source (reachability + latency)
POST/v1/fetchSubmit an on-demand fetch job (by source_id OR an inline source) — async
GET/v1/fetch/&#123;job_id&#125;Poll a fetch job's status
GET/v1/itemsPull fetched RawItems (cursor-paginated; content_base64 is opaque)
POST/v1/dlq/&#123;source_id&#125;/replayReplay dead-lettered fetches for a source
POST/v1/kb/sourcesRegister + ingest a KB source (doc upload
GET/v1/kb/sourcesList KB sources (doc/web) for the caller's org
GET/v1/kb/sources/&#123;source_id&#125;Get a KB source
DELETE/v1/kb/sources/&#123;source_id&#125;Retire a KB source (remove its docs from the KB, then delete the source)
POST/v1/kb/sources/&#123;source_id&#125;/sync(Re-)ingest a source into the KB — the external scheduler calls this on cadence (auto-sync)
POST/v1/kb/queryQuery the tenant KB → citation-bearing results (retrieval include_citations=true)

Schemas

RegisterSourceRequest

FieldTypeDescription
organization_idstringproduct-tier tenant (I6); resolved from the verified identity/service token when omitted
typestring
urlstring
cadence_secondsintegerscheduled-tick interval per source
credentials_refstringInfisical ref for per-source credentials — never the secret itself
callback_urlstringopt-in outbound POST target for RawItem batches
configobjectadapter field-mapping (api/social) — items_path/title_key/url_key/published_key

RegisterSourceResult

FieldTypeDescription
source_idstring
organization_idstring
typestring

UpdateSourceRequest

FieldTypeDescription
cadence_secondsinteger
callback_urlstring
credentials_refstring
enabledboolean
configobject

Source

FieldTypeDescription
source_idstring
organization_idstring
typestring
urlstring
cadence_secondsinteger
callback_urlstring
enabledboolean
last_fetch_atstring
last_statusstring

AdapterHealth

FieldTypeDescription
healthyboolean
latency_msnumber
messagestring

FetchRequest

Provide EITHER source_id (a registered source) OR an inline source {type, url, ...}.

FieldTypeDescription
organization_idstring
source_idstringa registered source to fetch
sincestringonly items published at/after this
sourceobjectinline source (registered on-the-fly; disabled unless cadence_seconds is given)

FetchAccepted

FieldTypeDescription
job_idstring
source_idstring
statusstring

FetchJob

FieldTypeDescription
job_idstring
source_idstring
statusstring
items_countinteger
dlq_countinteger
errorstring
created_atstring
updated_atstring

Generated by scripts/gen-capability-docs.py from contracts/content-ingestion/v1/openapi.yaml — the contract IS the source of truth; edit the contract, not this page.