SnozeDevelopers
API referenceData sources

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

POST
/v1/workspaces/{workspaceId}/data-sources/preview

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string

Request Body

application/json
  1. body
kind*string
Value in"http""file""provider"
http?|null
file?|null
provider?|null
connectionId?string|null
limit?number|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/data-sources/preview' \  -H 'Content-Type: application/json' \  -d '{  "kind": "http"}'
Example Response
{  "data": {    "rows": [      {}    ],    "columns": [      {        "sourcePath": "string",        "suggestedLabel": "string",        "suggestedKind": "text",        "samples": []      }    ],    "totalRowsSampled": 0,    "rowsPathUsed": "string",    "sheetNames": [      "string"    ],    "sheetNameUsed": "string",    "warning": "string"  }}