Start typing to search.

API Reference

Get run summary for a task

View Markdown

Aggregated run statistics from the runs table.

GET /api/metrics/data/summary/{taskId}

Aggregated run statistics from the runs table.

Operation ID: getMetricsSummary

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

  • taskIdinteger, required

Success responses

200

Task run summary

Content type: application/json

  • Type: object
  • Properties:
    • available (boolean)
    • task (string)
    • total_runs (integer)
    • success_count (integer)
    • error_count (integer)
    • total_items (integer)
    • duration (object)
      • Properties:
        • avg_ms (number | null)
          • Nullable: yes
        • min_ms (number | null)
          • Nullable: yes
        • max_ms (number | null)
          • Nullable: yes
    • last_run_at (string | null)
      • Format: date-time
      • Nullable: yes

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/metrics/data/summary/YOUR_TASK_ID' \
  --header 'Authorization: Bearer $API_KEY'

JavaScript (fetch)

const response = await fetch('https://your-envoy.example.com/api/metrics/data/summary/YOUR_TASK_ID', {
  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);