Start typing to search.

API Reference

Get run logs

View Markdown

Returns full log text for completed runs. For active runs, returns a Server-Sent Events stream with log events (line data) and a final done event with {"status": "..."} .

GET /api/runs/{id}/logs

Returns full log text for completed runs. For active runs, returns a Server-Sent Events stream with log events (line data) and a final done event with {"status": "..."}.

Operation ID: getRunLogs

Authentication

Option 1

  • BearerAuth (http bearer) API key token. Create via POST /api/api-keys. Format: envoy_<hex>

Option 2

  • CookieAuth (apiKey) Session cookie set after login + TOTP verification

Path parameters

  • idinteger, required Resource ID

Query parameters

  • snapshotstring If set, forces a snapshot (full text) response even for active runs.
  • tailinteger Return only the last N bytes of the log. Applies when the response would be a snapshot (completed run or snapshot=true).

Success responses

200

Log content (text/plain for completed, text/event-stream for active)

Content type: text/plain

  • Type: string Content type: text/event-stream

  • Type: string

Error responses

404

Resource not found

Content type: application/json

  • Reference: Error
    • Type: object
    • Properties:
      • error (string)
        • Example: NOT_FOUND
      • message (string)
        • Example: Resource not found

Example:

{
  "error": "NOT_FOUND",
  "message": "Resource not found"
}

Examples

cURL

curl --request GET \
  --url 'https://your-envoy.example.com/api/runs/YOUR_ID/logs' \
  --header 'Authorization: Bearer $API_KEY'

JavaScript (fetch)

const response = await fetch('https://your-envoy.example.com/api/runs/YOUR_ID/logs', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
  },
});
 
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);