openapi: 3.2.0 info: title: Fenergo Rules API version: 1.0.0 description: 'Operations tagged Rules across 4 of this provider''s published API definitions: fenergo-tm-observability-api-spec-openapi.json, fenergo-tm-rule-execution-api-spec-openapi.json, fenergo-tm-rule-rerun-api-spec-openapi.json, fenergo-tm-rule-scheduling-api-spec-openapi.json. Each path carries the servers of the definition it was published in.' servers: - url: https://api.fenergox.com/tm/observability - url: https://api.fenergox.com/tm/realtime tags: - name: Rules paths: /api/v1/rules/execution: get: summary: Rules Execution Summary description: 'Returns rule execution information either by rule IDs, execution ID, or by date range. Use either ''ids'' parameter, ''execution_id'' parameter, OR both ''start_date'' and ''end_date'' parameters.' operationId: rules_execution_api_v1_rules_execution_get parameters: - name: ids in: query required: false schema: anyOf: - type: string - type: 'null' description: Comma-separated Rule IDs to retrieve details for. title: Ids description: Comma-separated Rule IDs to retrieve details for. - name: execution_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Execution ID to retrieve a summary for. title: Execution Id description: Execution ID to retrieve a summary for. - name: start_date in: query required: false schema: anyOf: - type: string - type: 'null' description: The start date from which the metrics should be generated. title: Start Date description: The start date from which the metrics should be generated. - name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' description: The end date up to which the metrics should be generated. title: End Date description: The end date up to which the metrics should be generated. responses: '200': description: Successful response with rule execution details content: application/json: schema: anyOf: - type: array items: $ref: '#/components/schemas/RuleExecutionDetail' title: Rule execution by rule ID(s) filter - type: array items: $ref: '#/components/schemas/RuleExecutionsByDateResponse' title: Rule execution by dates filter - $ref: '#/components/schemas/RuleExecutionByExecutionIDSummary' title: Rule execution by execution ID filter title: Response Rules Execution Api V1 Rules Execution Get examples: by_ids: summary: Rule execution details retrieved by rule IDs value: - rule_id: rule-123 status: completed rule_alias: High Risk Transaction Rule rule_description: This rule checks for high risk transactions. total_alerts_received: 25 unique_alerts_after_deduplication: 20 rule_effective_date: '2023-10-01' execution_id: exec-456 by_date_range: summary: Rule executions grouped by date value: - requested_run_date: '2023-10-01' count: 1 rules: - rule_id: rule-123 status: completed rule_alias: High Risk Transaction Rule rule_description: This rule checks for high risk transactions. total_alerts_received: 25 unique_alerts_after_deduplication: 20 rule_effective_date: '2023-10-01' execution_id: exec-456 by_execution_id: summary: 'Completed run – some rules failed (partially_failed, is_complete: true)' value: execution_id: exec-456 requested_run_date: '2026-03-15' rule_effective_date: '2026-03-15' overall_status: partially_failed is_complete: true total_rules: 12 completion_percent: 100.0 progress: requested_rules: 0 started_rules: 0 succeeded_rules: 10 failed_rules: 2 alerts: total_alerts_received: 245 unique_alerts_after_deduplication: 198 timing: first_event_at: '2026-03-15T00:01:12' last_event_at: '2026-03-15T00:08:44' duration_seconds: 452 rules: - rule_id: rule-001 status: succeeded rule_alias: High Risk Transaction Rule rule_description: Flags transactions above risk threshold. total_alerts_received: 120 unique_alerts_after_deduplication: 98 - rule_id: rule-002 status: failed rule_alias: Velocity Check Rule total_alerts_received: 0 unique_alerts_after_deduplication: 0 by_execution_id_in_progress_with_failures: summary: 'Running with failures (in_progress_with_failures, is_complete: false)' value: execution_id: exec-789 requested_run_date: '2026-03-15' rule_effective_date: '2026-03-15' overall_status: in_progress_with_failures is_complete: false total_rules: 12 completion_percent: 50.0 progress: requested_rules: 0 started_rules: 5 succeeded_rules: 5 failed_rules: 2 alerts: total_alerts_received: 120 unique_alerts_after_deduplication: 98 timing: first_event_at: '2026-03-15T00:01:12' last_event_at: '2026-03-15T00:05:00' duration_seconds: 228 rules: - rule_id: rule-001 status: succeeded rule_alias: High Risk Transaction Rule rule_description: Flags transactions above risk threshold. total_alerts_received: 120 unique_alerts_after_deduplication: 98 - rule_id: rule-002 status: failed rule_alias: Velocity Check Rule total_alerts_received: 0 unique_alerts_after_deduplication: 0 '400': description: Invalid parameter combination content: application/json: example: message: Invalid parameters. Provide either 'ids', 'execution_id', OR both 'start_date' and 'end_date'. '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Rules servers: - url: https://api.fenergox.com/tm/observability /api/rules/execute: post: summary: Trigger Rule Execution description: 'Endpoint to trigger rule execution. Handles requests to execute rules for a given date and/or list of rule IDs.' operationId: trigger_rule_execution_api_rules_execute_post requestBody: content: application/json: schema: $ref: '#/components/schemas/ExecuteRulesRequestPayload' required: true responses: '200': description: Success responses - No processing needed or all rules rejected content: application/json: schema: $ref: '#/components/schemas/ExecuteRulesJsonResponse' anyOf: - $ref: '#/components/schemas/ExecuteRulesJsonResponse' - $ref: '#/components/schemas/ExecuteRuleGroupsJsonResponse' - $ref: '#/components/schemas/ErrorResponse' title: Response Trigger Rule Execution Api Rules Execute Post examples: no_live_rules: summary: No live rules found for tenant value: message: No live rules found for tenant. accepted_rules: [] rejected_rules: [] no_scheduled_rules: summary: No rules scheduled for date value: message: No rules scheduled to run on 2023-10-01. accepted_rules: [] rejected_rules: [] no_rules_accepted: summary: No rules accepted - all rejected for various reasons value: message: 'No rules accepted for execution for the requested date: 2023-10-01.' accepted_rules: [] rejected_rules: - rule_id: rule-123 reason: Rule is not live and cannot be executed. - rule_id: rule-456 reason: Rule is not scheduled to run on 2023-10-01. - rule_id: rule-789 reason: Rule has already run for 2023-10-01. If you want to run it again, use the force flag. no_rules_run: summary: No rules run for the requested date value: message: 'No rules run for the requested date: 2023-10-01.' accepted_rules: [] rejected_rules: [] '202': description: Rules or rule groups accepted for execution content: application/json: examples: rules_accepted: summary: Rules accepted for execution value: status_code: 202 content: message: 'Rules execution request successfully submitted for: 2023-10-01.' execution_id: 550e8400-e29b-41d4-a716-446655440000 accepted_rules: - rule-123 - rule-456 rejected_rules: [] rule_groups_accepted: summary: Rule groups accepted for execution value: status_code: 202 content: - rule_group_id: RG001 execution_id: 550e8400-e29b-41d4-a716-446655440000 accepted_rules: - rule-123 - rule-456 rejected_rules: [] '207': description: 'Multi-status: Some rules accepted, others rejected' content: application/json: schema: $ref: '#/components/schemas/ExecuteRulesJsonResponse' example: message: 'Only some rules were accepted for execution for the requested date: 2023-10-01.' execution_id: 550e8400-e29b-41d4-a716-446655440000 accepted_rules: - rule-123 rejected_rules: - rule_id: rule-456 reason: Rule is not live and cannot be executed. - rule_id: rule-789 reason: Rule is not scheduled to run on 2023-10-01. - rule_id: rule-101 reason: Rule has already run for 2023-10-01. If you want to run it again, use the force flag. '403': description: Feature not available for tenant content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: message: Feature not available. '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: message: Failed to trigger rule execution. Please retry sending the request. '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - OAuth2 Client Credentials: [] tags: - Rules servers: - url: https://api.fenergox.com/tm/realtime /api/rules/status/{execution_id}: get: summary: Get Rule Execution Status description: 'Retrieve the execution status of a rule run identified by `execution_id`. Returns a single `RuleExecutionSummary` object with full per-rule breakdown, progress, alerts, and timing.' operationId: get_rule_execution_status_api_rules_status_execution_id_get parameters: - name: execution_id in: path required: true schema: type: string title: Execution Id description: Execution ID to retrieve status summary for. responses: '200': description: Successful response with a single execution-level status summary including progress, alerts, timing, and per-rule breakdown. content: application/json: schema: $ref: '#/components/schemas/RuleExecutionSummary' examples: by_execution_id: summary: 'Completed run — some rules failed (partially_failed, is_complete: true)' value: execution_id: exec-456 requested_run_date: '2026-03-15' rule_effective_date: '2026-03-15' overall_status: partially_failed is_complete: true total_rules: 12 completion_percent: 100.0 progress: requested_rules: 0 started_rules: 0 succeeded_rules: 10 failed_rules: 2 alerts: total_alerts_received: 245 unique_alerts_after_deduplication: 198 timing: first_event_at: '2026-03-15T00:01:12' last_event_at: '2026-03-15T00:08:44' duration_seconds: 452 rules: - rule_id: rule-001 status: succeeded rule_alias: High Risk Transaction Rule rule_description: Flags transactions above risk threshold. total_alerts_received: 120 unique_alerts_after_deduplication: 98 - rule_id: rule-002 status: failed rule_alias: Velocity Check Rule total_alerts_received: 0 unique_alerts_after_deduplication: 0 by_execution_id_in_progress_with_failures: summary: 'Running with failures (in_progress_with_failures, is_complete: false)' value: execution_id: exec-789 requested_run_date: '2026-03-15' rule_effective_date: '2026-03-15' overall_status: in_progress_with_failures is_complete: false total_rules: 12 completion_percent: 50.0 progress: requested_rules: 0 started_rules: 5 succeeded_rules: 5 failed_rules: 2 alerts: total_alerts_received: 120 unique_alerts_after_deduplication: 98 timing: first_event_at: '2026-03-15T00:01:12' last_event_at: '2026-03-15T00:05:00' duration_seconds: 228 rules: - rule_id: rule-001 status: succeeded rule_alias: High Risk Transaction Rule rule_description: Flags transactions above risk threshold. total_alerts_received: 120 unique_alerts_after_deduplication: 98 - rule_id: rule-002 status: failed rule_alias: Velocity Check Rule total_alerts_received: 0 unique_alerts_after_deduplication: 0 '400': description: Bad request content: application/json: example: message: Invalid execution_id format. '403': description: Feature not available for tenant content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: message: Feature not available. '404': description: Execution not found content: application/json: example: message: Execution not found. '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' '502': description: Failed to retrieve execution status content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: retrieval_error: summary: Failed to retrieve execution status value: message: Failed to retrieve execution status. connection_error: summary: Service temporarily unavailable value: message: Service is temporarily unavailable. '504': description: Request timed out content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: message: Request timed out. security: - OAuth2 Client Credentials: [] tags: - Rules servers: - url: https://api.fenergox.com/tm/realtime /api/rules/rerun: post: summary: Rerun Rules description: Endpoint to rerun specific rules for a past date. operationId: rerun_rules_api_rules_rerun_post requestBody: content: application/json: schema: $ref: '#/components/schemas/RerunRulesRequestPayload' required: true responses: '200': description: Success responses - No processing needed or all rules rejected content: application/json: schema: $ref: '#/components/schemas/ExecuteRulesJsonResponse' anyOf: - $ref: '#/components/schemas/ExecuteRulesJsonResponse' - $ref: '#/components/schemas/ErrorResponse' title: Response Rerun Rules Api Rules Rerun Post '202': description: Rules accepted for rerun content: application/json: schema: $ref: '#/components/schemas/ExecuteRulesJsonResponse' '207': description: 'Multi-status: Some rules accepted, others rejected' content: application/json: schema: $ref: '#/components/schemas/ExecuteRulesJsonResponse' '400': description: Bad request - Invalid date or missing required parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: missing_rule_ids: summary: rule_ids is required value: message: rule_ids must be provided for rerun endpoint. date_too_old: summary: Date more than 30 days in past value: message: Execution date cannot be more than 30 days in the past. current_or_future_date: summary: Current or future date not allowed value: message: Execution date must be in the past (not today or future dates). '403': description: Feature not available for tenant content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' '429': description: Too many rule execution requests (guardrails) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: too_many_rules_per_request: summary: Exceeded per-request rule rerun limit value: message: 'Cannot request more than 2 rules in a single request. Requested 5 rules. (Default: 20% of 10 daily limit = 2 rules per request)' too_many_rules: summary: Exceeded daily rule rerun limit value: message: Daily rule rerun limit (10 rules) reached for 2024-01-15. too_many_requests: summary: Exceeded request frequency limit value: message: Hourly rule execution limit (1) reached for 2024-01-15. Try again next hour. '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - OAuth2 Client Credentials: [] tags: - Rules servers: - url: https://api.fenergox.com/tm/realtime /api/rules/schedule: get: summary: Get Rule Schedule description: 'Query the rule execution schedule. Provide **either** `date` (to list all live rules scheduled for that day) **or** `rule_id` (to list the next 5 upcoming execution datetimes for a specific rule). Supplying both or neither returns HTTP 400.' operationId: get_rule_schedule_api_rules_schedule_get parameters: - name: date in: query required: false schema: anyOf: - type: string - type: 'null' description: Date in YYYY-MM-DD format. Returns all live rules scheduled for that date. title: Date description: Date in YYYY-MM-DD format. Returns all live rules scheduled for that date. - name: rule_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Rule ID. Returns the next 5 upcoming execution datetimes (UTC) on which the rule is scheduled. title: Rule Id description: Rule ID. Returns the next 5 upcoming execution datetimes (UTC) on which the rule is scheduled. responses: '200': description: Scheduled rules for the given date, or scheduled dates for the given rule content: application/json: schema: oneOf: - $ref: '#/components/schemas/RuleScheduleByDateResponse' - $ref: '#/components/schemas/RuleScheduleByRuleIdResponse' examples: by_date: summary: Query by date value: date: '2023-10-15' total_rules_scheduled: 1 rules_scheduled: - rule_id: rule-001 rule_alias: High Risk Transaction Detection rule_description: Monitors transactions for high-risk indicators. execution_frequency: At 02:00 last_execution_date: '2023-10-14T02:00:00Z' by_rule_id: summary: Query by rule ID value: rule_id: rule-001 rule_alias: High Risk Transaction Detection rule_description: Monitors transactions for high-risk indicators. execution_frequency: At 02:00 last_execution_date: '2023-10-14T02:00:00Z' scheduled_dates: - '2023-10-15T02:00:00Z' - '2023-10-16T02:00:00Z' - '2023-10-17T02:00:00Z' - '2023-10-18T02:00:00Z' - '2023-10-19T02:00:00Z' '400': description: Bad request - invalid or conflicting parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: missing_param: summary: Neither date nor rule_id provided value: message: Provide either 'date' or 'rule_id' query parameter. both_params: summary: Both date and rule_id provided value: message: Provide either 'date' OR 'rule_id', but not both. invalid_date: summary: Invalid date format value: message: Invalid date format. Expected YYYY-MM-DD. '403': description: Feature not available for tenant content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: message: Feature not available. '404': description: Rule not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: message: Rule 'rule-001' not found or is not live. '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: message: Failed to retrieve rule schedule. Please retry the request. '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - OAuth2 Client Credentials: [] tags: - Rules servers: - url: https://api.fenergox.com/tm/realtime components: schemas: RuleExecutionTiming: properties: first_event_at: type: string title: First Event At description: Timestamp of the first event recorded for this execution (UTC, ISO 8601). last_event_at: type: string title: Last Event At description: Timestamp of the most recent event recorded for this execution (UTC, ISO 8601). duration_seconds: type: integer title: Duration Seconds description: Elapsed time in seconds between the first and last recorded events. additionalProperties: false type: object required: - first_event_at - last_event_at - duration_seconds title: RuleExecutionTiming description: Timing metrics for an execution. RuleExecutionAlerts: properties: total_alerts_received: anyOf: - type: integer title: Execution Finished - type: 'null' title: Execution In Progress title: Total Alerts Received description: Total number of alerts received across all rules in this execution. Null when the execution is still in progress and no alert data has been indexed yet; 0 when the execution is complete but no alerts were generated. unique_alerts_after_deduplication: anyOf: - type: integer title: Execution Finished - type: 'null' title: Execution In Progress title: Unique Alerts After Deduplication description: Number of unique alerts remaining after deduplication. Null when the execution is still in progress and no alert data has been indexed yet; 0 when the execution is complete but no alerts were generated. additionalProperties: false type: object title: RuleExecutionAlerts description: 'Aggregated alert counts for an execution. Fields are nullable when the execution is still in progress and no alert data has been indexed yet. They are 0 when the execution is complete but generated no alerts (failed or succeeded with no triggers).' RuleExecutionsByDateResponse: properties: requested_run_date: type: string title: Requested Run Date description: Date for which the rules were executed, in YYYY-MM-DD format. count: type: integer title: Count description: Number of rule executions on this date. rules: items: $ref: '#/components/schemas/RuleExecutionDetail' type: array title: Rules description: List of rule execution details for this date. additionalProperties: false type: object required: - requested_run_date - count - rules title: RuleExecutionsByDateResponse description: Model for rule executions grouped by run date. RuleExecutionByExecutionIDSummary: properties: execution_id: type: string title: Execution Id description: Unique identifier for this execution run. requested_run_date: type: string title: Requested Run Date description: The date for which this execution was requested, in YYYY-MM-DD format. rule_effective_date: type: string title: Rule Effective Date description: The effective date of the rules applied in this execution, in YYYY-MM-DD format. overall_status: $ref: '#/components/schemas/RuleExecutionOverallStatus' description: 'Aggregate status derived from per-rule outcomes. **Terminal states** (is_complete=true): succeeded, failed, partially_failed. **Non-terminal states** (is_complete=false): requested, in_progress, in_progress_with_failures.' is_complete: type: boolean title: Is Complete description: True when all rules have reached a terminal state (succeeded or failed). total_rules: type: integer title: Total Rules description: Total number of rules included in this execution. completion_percent: type: number title: Completion Percent description: Percentage of rules that have completed, calculated as (succeeded_rules + failed_rules) / total_rules * 100. progress: $ref: '#/components/schemas/RuleExecutionProgress' description: Breakdown of rules by their current status. alerts: $ref: '#/components/schemas/RuleExecutionAlerts' description: Aggregated alert counts for the entire execution. timing: $ref: '#/components/schemas/RuleExecutionTiming' description: Timing metrics covering the full span of this execution. rules: items: $ref: '#/components/schemas/RuleExecutionRuleDetail' type: array title: Rules description: Per-rule outcome details for all rules in this execution. default: [] additionalProperties: false type: object required: - execution_id - requested_run_date - rule_effective_date - overall_status - is_complete - total_rules - completion_percent - progress - alerts - timing title: RuleExecutionByExecutionIDSummary description: Execution-level summary returned when filtering by execution_id. RuleExecutionOverallStatus: type: string enum: - requested - in_progress - in_progress_with_failures - succeeded - failed - partially_failed title: RuleExecutionOverallStatus description: "Execution-level status derived from the aggregate of per-rule statuses.\n\nTerminal states (is_complete=True):\n SUCCEEDED – every rule finished successfully.\n FAILED – every rule that ran finished with a failure.\n PARTIALLY_FAILED – execution is done, but at least one rule failed\n and at least one succeeded.\n\nNon-terminal states (is_complete=False):\n REQUESTED – no rule has started yet; all are still queued.\n IN_PROGRESS – at least one rule is running; no failures so far.\n IN_PROGRESS_WITH_FAILURES – at least one rule is still running (or\n pending) AND at least one rule has already\n failed mid-flight." RuleExecutionRuleDetail: properties: rule_id: type: string title: Rule Id description: Unique identifier for the rule. status: $ref: '#/components/schemas/RuleExecutionStatus' description: Current execution status of the rule (e.g. requested, started, succeeded, failed). rule_alias: anyOf: - type: string title: Alias provided in rule definition - type: 'null' title: Alias not provided in rule definition title: Rule Alias description: Human-readable name or alias for the rule, if any. rule_description: anyOf: - type: string title: Description provided in rule definition - type: 'null' title: Description not provided in rule definition title: Rule Description description: Optional free-text description of the rule. total_alerts_received: anyOf: - type: integer title: Execution Finished - type: 'null' title: Execution In Progress title: Total Alerts Received description: Total alerts received for this rule. Null when the rule has not yet completed (started or requested); 0 when the rule has completed but generated no alerts. unique_alerts_after_deduplication: anyOf: - type: integer title: Execution Finished - type: 'null' title: Execution In Progress title: Unique Alerts After Deduplication description: Unique alerts remaining after deduplication for this rule. Null when the rule has not yet completed (started or requested); 0 when the rule has completed but generated no alerts. additionalProperties: false type: object required: - rule_id - status title: RuleExecutionRuleDetail description: 'Per-rule outcome within an execution-level summary. Omits execution_id and rule_effective_date — those are at the parent summary level.' HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError RuleExecutionStatus: type: string enum: - requested - started - succeeded - failed title: RuleExecutionStatus ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError RuleExecutionProgress: properties: requested_rules: type: integer title: Requested Rules description: Number of rules that have been queued but not yet started. started_rules: type: integer title: Started Rules description: Number of rules that have started but not yet reached a terminal state. succeeded_rules: type: integer title: Succeeded Rules description: Number of rules that completed successfully. failed_rules: type: integer title: Failed Rules description: Number of rules that completed with a failure. additionalProperties: false type: object required: - requested_rules - started_rules - succeeded_rules - failed_rules title: RuleExecutionProgress description: Rule status breakdown for an execution. RuleExecutionDetail: properties: rule_id: type: string title: Rule Id description: Unique identifier for the rule. status: $ref: '#/components/schemas/RuleExecutionStatus' description: Current execution status of the rule (e.g. requested, started, succeeded, failed). rule_alias: type: string title: Rule Alias description: Human-readable name or alias for the rule. rule_effective_date: type: string title: Rule Effective Date description: Effective date of the rule applied in this execution, in YYYY-MM-DD format. execution_id: type: string title: Execution Id description: Unique identifier for the execution run this rule belongs to. total_alerts_received: anyOf: - type: integer title: Rule completed - type: 'null' title: Rule in progress title: Total Alerts Received description: Total alerts received for this rule. Null when the rule has not yet completed (started or requested); 0 when the rule has completed but generated no alerts. unique_alerts_after_deduplication: anyOf: - type: integer title: Rule completed - type: 'null' title: Rule in progress title: Unique Alerts After Deduplication description: Unique alerts remaining after deduplication for this rule. Null when the rule has not yet completed (started or requested); 0 when the rule has completed but generated no alerts. rule_description: anyOf: - type: string title: Description provided - type: 'null' title: No description provided title: Rule Description description: Optional free-text description for this rule. additionalProperties: false type: object required: - rule_id - status - rule_alias - rule_effective_date - execution_id title: RuleExecutionDetail description: Model for detailed rule execution information. ExecuteRuleGroupsJsonResponse: properties: status_code: type: integer title: Status Code content: items: $ref: '#/components/schemas/ExecuteRuleGroupsResponseContent' type: array title: Content type: object required: - status_code - content title: ExecuteRuleGroupsJsonResponse ExecuteRulesRequestPayload: properties: execution_date: type: string format: date title: Execution Date description: Date for which to execute the rules in the format YYYY-MM-DD. rule_ids: anyOf: - items: type: string pattern: ^BR\d+$ type: array - type: 'null' title: Rule Ids description: List of rule IDs to execute. If not provided and rule_group_ids not provided, all rules will be executed. Mutually exclusive of rule_group_ids, both cannot be provided. rule_group_ids: anyOf: - items: type: string pattern: ^RG\d+$ type: array minItems: 1 - type: 'null' title: Rule Group Ids description: List of rule group IDs to execute. Mutually exclusive of rule_ids - both cannot be provided. force: type: boolean title: Force description: Flag to force rule execution for specified date regardless of previous executions. default: false additionalProperties: false type: object required: - execution_date title: ExecuteRulesRequestPayload description: "Request payload for the rule execution endpoint.\n\nAttributes:\n execution_date: The date for which rules should be executed (YYYY-MM-DD).\n rule_ids: Optional list of specific rule IDs to execute. All rules are executed if absent.\n rule_group_ids: Optional list of rule group IDs to execute. Mutually exclusive of rule_ids.\n force: If True, run rules even if they have previously run for this date." RejectedRulesResponse: properties: rule_id: type: string title: Rule Id reason: type: string title: Reason type: object required: - rule_id - reason title: RejectedRulesResponse ExecuteRulesResponseContent: properties: message: type: string title: Message execution_id: type: string title: Execution Id accepted_rules: items: type: string type: array title: Accepted Rules default: [] rejected_rules: items: $ref: '#/components/schemas/RejectedRulesResponse' type: array title: Rejected Rules default: [] type: object title: ExecuteRulesResponseContent RuleExecutionOverallStatus_2: type: string enum: - requested - in_progress - in_progress_with_failures - succeeded - failed - partially_failed title: RuleExecutionOverallStatus description: "Execution-level status derived from the aggregate of per-rule statuses.\n\nTerminal states (is_complete=true):\n succeeded — every rule finished successfully.\n failed — every rule that ran finished with a failure.\n partially_failed — execution is done, but at least one rule failed and at least one succeeded.\n\nNon-terminal states (is_complete=false):\n requested — no rule has started yet; all are still queued.\n in_progress — at least one rule is running; no failures so far.\n in_progress_with_failures — at least one rule is still running (or pending) AND at least one rule has already failed mid-flight." RuleExecutionSummary: properties: execution_id: type: string title: Execution Id description: Unique identifier for this execution run. requested_run_date: type: string title: Requested Run Date description: The date for which this execution was requested, in YYYY-MM-DD format. rule_effective_date: type: string title: Rule Effective Date description: The effective date of the rules applied in this execution, in YYYY-MM-DD format. overall_status: $ref: '#/components/schemas/RuleExecutionOverallStatus_2' description: 'Aggregate status derived from per-rule outcomes. Terminal states (is_complete=true): succeeded, failed, partially_failed. Non-terminal states (is_complete=false): requested, in_progress, in_progress_with_failures.' is_complete: type: boolean title: Is Complete description: True when all rules have reached a terminal state (succeeded or failed). total_rules: type: integer title: Total Rules description: Total number of rules included in this execution. completion_percent: type: number title: Completion Percent description: Percentage of rules that have completed, calculated as (succeeded_rules + failed_rules) / total_rules * 100. progress: $ref: '#/components/schemas/RuleExecutionProgress' description: Breakdown of rules by their current status. alerts: $ref: '#/components/schemas/RuleExecutionAlerts' description: Aggregated alert counts for the entire execution. timing: $ref: '#/components/schemas/RuleExecutionTiming' description: Timing metrics covering the full span of this execution. rules: items: $ref: '#/components/schemas/RuleExecutionRuleDetail' type: array title: Rules description: Per-rule outcome details for all rules in this execution. default: [] additionalProperties: false type: object required: - execution_id - requested_run_date - rule_effective_date - overall_status - is_complete - total_rules - completion_percent - progress - alerts - timing title: RuleExecutionSummary description: Execution-level summary returned when filtering by execution_id. ExecuteRuleGroupsResponseContent: properties: rule_group_id: type: string title: Rule Group Id execution_id: type: string title: Execution Id accepted_rules: items: type: string type: array title: Accepted Rules default: [] rejected_rules: items: type: string type: array title: Rejected Rules default: [] type: object required: - rule_group_id - execution_id title: ExecuteRuleGroupsResponseContent ExecuteRulesJsonResponse: properties: status_code: type: integer title: Status Code content: $ref: '#/components/schemas/ExecuteRulesResponseContent' type: object required: - status_code - content title: ExecuteRulesJsonResponse ValidationError_2: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError ErrorResponse: properties: message: type: string title: Message type: object required: - message title: ErrorResponse RerunRulesRequestPayload: properties: execution_date: type: string format: date title: Execution Date description: Date for which to execute the rules in the format YYYY-MM-DD. rule_ids: items: type: string type: array minItems: 1 title: Rule Ids description: List of rule IDs to rerun. Must contain at least one rule ID. type: object required: - execution_date - rule_ids additionalProperties: false title: RerunRulesRequestPayload ValidationError_3: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError RuleScheduleItem: type: object properties: rule_id: type: string title: Rule Id description: Unique identifier of the rule rule_alias: type: string title: Rule Alias description: Human-readable name of the rule rule_description: type: string title: Rule Description description: Description of what the rule monitors execution_frequency: type: string title: Execution Frequency description: Human-readable description of when the rule executes (e.g. 'At 02:00') last_execution_date: anyOf: - type: string format: date-time - type: 'null' title: Last Execution Date description: ISO-8601 datetime of the rule's most recent execution required: - rule_id - rule_alias - rule_description - execution_frequency title: RuleScheduleItem RuleScheduleByDateResponse: type: object properties: date: type: string title: Date description: The queried date in YYYY-MM-DD format examples: - '2023-10-15' total_rules_scheduled: type: integer title: Total Rules Scheduled description: Total number of live rules scheduled to run on this date rules_scheduled: type: array title: Rules Scheduled description: List of rules scheduled to execute on the given date items: $ref: '#/components/schemas/RuleScheduleItem' required: - date - total_rules_scheduled - rules_scheduled title: RuleScheduleByDateResponse RuleScheduleByRuleIdResponse: type: object properties: rule_id: type: string title: Rule Id description: Unique identifier of the rule rule_alias: type: string title: Rule Alias description: Human-readable name of the rule rule_description: type: string title: Rule Description description: Description of what the rule monitors execution_frequency: type: string title: Execution Frequency description: Human-readable description of when the rule executes (e.g. 'At 02:00') last_execution_date: anyOf: - type: string format: date-time - type: 'null' title: Last Execution Date description: ISO-8601 datetime of the rule's most recent execution scheduled_dates: type: array title: Scheduled Dates description: The next 5 upcoming execution datetimes (UTC) for this rule items: type: string format: date-time required: - rule_id - rule_alias - rule_description - execution_frequency - scheduled_dates title: RuleScheduleByRuleIdResponse ValidationError_4: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError securitySchemes: OAuth2_Client_Credentials: type: oauth2 flows: clientCredentials: scopes: {} tokenUrl: oauth2/token x-refined-from: - fenergo-tm-observability-api-spec-openapi.json - fenergo-tm-rule-execution-api-spec-openapi.json - fenergo-tm-rule-rerun-api-spec-openapi.json - fenergo-tm-rule-scheduling-api-spec-openapi.json