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)

Subscribe (SSE)

POST
https://api.mithra.network/public/v1
After connecting & thus obtaining your subscription's clientId you can subscribe to topics.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Examples

Responses

🟢200Success
text/plain
The response will be emtpy. After subscriptions are added, objecfts of sensor_measurement and client_push will be sent to the already setup connection (using the GET call). The received message format can be expected based on the subscriptions added.
Body

🟠401Auth exception
🟠400Unknown exception
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.mithra.network/public/v1' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "subscriptions": [
        "sensor_measurement",
        "client_push"
    ],
    "clientId": "someclientid123456789"
}'
Response Response Example
401 - Invalid auth. token error
{
    "data": {},
    "message": "The request requires valid record authorization token.",
    "status": 401
}
Previous
Connect (SSE)
Next
List Sensors
Built with