[]
        
(Showing Draft Content)

Populate Streaming Dataset

This article explains how to use API to push data to a streaming dataset.

To Push Data

Use the below steps to insert data to a streaming dataset using the Resource portal. In order to push data, you must specify the Push Data Token while creating the dataset. Push Data Token is a valid string with a maximum length of 20 characters. You must add this token in the endpoint URL to insert the data in a streaming dataset. This will make sure that only authorized users are able to add the data to the streaming dataset.

Also, the only way to insert data into the streaming dataset, is through API (JSON). In the below steps, we have used Postman, a great tool for sending API requests, for pushing the data to the dataset.

  1. On the Resource portal, go to Document Types > Dataset.

  2. Select the streaming dataset in which you want to insert the data.

  3. Click the More button and then select the Endpoint Information option from the list.

    Show Endpoint Information

    A Push Data Endpoint Information dialog box appears that provides information about the API request to insert data in the dataset such as End Point, Request body, and Information.

    Show Endpoint Information

  4. Copy the End Point from the Push Data Endpoint Information dialog box into the URL box of the Postman.

    Copy Endpoint to Postman

  5. Change the method type to 'POST'.

  6. In the Body tab of Postman, set the type to 'raw', and then specify the format as 'JSON'.

    Push Datasets

  7. Copy the Request body from the Push Data Endpoint Information dialog box into the body area of the Postman.

    The columns in the request body represent the names of the fields, while the rows represent the content of the fields. You can set overwrite to 'true' to overwrite the previous content, or 'false' to add the new content to the previous one.

    The below example uses the default values.

    Copy the Request Body to Postman

    If you want to add multiple rows, use an array as shown below.

    Add multiple rows to the dataset

  8. Now, click the Send button. You will see a success message on the successful addition of the data.

    Successful addition of data

  9. Preview the dataset to see the newly added data.

    Successful addition of data