Skip to Content
We are live but in Staging 🎉

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 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

The five SourceProvider values are the complete shipped set. Their numbers are not contiguous, which matters wherever a provider is passed as an integer:

ProviderNumberStatus
SOURCE_PROVIDER_INTERNAL_S31Production — auto-created per bucket
SOURCE_PROVIDER_GOOGLE_DRIVE10Preview
SOURCE_PROVIDER_SHAREPOINT11Preview
SOURCE_PROVIDER_CONFLUENCE12Preview
SOURCE_PROVIDER_GITHUB20Preview

dodil data source has no update or delete. The CLI ships only create, list and get, even though UpdateSource and DeleteSource exist 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

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

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

ListSources does not paginate over HTTP. The handler reads no query parameters at all and sends pagination: 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 source list -b kb-prod

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://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

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 internal source is allowed but breaks direct-upload pipelines for that bucket. Don’t do it unless you’re sure.


See also