Preview stream
Fetch a one-off sample `DataFrame` from a `kafka`/`nats` source without creating or registering any Data Source — purely a preview, with no side effects and no interaction with the create/start/stop/delete stream lifecycle or with [Poll stream](/docs/api-reference/streams/streams-poll-post)'s cache.
Fetch a one-off sample DataFrame from a kafka/nats source without
creating or registering any Data Source — purely a preview, with no
side effects and no interaction with the create/start/stop/delete
stream lifecycle or with Poll stream's cache.
Authorization
SymetryMLAuth HMAC-SHA256 signature-based authentication: requests are signed with
your secret key and sent with the Customer-ID, Sym-date,
Authorization, Content-MD5 and sym-version headers.
sym-version is required and must be 7.x (for example 7.0).
See SymetryML REST API Security
for the signature algorithm and a complete example.
In: header
Path Parameters
User/Customer identifier
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Encrypted DSInfo
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/c1/streams/preview" \ -H "Content-Type: application/json" \ -d 'v2:2TYsk+/zj32PJvmeT7FY7mT9yn0IpjSN2KcM1mRkpZEwbDiTsm04CcXJYQWm2r42q0JZnvZ43pFg9hutZhonwtVZkg5x5W4Bk2rhZoAGhD1iCSREqWLRKgPvv2Gdw3yHJj0wEx9O70d21p9VF/uEDXtMsIgFSdZeuLNStZJoUYvWuSmDxMRGznKILNRw8FNTIdNlQ61TWBrTBcWVKFqQoA=='500 rows were returned in the live capture this example is based on (abridged to 3 here). Names/types echo exactly what was supplied in the request DSInfo — the server does not validate them against the actual message content.
{ "statusCode": 200, "statusString": "OK", "values": { "dataframe": { "attributeNames": [ "viewtime", "userid", "pageid" ], "data": [ [ "1", "User_3", "Page_16" ], [ "11", "User_4", "Page_88" ], [ "21", "User_5", "Page_22" ] ], "attributeTypes": [ "C", "S", "S" ], "errorHandling": 1 } }}{ "statusCode": 400, "statusString": "Preview invalid DS Stream type [s3]", "values": {}}{ "statusCode": 500, "statusString": "Generic Exception [java.lang.IllegalStateException: [SUB-90007] No matching streams for subject.]", "values": {}}