Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Kr-Yogsa/ECE-BOT/llms.txt

Use this file to discover all available pages before exploring further.

ECE-BOT persists every conversation as a named session tied to a specific hardware assistant. Use GET /chat/sessions to load the session list for a sidebar or history view, and GET /chat/session/{session_id} to replay a full conversation including each message’s AI source and confidence score.
Both endpoints require a valid Bearer token. Sessions are strictly scoped to the authenticated user — one user cannot access another user’s sessions.

GET /chat/sessions

Returns all chat sessions belonging to the authenticated user, ordered for display in the sidebar.

Request headers

Authorization
string
required
Bearer token obtained at login. Format: Bearer <token>.

Response

sessions
object[]
required
All sessions for the authenticated user. Returns an empty array if no sessions exist.

Example

curl --request GET \
  --url https://your-ece-bot-host/chat/sessions \
  --header 'Authorization: Bearer <token>'
200 response
{
  "sessions": [
    {
      "id": 1,
      "hardware_id": "cnc",
      "title": "CNC Error Code",
      "created_at": "2026-05-07T08:32:11Z"
    },
    {
      "id": 2,
      "hardware_id": "melfa",
      "title": "MELFA Servo Alarm",
      "created_at": "2026-05-07T09:14:05Z"
    }
  ]
}

GET /chat/session/

Returns the session metadata and the full ordered message history for a single session.

Request headers

Authorization
string
required
Bearer token obtained at login. Format: Bearer <token>.

Path parameters

session_id
integer
required
The numeric ID of the session to retrieve. Obtained from the id field in GET /chat/sessions or the session_id field in a POST /chat response.

Response

session
object
required
Metadata for the requested session.
messages
object[]
required
All messages in chronological order.

Errors

StatusCondition
401Missing or invalid Bearer token.
404Session does not exist or belongs to a different user.

Example

curl --request GET \
  --url https://your-ece-bot-host/chat/session/1 \
  --header 'Authorization: Bearer <token>'
200 response
{
  "session": {
    "id": 1,
    "hardware_id": "cnc",
    "title": "CNC Error Code",
    "created_at": "2026-05-07T08:32:11Z"
  },
  "messages": [
    {
      "role": "user",
      "content": "What is error E100?",
      "created_at": "2026-05-07T08:32:11Z"
    },
    {
      "role": "assistant",
      "content": "Error E100 means the spindle motor overloaded. Check the spindle load meter and reduce the cutting depth.",
      "source": "intent_model",
      "confidence": 0.92,
      "created_at": "2026-05-07T08:32:12Z"
    }
  ]
}
404 response
{
  "error": "Chat session not found."
}
Requesting a session that belongs to another user returns 404, not 403. ECE-BOT does not reveal whether a session exists for a different user.

Build docs developers (and LLMs) love