Skip to Content
We are live but in Staging 🎉

Sources — API Reference

Package: dodil.k3.source.v1 · Service: SourceService

Sources are bucket-scoped. The bucket’s internal S3 source is auto-created on CreateBucket — that’s the production channel for direct-upload ingest, with no CreateSource call needed.

Preview — external sources (SOURCE_PROVIDER_GOOGLE_DRIVE, _SHAREPOINT, _CONFLUENCE, _GITHUB) and the CreateSource / UpdateSource / DeleteSource RPCs for them are available but still solidifying for production. The internal source is created by K3 itself — you don’t need any of these RPCs to ingest direct uploads.

Source types and SourceStatus are documented under Core Concepts → Source.

RPCHTTP
CreateSourcePOST /:bucket/sources
GetSourceGET /:bucket/sources/:source_id
ListSourcesGET /:bucket/sources
UpdateSourcePATCH /:bucket/sources/:source_id
DeleteSourceDELETE /:bucket/sources/:source_id

gRPC setup — grpcurl, endpoints, reflection, and field-name casing — is covered once in Conventions → Using gRPC.

CreateSource

Registers a new source on a bucket. The bucket’s internal source is auto-created on CreateBucket; use this RPC only to add external sources.

Request

curl -sS -X POST "https://k3.dev.dodil.io/kb-prod/sources" \ -H "Authorization: Bearer $DODIL_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "bucket": "kb-prod", "provider": "SOURCE_PROVIDER_GOOGLE_DRIVE", "name": "finance-drive", "description": "Q2 finance docs", "rootPath": "/Q2", "providerAccount": "drive-id-123", "syncIntervalSeconds": "3600", "enabled": true }'

Response

A Source row — see Core Concepts → Source.

GetSource

Request

curl -sS "https://k3.dev.dodil.io/kb-prod/sources/src_a1b2..." \ -H "Authorization: Bearer $DODIL_TOKEN"

Response

A Source row — see Core Concepts → Source.

ListSources

Request

curl -sS "https://k3.dev.dodil.io/kb-prod/sources?page_size=50" \ -H "Authorization: Bearer $DODIL_TOKEN"

Response

{ "sources": [ { "sourceId": "src_a1b2…", "bucket": "kb-prod", "provider": "SOURCE_PROVIDER_INTERNAL_S3", "name": "internal", "syncIntervalSeconds": "0", "enabled": true, "status": "SOURCE_STATUS_ACTIVE" }, { "sourceId": "src_c3d4…", "bucket": "kb-prod", "provider": "SOURCE_PROVIDER_GOOGLE_DRIVE", "name": "finance-drive", "syncIntervalSeconds": "3600", "enabled": true, "status": "SOURCE_STATUS_ACTIVE" } ], "pagination": { "nextPageToken": "", "totalCount": "2" } }

UpdateSource

Patch-style update — only the fields you set are changed. optional fields in the request use proto3 presence: absent = leave alone, present = replace.

Request

curl -sS -X PATCH "https://k3.dev.dodil.io/kb-prod/sources/src_a1b2..." \ -H "Authorization: Bearer $DODIL_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "bucket": "kb-prod", "sourceId": "src_a1b2...", "syncIntervalSeconds": "1800", "enabled": true }'

Response

A Source row — see Core Concepts → Source.

DeleteSource

Removes the source. Existing rules that reference it become orphaned (their source_id points at a non-existent row) — clean them up first or accept that they will no longer fire.

Request

curl -sS -X DELETE "https://k3.dev.dodil.io/kb-prod/sources/src_a1b2..." \ -H "Authorization: Bearer $DODIL_TOKEN"

Response

Empty (DeleteSourceResponse {}).

Deleting the bucket’s internal source is allowed but breaks direct-upload pipelines for that bucket. Don’t do it unless you’re sure.


See also