GET
/
flows
/
metrics
import Worqhat from 'worqhat';

const client = new Worqhat({
apiKey: 'My API Key',
});

const response = await client.flows.getMetrics();

console.log(response.metrics);
{
  "metrics": {
    "total_workflows": 2,
    "completed_workflows": 2,
    "failed_workflows": 0,
    "in_progress_workflows": 0,
    "avg_duration_ms": 8500,
    "metrics_by_user": {
      "member-test-2f9b9a4f-5898-4e7a-8f26-e60cea49ae31": {
        "total": 2,
        "completed": 2,
        "failed": 0,
        "in_progress": 0
      }
    }
  },
  "workflows": [
    {
      "id": "1f9152dc-dec8-496f-8ba4-ed1c27a72684",
      "workflow_id": "f825ab82-371f-40cb-9bed-b325531ead4a",
      "user_id": "member-test-2f9b9a4f-5898-4e7a-8f26-e60cea49ae31",
      "org_id": "organization-test-1aac0c7e-2c38-453c-8576-9e0cc793a414",
      "start_timestamp": "2025-07-16T17:37:36.000Z",
      "end_timestamp": "2025-07-16T17:37:46.000Z",
      "status": "completed"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication. Format - "Bearer YOUR_API_KEY"

Query Parameters

start_date
string<date>

Start date for filtering (YYYY-MM-DD format)

Example:

"2025-07-01"

end_date
string<date>

End date for filtering (YYYY-MM-DD format)

Example:

"2025-07-24"

status
enum<string>

Filter by workflow status

Available options:
completed,
failed,
in_progress
user_id
string

Filter by specific user ID

Example:

"member-test-2f9b9a4f-5898-4e7a-8f26-e60cea49ae31"

Response

200
application/json

Workflow metrics retrieved successfully

The response is of type object.