SDK For Data Streaming

Rest API

5min

Rest API Integration to stream data

Use the instructions below to stream data to Qualetics for Analytics and/or source data for Data Machines.

REST API Host

Generate the JWT Token using the endpoint below

EndPoint

/api/token

Authorization

Basic Authentication

Method

GET

Params

APPLICATION_ID - This will be the unique ID for the application that will be streaming the data. Multiple Application IDs can be generated for the same account.

APPLICATION_SECRET - Password for the application

Result

Access_Token

Access the API Key, Secret and Client Instance ID from your Portal

Go to Admin > Integration >API Keys

Accessing API Keys for Consuming Data
Accessing API Keys for Consuming Data


Select the Client & Application if you have setup multiple applications

Select Client Instance & Application
Select Client Instance & Application

  • If a Client Instance or Application is not present in the dropdown, the step to setup the Application and Client Instance has likely not been completed. Please complete the following steps before accessing the API Keys
  • Note: This feature is only accessible to users setup as Admins
API Keys for your Application & Client Instances
API Keys for your Application & Client Instances


Access APP Key, APP Secret and Client Instance ID

  • APP Key
    • Your Account Key
  • APP Secret
    • Your Account Secret
  • Client Instance ID
    • Unique ID for the combination of Client Instance and Application created

Send Data

Data can be sent to Qualetics in the form of events to the Qualetics Message Broker. Please follow the instructions below to stream the data using a Rest API post. The API below will support JWT Token Based authentication as well as Header Based Authentication. Refer to the code examples below.

EndPoint

/api/sendmessage

Authorization

Bearer <Access_Token>

Method

POST

Params

client_id - This should be the name or the unique identifier of your client in a multi-tenant setup for whom you are sending the data. If you do not have a multi-tenant setup then this value can be skipped.

Required for multi-tenant setup

Body

This contains the main message content that should be passed to the API. The message should be formatted as a JSON structure similar to the JS SDK for each event. See example Body content below

Result

Confirmation message

Example Code with Token Based Authentication

JS


Example Code with Header Based Authentication

JS




Updated 03 Oct 2024
Doc contributor
Did this page help you?