How to set a payload on Data Stream
While configuring a stream with a Standard HTTP/HTTPS POST connector, you can set a payload to customize the data and how it’ll be streamed.
In this guide, you’ll learn how to configure a payload in NDJSON format.
- Access Azion Console > Data Stream.
- Follow the steps described on the How to use Standard HTTP/HTTPS POST to receive data guide for the Destination section.
- Under Payload, set the values you want to use:
- Payload Format: use
$dataset
to use the variables added on the Data Set code box. - Payload Log Line Separator: use
\n
to separate lines. - Payload Max Size (optional): accepts values starting from
1000000
.
- Payload Format: use
- Click the Save button.
-
Access Real-Time Manager > Data Stream.
-
Follow the steps described on the How to use Standard HTTP/HTTPS POST to receive data guide for the Destination section.
-
Under Payload, set the values you want to use:
- Max Size (optional): accepts values starting from
1000000
. - Log Line Separator (optional): use
\n
to separate lines. - Payload Format (optional): use
$dataset
to use the variables added on the Data Set code box.
- Max Size (optional): accepts values starting from
-
Click the Save button.
Via API
- Run the following
POST
request in your terminal, replacing[TOKEN VALUE]
with your personal token:
- You’ll receive a response similar to this:
Wait a few minutes for the changes to propagate and your stream will be updated.