Sources — API Reference
Package: dodil.data.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 |
The five SourceProvider values are the complete shipped set. Their numbers are not contiguous, which matters wherever a provider is passed as an integer:
| Provider | Number | Status |
|---|---|---|
SOURCE_PROVIDER_INTERNAL_S3 | 1 | Production — auto-created per bucket |
SOURCE_PROVIDER_GOOGLE_DRIVE | 10 | Preview |
SOURCE_PROVIDER_SHAREPOINT | 11 | Preview |
SOURCE_PROVIDER_CONFLUENCE | 12 | Preview |
SOURCE_PROVIDER_GITHUB | 20 | Preview |
dodil data sourcehas noupdateordelete. The CLI ships onlycreate,listandget, even thoughUpdateSourceandDeleteSourceexist on the API. Use HTTP or gRPC for the rest of the lifecycle.
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://api.data.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://api.data.dodil.io/kb-prod/sources/src_a1b2..." \
-H "Authorization: Bearer $DODIL_TOKEN"Response
A Source row — see Core Concepts → Source.
ListSources
ListSourcesdoes not paginate over HTTP. The handler reads no query parameters at all and sendspagination: None, so?page_size=and?page_token=are ignored and every source in the bucket comes back. Pagination is reachable over gRPC only.
Request
dodil data
dodil data source list -b kb-prodResponse
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://api.data.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://api.data.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