Skip to main content
POST
/
api
/
v1
/
stream
/
start
Start streaming session
curl --request POST \
  --url https://api.logfleet.io/api/v1/stream/start \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "timeout_seconds": 300,
  "filter_query": "<string>"
}
'
{
  "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "websocket_url": "<string>"
}
Starts a new log streaming session from an edge agent. The session will automatically terminate after the specified timeout.
After starting a session, connect to the WebSocket URL in the response to receive real-time logs.

Authorizations

Authorization
string
header
required

JWT token obtained from /auth/login

Body

application/json
agent_id
string<uuid>
required
timeout_seconds
integer
default:300

Auto-stop after this duration (default 5 minutes)

filter_query
string

Optional LogQL filter query

Response

Streaming session started

session_id
string<uuid>
agent_id
string<uuid>
status
string
websocket_url
string

Relative WebSocket URL for this session