What Does This Endpoint Do?
This endpoint provides performance statistics about your workflows. Think of it like a fitness tracker for your automation - it tells you how many workflows ran, how successful they were, and how long they took to complete.When to Use Workflow Metrics
You’ll find this endpoint useful when you need to:- Monitor workflow health: Track success rates and identify failing workflows
- Optimize performance: Find workflows that are taking too long to execute
- Generate reports: Create dashboards showing workflow activity over time
- Troubleshoot issues: Identify patterns in workflow failures
- Capacity planning: Understand workflow usage to plan for scaling
How It Works
- You specify a date range to analyze (or use the defaults)
- You can optionally filter by workflow status (completed, failed, or in-progress)
- The API returns overall metrics and detailed statistics for individual workflows
Query Parameters
Start date for filtering in YYYY-MM-DD format. If not provided, defaults to the first day of the current month.Example:
2025-07-01
End date for filtering in YYYY-MM-DD format. If not provided, defaults to the last day of the current month.Example:
2025-07-24
Filter by workflow status. Must be one of: ‘completed’, ‘failed’, or ‘in_progress’. If not provided, returns metrics for workflows in all statuses.Example:
completed
Response Fields Explained
Overall metrics for the requested workflows across the specified time period.
Total number of workflow executions during the period. This counts every time a workflow was triggered, regardless of outcome.
Success rate as a percentage (0-100). This shows what percentage of workflow executions completed successfully.
Average execution duration in milliseconds. This helps you understand how long your workflows typically take to run.
Error rate as a percentage (0-100). This is the percentage of workflow executions that failed.
Total number of workflow executions that resulted in an error.
Metrics broken down by individual workflows. This array contains detailed statistics for each workflow that ran during the period.
The unique identifier for the workflow.
The name of the workflow.
Number of times this specific workflow was executed during the period.
Success rate for this specific workflow as a percentage (0-100).
Average execution duration for this specific workflow in milliseconds.
Number of times this workflow resulted in an error.
The most frequently occurring error type for this workflow.
The time period that the metrics cover.
Code Examples
Example 1: Basic Metrics Query
This example shows how to get workflow metrics for a specific date range and status.Example 2: Default Date Range
This example shows how to get workflow metrics without specifying dates (using the default date range).Example Response
Common Errors and How to Fix Them
Error | Cause | Solution |
---|---|---|
”Invalid date format” | Date parameters are not in YYYY-MM-DD format | Check that your dates follow the correct format |
”End date before start date” | The end_date is earlier than the start_date | Make sure your end_date comes after your start_date |
”Invalid status parameter” | Status value is not one of the allowed options | Use only ‘completed’, ‘failed’, or ‘in_progress‘ |
“Unauthorized” | Invalid or missing API key | Check that you’re using a valid API key |
Tips for Using Workflow Metrics
- Use the default date range (current month) when you want a quick overview of recent performance
- Filter by status to focus on specific types of workflow executions (e.g., only failed ones)
- Look for workflows with low success rates to identify areas for improvement
- Monitor average durations to spot performance degradation over time
- Use the metrics to identify your most frequently used workflows