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 theCreateSource/UpdateSource/DeleteSourceRPCs 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.
| RPC | HTTP |
|---|---|
CreateSource | POST /:bucket/sources |
GetSource | GET /:bucket/sources/:source_id |
ListSources | GET /:bucket/sources |
UpdateSource | PATCH /:bucket/sources/:source_id |
DeleteSource | DELETE /: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
HTTP
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
HTTP
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
HTTP
curl -sS "https://k3.dev.dodil.io/kb-prod/sources?page_size=50" \
-H "Authorization: Bearer $DODIL_TOKEN"Response
HTTP
{
"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
HTTP
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
HTTP
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
internalsource is allowed but breaks direct-upload pipelines for that bucket. Don’t do it unless you’re sure.
See also
- Credentials — how external sources authenticate
- Rules — bind a source to a pipeline
- Sync — trigger discovery and ingestion on a source
- Core Concepts → Source — the full
Sourcetype grpcurlreference — full flag set + reflection-disabled fallbacks