How to stream data

Its simple!

Stream compare to Batch

Stream VS Batch

Stream - Data will be pushed towards "Strech".

Batch - Data will be pulled from the source by "Strech"

Great article on data streaming https://www.strech.io/data-streaming

Getting Started

1) Signup to "Strech"

2) Head to the "Use cases" page

Use cases page

3) Create a new use case by clicking on the button at the top-right corner

4) Fill in "use case name" + "description", and click Next

5) Fill in "Pipeline name" and choose "Pipeline type" Stream

At the moment we only support JSON format for streamed data

6) URL screen

URL screen

Legend:

(1) URL which data should be pushed to using REST (JS Example)

(2) In order to avoid malicious streaming, we provide 2 types of stream authentication:

  1. "API key" - Each REST command would need to attach an API key in its header. Once the key is generated, copy it, and add it to the headers of your request like so:

"strech-api-key": "a31f6a9331425c497c5b44f60edc0a5dc3617c6befa0f0f3ff18ef920d646b8921bb593d4a71bfb39158942b961485a907a49d281e6fc058856faed2bbc9c515d0455f6a311a314857f313936ef80db3f412f7c9ae03d8df89461d34aa0b38e59b70723392301574b4a08394483c449d10435b7155aa65c9ff5d7d3813d7e74f04cb10c04da84f3a0343f7649b346a157d05de1a9c3e0ffe64e886bb71f67247f06e8c32dfb58eda15fe432ddd3685a25c7ee01243a1558a1cd922c24d7447340e4e43932c1c6fc8ca1a2c9d6fb4b82dfec306db66951dd44d7bd4993ea4f41cb4"

2. "Sender origin (IP)" - In case you are not able to add headers, you can strict the streaming to a certain ip/range, like: "192.168.10.2/24", "10.138.40.50/32"

3. "No authentication" - "Strech" Will not authenticate the data ingested from this URL.

Warning! In case you chose "No authentication" - "Strech" will not be able to authenticate the ingested data, and as a result, will not refund the used balance.

6) Data sample

We provide the ability to preconfigure the future streamed data by pasting the coming payload.

In case the schema will change in the future, we will accept it automatically, even if it was not configured in the initial setup, notify you via email and you will be able to edit the schema with the new changes.

Github repository with code examples:

https://github.com/STRECH-LTD/Strech-Stream-Code-Examples

Example payload

post
stream data to "Strech"

https://stream-staging.strech.io/json/7b128f8c-aec2-4210-a01b-ef4d102bb24d/
A general request for pushing data towards Strech
Request
Response
Request
Headers
strech-api-key
optional
string
The API key provided by Strech
Body Parameters
payload
required
string
JSON payload to be pushed to Strech
Response
200: OK