Preview the rows a data source config would return
Fetches the source described by the request without persisting anything and returns a sample of rows with inferred columns, the JSON path or sheet that was used, and a warning when the source is empty. Requires `data_sources:write` rather than read, because a preview exercises stored connection secrets against a caller-supplied URL; HTTP sources are restricted to public addresses, and fetch failures come back as validation errors with secret values redacted. Sample size is capped at 50 rows (default 20).
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringapplication/json- body
kind*string"http""file""provider"http?|nullfile?|nullprovider?|nullconnectionId?string|nulllimit?number|nullSuccess
application/json- response
data*curl -X POST 'https://api.snoze.dev/v1/workspaces/string/data-sources/preview' \ -H 'Content-Type: application/json' \ -d '{ "kind": "http"}'{ "data": { "rows": [ {} ], "columns": [ { "sourcePath": "string", "suggestedLabel": "string", "suggestedKind": "text", "samples": [] } ], "totalRowsSampled": 0, "rowsPathUsed": "string", "sheetNames": [ "string" ], "sheetNameUsed": "string", "warning": "string" }}Create a data source
Registers a data source, provisions the database it syncs into, and files a workspace item for it under the requested parent. Requires `data_sources:write` (plus edit access to the parent item when one is given); a label outside 1 to 120 characters, an invalid config for the kind, an out-of-range refresh interval, or an unknown `connectionId` are rejected before anything persists. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.
Import a spreadsheet into a new database
Parses an uploaded or provider-hosted spreadsheet once and creates a database with the mapped fields and rows, returning the created database with its field, record, and skipped-row counts. Requires `databases:write`, plus `files:read` when importing an uploaded file. Malformed or oversized workbooks are rejected as validation errors; passing a `clientMutationId` makes the import replay-safe, and reusing one while its import is still running, or with different input, is reported as an in-progress or conflicting-mutation error. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.