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

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

In: header

Path Parameters

workspaceId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/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"  }}