get_job_metrics
Retrieve aggregate workflow execution metrics to assess automation efficiency, success rates, and resource utilization across all jobs.
Instructions
Get aggregate job metrics from the Workflow Engine.
The Workflow Engine maintains comprehensive metrics about workflow execution performance, providing insights into automation efficiency, success rates, and resource utilization across all workflow jobs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Response model for job metrics collection endpoints. This Pydantic RootModel provides a standardized response format for API endpoints that return collections of job metrics from the Itential Platform workflow engine. It wraps a list of JobMetricElement objects, enabling type-safe handling of job metrics data across the platform. The root model pattern allows the response to be treated as a list while maintaining proper validation and serialization capabilities for the contained job metric elements. Args: root: List of JobMetricElement objects containing job performance data. Defaults to an empty list if not provided. Attributes: root (List[JobMetricElement]): Collection of job metric elements with performance and completion statistics for workflow monitoring Example: Creating a response with multiple job metrics: >>> job1 = JobMetricElement(_id="job1", workflow="wf1", metrics=[], ... jobsComplete=10, totalRunTime=100.0) >>> job2 = JobMetricElement(_id="job2", workflow="wf2", metrics=[], ... jobsComplete=20, totalRunTime=250.5) >>> response = GetJobMetricsResponse([job1, job2]) >>> print(len(response.root)) # 2 >>> print(response.root[0].jobs_complete) # 10 Notes: - Uses default_factory=list to create empty collections when needed - Supports iteration and indexing through the root attribute - Maintains type safety for all contained JobMetricElement objects |