Stream
POST/workstations/:workstation_id/log/stream
Stream the log entries of a Workstation in realtime using Server-Sent Events (SSE).
Example usage with JavaScript:
const id = 'HvcqZjmeoPtP';
const url = `https://api.agentstation.ai/v1/workstations/${id}/log/stream`;
// Get SSE URL from AgentStation API
const response = await fetch(url, {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_token>'
}
});
const stream = await response.json();
// stream.url example: https://stream.agentstation.ai/v1/log/sse/cxBMzXSFUSXf
// Connect to SSE stream
const eventSource = new EventSource(stream.url);
eventSource.onmessage = (event) => {
const log = JSON.parse(event.data);
console.log(log);
};
eventSource.onerror = (error) => {
console.error('EventSource failed:', error);
eventSource.close();
};
Request
Responses
- 200
- 400
- 401
- 402
- 422
- 429
- 500
- 503
Successfully retrieved SSE stream URL.
Invalid Request Format - check API documentation for proper syntax.
Unauthorized - missing or invalid API key.
Payment Required - you have run out of trial credits or your payment method has expired. Please add payment details to your account.
Unprocessable Entity - cannot find requested asset associated with your API key.
Too Many Requests - you have exceeded the rate limit for your account. Please wait before making additional requests.
Internal Server Error - please retry your request.
Service Unavailable - our servers have dropped the request due to high load - please retry.