Mithra Public API
API Docs
API Docs
  1. Realtime (SSE)
  • Mithra Public API
  • Realtime (SSE)
    • SSE Event Schema
    • Connect (SSE)
      GET
    • Subscribe (SSE)
      POST
  • List Sensors
    GET
  • List Locations
    GET
  • Sensor Readings
    GET
  1. Realtime (SSE)

Connect (SSE)

GET
https://api.mithra.network/public/v1/api/realtime
A simple GET call to this endpoint will start a SSE session. You will obtain your clientId, so you can setup your subscriptions.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************

Responses

🟢200Success
text/plain
The default response contains just the clientId required to setup subscriptions (see other SSE endpoint). After subscriptions are added, objecfts of sensor_measurement and client_push format can be expected based on the subscriptions added.
Body

🟠401Auth exception
🟠400Unknown exception
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.mithra.network/public/v1/api/realtime' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - SSE channel ready
After connecting, you will receive your clientId. You will need this clientId to then subscribe to topics.
id:someclientid123456789
event:PB_CONNECT
data:{"clientId":"someclientid123456789"}
Previous
SSE Event Schema
Next
Subscribe (SSE)
Built with