{ "components": { "schemas": { "BotFeatureKPI": { "description": "Per-feature KPI metrics for osidb-bot auto-processing.", "properties": { "acceptance_rate": { "description": "Percentage of compared fields kept unchanged, kept / (kept + modified) * 100 (0.0-100.0)", "maximum": 100.0, "minimum": 0.0, "title": "Acceptance Rate", "type": "number" }, "avg_confidence": { "anyOf": [ { "maximum": 1.0, "minimum": 0.0, "type": "number" }, { "type": "null" } ], "description": "Average confidence score across entries that reported one. None when no entry recorded a confidence value.", "title": "Avg Confidence" }, "avg_data_quality": { "anyOf": [ { "maximum": 1.0, "minimum": 0.0, "type": "number" }, { "type": "null" } ], "description": "Average data_quality score across entries that reported one. None when no entry recorded a data_quality value.", "title": "Avg Data Quality" }, "avg_suggestion_deviation": { "anyOf": [ { "maximum": 1.0, "minimum": 0.0, "type": "number" }, { "type": "null" } ], "description": "Average normalized deviation (0.0 = exact match, 1.0 = maximum divergence) between modified suggestions and current values, using the same weighted scoring as evals. None when no deviation data is available.", "title": "Avg Suggestion Deviation" }, "kept": { "description": "Fields whose latest bot suggestion still matches the current OSIDB value", "minimum": 0.0, "title": "Kept", "type": "integer" }, "modified": { "description": "Fields whose latest bot suggestion differs from the current OSIDB value", "minimum": 0.0, "title": "Modified", "type": "integer" }, "skipped": { "description": "Flaw fields the bot skipped on quality gates (type=AI-Bot-Skipped), counted once per field even if it was re-skipped (only possible via `osidb-bot --force`).", "minimum": 0.0, "title": "Skipped", "type": "integer" }, "suggested": { "description": "Flaw fields the bot made a suggestion for (type=AI-Bot), counted once per field even if it was re-suggested (only possible via `osidb-bot --force`). Because kept and modified reflect one accept-or-modify decision per field (the latest suggestion only), suggested is >= kept + modified -- a checkable data-integrity bound.", "minimum": 0.0, "title": "Suggested", "type": "integer" } }, "required": [ "suggested", "skipped", "kept", "modified", "acceptance_rate" ], "title": "BotFeatureKPI", "type": "object" }, "BotKPIEntry": { "description": "A compact bot record, included with detail=true.\n\nFor each CVE/feature, count suggestions and skips once and compare only the\nlatest in-window suggestion. Deviation is against the current flaw value,\nnot a historical snapshot. Null deviation means the record was not scored.", "properties": { "aegis_version": { "default": "", "description": "Empty for unknown historical versions", "title": "Aegis Version", "type": "string" }, "confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidence" }, "cve_id": { "title": "Cve Id", "type": "string" }, "data_quality": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Data Quality" }, "datetime": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Datetime" }, "deviation": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Deviation" }, "feature": { "title": "Feature", "type": "string" }, "type": { "title": "Type", "type": "string" } }, "required": [ "cve_id", "feature", "datetime", "type", "deviation", "data_quality", "confidence" ], "title": "BotKPIEntry", "type": "object" }, "BotKPIResponse": { "description": "Response model for osidb-bot KPI metrics endpoint.", "properties": { "available_components": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "description": "Sorted unique affected components in the selected bot flaws, only with detail=true", "title": "Available Components" }, "entries": { "anyOf": [ { "items": { "$ref": "#/components/schemas/BotKPIEntry" }, "type": "array" }, { "type": "null" } ], "description": "Compact suggestion/skip records, only with detail=true", "title": "Entries" }, "features": { "additionalProperties": { "$ref": "#/components/schemas/BotFeatureKPI" }, "description": "Per-feature KPI metrics keyed by field name", "title": "Features", "type": "object" }, "total_flaws_processed": { "description": "Number of bot-processed flaws that contributed to the result: those with at least one suggestion whose timestamp falls in the selected time range, or all bot-processed flaws when no range is given.", "minimum": 0.0, "title": "Total Flaws Processed", "type": "integer" } }, "required": [ "total_flaws_processed", "features" ], "title": "BotKPIResponse", "type": "object" }, "CVEFeatureName": { "enum": [ "suggest-impact", "suggest-cwe", "suggest-description", "suggest-statement", "suggest-affected-components", "identify-pii", "cvss-diff-explainer", "quality-review", "suggest-affected-packages", "query-affected-components", "suggest-manifest-component-and-state" ], "title": "CVEFeatureName", "type": "string" }, "CVEMultiAnalysisRequest": { "additionalProperties": true, "properties": { "agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Agent to use: 'public' (no OSIDB tools) or 'redhat' (with OSIDB tools). Defaults to the server-configured agent (AEGIS_WEB_FEATURE_AGENT).", "title": "Agent" }, "cve_id": { "description": "CVE identifier (e.g. CVE-2025-12345)", "pattern": "^CVE-[0-9]{4}-[0-9]{4,16}$", "title": "Cve Id", "type": "string" }, "features": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "description": "Feature names to run. If omitted or empty, a default set of stable features is run.", "title": "Features" }, "steering_notes": { "anyOf": [ { "maxLength": 5000, "type": "string" }, { "type": "null" } ], "description": "Internal analyst notes providing additional flaw context", "title": "Steering Notes" } }, "required": [ "cve_id" ], "title": "CVEMultiAnalysisRequest", "type": "object" }, "CVEMultiAnalysisResponse": { "properties": { "errors": { "additionalProperties": { "$ref": "#/components/schemas/FeatureError" }, "description": "Feature name to error detail (only for failures).", "title": "Errors", "type": "object" }, "results": { "additionalProperties": true, "description": "Feature name to output model (or null on failure).", "title": "Results", "type": "object" } }, "title": "CVEMultiAnalysisResponse", "type": "object" }, "CVESingleAnalysisRequest": { "additionalProperties": true, "properties": { "agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Agent to use: 'public' (no OSIDB tools) or 'redhat' (with OSIDB tools). Defaults to the server-configured agent (AEGIS_WEB_FEATURE_AGENT).", "title": "Agent" }, "cve_id": { "description": "CVE identifier (e.g. CVE-2025-12345)", "pattern": "^CVE-[0-9]{4}-[0-9]{4,16}$", "title": "Cve Id", "type": "string" }, "steering_notes": { "anyOf": [ { "maxLength": 5000, "type": "string" }, { "type": "null" } ], "description": "Internal analyst notes providing additional flaw context", "title": "Steering Notes" } }, "required": [ "cve_id" ], "title": "CVESingleAnalysisRequest", "type": "object" }, "ComponentFeatureName": { "enum": [ "component-intelligence" ], "title": "ComponentFeatureName", "type": "string" }, "ErrorResponse": { "properties": { "detail": { "title": "Detail", "type": "string" } }, "required": [ "detail" ], "title": "ErrorResponse", "type": "object" }, "FeatureError": { "properties": { "detail": { "description": "Human-readable error message", "title": "Detail", "type": "string" }, "error": { "description": "Exception class name", "title": "Error", "type": "string" } }, "required": [ "error", "detail" ], "title": "FeatureError", "type": "object" }, "FeatureKPI": { "description": "Feature KPI model for CVE analysis feedback.\n\nContains the acceptance score percentage and filtered log entries for a feature.\nEntries include both standard user feedback and programmatic (automatic) feedback.", "properties": { "acceptance_percentage": { "description": "Acceptance score as a percentage (0.0 to 100.0, e.g., 75.0 for 75%)", "maximum": 100.0, "minimum": 0.0, "title": "Acceptance Percentage", "type": "number" }, "available_versions": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "description": "Unfiltered versions for this feature, including superseded programmatic records; only with detail=true. Empty string means unknown.", "title": "Available Versions" }, "entries": { "description": "List of log entries filtered by feature, sorted by datetime", "items": { "$ref": "#/components/schemas/KPIEntry" }, "title": "Entries", "type": "array" } }, "required": [ "acceptance_percentage", "entries" ], "title": "FeatureKPI", "type": "object" }, "Feedback": { "description": "Data structure for feedback.\n\nAll fields are stored without modification to preserve original data.\nCSV escaping is handled automatically by the csv library during logging.", "properties": { "accept": { "default": false, "title": "Accept", "type": "boolean" }, "actual": { "anyOf": [ { "maxLength": 5000, "type": "string" }, { "type": "null" } ], "default": "", "title": "Actual" }, "cve_id": { "pattern": "^CVE-[0-9]{4}-[0-9]{4,16}$", "title": "Cve Id", "type": "string" }, "email": { "maxLength": 100, "minLength": 1, "title": "Email", "type": "string" }, "expected": { "anyOf": [ { "maxLength": 5000, "type": "string" }, { "type": "null" } ], "default": "", "title": "Expected" }, "feature": { "maxLength": 100, "minLength": 1, "title": "Feature", "type": "string" }, "rejection_comment": { "anyOf": [ { "maxLength": 5000, "type": "string" }, { "type": "null" } ], "default": "", "title": "Rejection Comment" }, "request_time": { "anyOf": [ { "maxLength": 50, "type": "string" }, { "type": "null" } ], "default": "", "title": "Request Time" } }, "required": [ "feature", "cve_id", "email" ], "title": "Feedback", "type": "object" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "title": "Detail", "type": "array" } }, "title": "HTTPValidationError", "type": "object" }, "KPIComponentDetails": { "description": "Component-level feedback diff for a KPI entry.\n\nPopulated only for component features when ``detail=true`` is passed to the\nKPI endpoint.", "properties": { "suggested_components": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "description": "Components suggested by AEGIS", "title": "Suggested Components" } }, "title": "KPIComponentDetails", "type": "object" }, "KPIEntry": { "description": "Individual KPI entry model.\n\nContains datetime, acceptance status, and AEGIS version for a feedback entry.\nWhen ``detail=true`` is passed to the KPI endpoint, optional fields are\npopulated with CVE and component feedback context.", "properties": { "accepted": { "description": "Whether the feedback was accepted", "title": "Accepted", "type": "boolean" }, "aegis_version": { "default": "", "description": "AEGIS version at time of feedback (may be empty string if not available)", "title": "Aegis Version", "type": "string" }, "components": { "anyOf": [ { "$ref": "#/components/schemas/KPIComponentDetails" }, { "type": "null" } ], "description": "Component feedback diff (included when detail=true for component features)" }, "cve_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "CVE identifier (included when detail=true)", "title": "Cve Id" }, "datetime": { "description": "Timestamp of the feedback entry (format: YYYY-MM-DD HH:MM:SS.mmm or YYYY-MM-DD HH:MM:SS)", "title": "Datetime", "type": "string" }, "feedback_source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Feedback origin: manual or programmatic (included when detail=true)", "title": "Feedback Source" } }, "required": [ "datetime", "accepted" ], "title": "KPIEntry", "type": "object" }, "ProgrammaticFeedback": { "additionalProperties": false, "description": "Data structure for programmatic feedback collected when user saves a flaw.\n\nCaptures the AI suggested value and the actual submitted value for comparison.\nThe acceptance_score and llmjudge_explanation are calculated server-side\nand should not be sent by clients.", "properties": { "cve_id": { "pattern": "^CVE-[0-9]{4}-[0-9]{4,16}$", "title": "Cve Id", "type": "string" }, "email": { "maxLength": 100, "minLength": 1, "title": "Email", "type": "string" }, "feature": { "maxLength": 100, "minLength": 1, "title": "Feature", "type": "string" }, "submitted_value": { "anyOf": [ { "maxLength": 5000, "type": "string" }, { "type": "null" } ], "default": "", "title": "Submitted Value" }, "suggested_value": { "anyOf": [ { "maxLength": 5000, "type": "string" }, { "type": "null" } ], "default": "", "title": "Suggested Value" } }, "required": [ "feature", "cve_id", "email" ], "title": "ProgrammaticFeedback", "type": "object" }, "SortOrder": { "description": "Sort order for datetime field.", "enum": [ "asc", "desc" ], "title": "SortOrder", "type": "string" }, "ValidationError": { "properties": { "ctx": { "title": "Context", "type": "object" }, "input": { "title": "Input" }, "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "title": "Location", "type": "array" }, "msg": { "title": "Message", "type": "string" }, "type": { "title": "Error Type", "type": "string" } }, "required": [ "loc", "msg", "type" ], "title": "ValidationError", "type": "object" } }, "securitySchemes": { "ApiKeyAuth": { "in": "header", "name": "X-API-Key", "type": "apiKey" } } }, "info": { "description": "A simple web console and REST API for Aegis.", "title": "Aegis REST-API", "version": "v1" }, "openapi": "3.1.0", "paths": { "/": { "get": { "operationId": "home__get", "responses": { "200": { "content": { "text/html": { "schema": { "type": "string" } } }, "description": "Successful Response" }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Too Many Requests" }, "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unexpected error" } }, "summary": "Home" } }, "/api/v1/analysis/component": { "get": { "operationId": "component_analysis_api_v1_analysis_component_get", "parameters": [ { "in": "query", "name": "feature", "required": true, "schema": { "$ref": "#/components/schemas/ComponentFeatureName" } }, { "in": "query", "name": "component_name", "required": true, "schema": { "title": "Component Name", "type": "string" } }, { "in": "query", "name": "detail", "required": false, "schema": { "default": false, "title": "Detail", "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Too Many Requests" }, "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unexpected error" } }, "summary": "Component Analysis" } }, "/api/v1/analysis/cve": { "get": { "operationId": "cve_analysis_api_v1_analysis_cve_get", "parameters": [ { "in": "query", "name": "feature", "required": true, "schema": { "$ref": "#/components/schemas/CVEFeatureName" } }, { "in": "query", "name": "cve_id", "required": true, "schema": { "pattern": "^CVE-[0-9]{4}-[0-9]{4,16}$", "title": "Cve Id", "type": "string" } }, { "in": "query", "name": "detail", "required": false, "schema": { "default": false, "title": "Detail", "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Too Many Requests" }, "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unexpected error" } }, "summary": "Cve Analysis" }, "post": { "operationId": "cve_multi_analysis_api_v1_analysis_cve_post", "parameters": [ { "in": "query", "name": "detail", "required": false, "schema": { "default": false, "title": "Detail", "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CVEMultiAnalysisRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CVEMultiAnalysisResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Too Many Requests" }, "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unexpected error" } }, "summary": "Cve Multi Analysis" } }, "/api/v1/analysis/cve/{feature}": { "post": { "operationId": "cve_analysis_with_body_api_v1_analysis_cve__feature__post", "parameters": [ { "in": "path", "name": "feature", "required": true, "schema": { "$ref": "#/components/schemas/CVEFeatureName" } }, { "in": "query", "name": "detail", "required": false, "schema": { "default": false, "title": "Detail", "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CVESingleAnalysisRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Too Many Requests" }, "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unexpected error" } }, "summary": "Cve Analysis With Body" } }, "/api/v1/analysis/kpi/cve": { "get": { "description": "Retrieve Key Performance Indicator (KPI) metrics for CVE analysis feedback, filtered by feature name. Returns a dictionary mapping feature names to their KPI responses (acceptance score percentage and all matching log entries sorted by datetime). Use feature='all' to get KPIs for all features. For single feature queries, the dict contains one key-value pair.", "operationId": "cve_kpi_api_v1_analysis_kpi_cve_get", "parameters": [ { "description": "Feature name to filter entries by. Valid values include: 'suggest-impact', 'suggest-cwe', 'suggest-description', 'suggest-statement', 'identify-pii', 'cvss-diff-explainer', 'quality-review', 'suggest-affected-components', or 'all' to get KPIs for all features.", "in": "query", "name": "feature", "required": true, "schema": { "description": "Feature name to filter entries by. Valid values include: 'suggest-impact', 'suggest-cwe', 'suggest-description', 'suggest-statement', 'identify-pii', 'cvss-diff-explainer', 'quality-review', 'suggest-affected-components', or 'all' to get KPIs for all features.", "examples": [ "suggest-impact", "quality-review", "suggest-affected-components", "all" ], "title": "Feature", "type": "string" } }, { "description": "Sort order for datetime field. Must be 'asc' (ascending, oldest first) or 'desc' (descending, newest first). Defaults to 'asc'.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/SortOrder", "default": "asc", "description": "Sort order for datetime field. Must be 'asc' (ascending, oldest first) or 'desc' (descending, newest first). Defaults to 'asc'.", "examples": [ "asc", "desc" ] } }, { "description": "Optional exact CVE identifier filter (e.g. CVE-2025-1234).", "in": "query", "name": "cve_id", "required": false, "schema": { "anyOf": [ { "pattern": "^CVE-[0-9]{4}-[0-9]{4,7}$", "type": "string" }, { "type": "null" } ], "description": "Optional exact CVE identifier filter (e.g. CVE-2025-1234).", "examples": [ "CVE-2025-1234" ], "title": "Cve Id" } }, { "description": "Optional filter for entries where AEGIS suggested this component name.", "in": "query", "name": "source_component", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Optional filter for entries where AEGIS suggested this component name.", "examples": [ "kernel" ], "title": "Source Component" } }, { "description": "When true, only include entries where AEGIS suggested two or more components.", "in": "query", "name": "multiple_source_components", "required": false, "schema": { "default": false, "description": "When true, only include entries where AEGIS suggested two or more components.", "title": "Multiple Source Components", "type": "boolean" } }, { "description": "When true, include CVE and component context fields on each entry.", "in": "query", "name": "detail", "required": false, "schema": { "default": false, "description": "When true, include CVE and component context fields on each entry.", "title": "Detail", "type": "boolean" } }, { "description": "Filter all features by the flaw's current affected component in OSIDB.", "in": "query", "name": "component", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter all features by the flaw's current affected component in OSIDB.", "title": "Component" } }, { "description": "Inclusive feedback timestamp lower bound (ISO 8601; UTC if no timezone).", "in": "query", "name": "recorded_after", "required": false, "schema": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "Inclusive feedback timestamp lower bound (ISO 8601; UTC if no timezone).", "title": "Recorded After" } }, { "description": "Inclusive feedback timestamp upper bound (ISO 8601; UTC if no timezone).", "in": "query", "name": "recorded_before", "required": false, "schema": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "Inclusive feedback timestamp upper bound (ISO 8601; UTC if no timezone).", "title": "Recorded Before" } }, { "description": "Allowed Aegis versions/builds; repeat for multiple versions, empty string for unknown.", "in": "query", "name": "aegis_version", "required": false, "schema": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "description": "Allowed Aegis versions/builds; repeat for multiple versions, empty string for unknown.", "title": "Aegis Version" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "all_features": { "summary": "Response when feature='all'", "value": { "suggest-cwe": { "acceptance_percentage": 50.0, "entries": [] }, "suggest-impact": { "acceptance_percentage": 75.0, "entries": [] } } }, "empty_response": { "summary": "Response when no entries exist for feature", "value": { "suggest-impact": { "acceptance_percentage": 0.0, "entries": [] } } }, "single_feature": { "summary": "Response for single feature query", "value": { "suggest-impact": { "acceptance_percentage": 75.0, "entries": [ { "accepted": true, "aegis_version": "1.0.0", "datetime": "2025-01-15 10:30:45.123" }, { "accepted": true, "aegis_version": "1.0.0", "datetime": "2025-01-15 11:00:00.456" }, { "accepted": false, "aegis_version": "1.0.0", "datetime": "2025-01-15 11:30:15.789" }, { "accepted": true, "aegis_version": "1.0.0", "datetime": "2025-01-15 12:00:30.012" } ] } } } }, "schema": { "additionalProperties": { "$ref": "#/components/schemas/FeatureKPI" }, "title": "Response Cve Kpi Api V1 Analysis Kpi Cve Get", "type": "object" } } }, "description": "Successful response with KPI metrics" }, "422": { "content": { "application/json": { "example": { "detail": [ { "loc": [ "query", "feature" ], "msg": "Field required", "type": "missing" } ] } } }, "description": "Validation error - invalid order parameter or missing feature" }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Too Many Requests" }, "500": { "content": { "application/json": { "example": { "detail": "Error retrieving KPI data for feature 'suggest-impact': " } } }, "description": "Internal server error" }, "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unexpected error" } }, "summary": "Get CVE Analysis KPI Metrics" } }, "/api/v1/analysis/kpi/osidb-bot": { "get": { "description": "Retrieve KPI metrics for flaws auto-processed by the osidb-bot. Compares bot suggestions against current flaw values to measure how often analysts keep, modify, or skip bot suggestions. Only flaws in DONE workflow state are included. Results are cached and incrementally updated on subsequent requests; a flaw is automatically re-scored whenever it changes in OSIDB.", "operationId": "osidb_bot_kpi_api_v1_analysis_kpi_osidb_bot_get", "parameters": [ { "description": "Only include flaws updated after this ISO 8601 datetime (e.g. 2025-01-01T00:00:00Z).", "in": "query", "name": "changed_after", "required": false, "schema": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "Only include flaws updated after this ISO 8601 datetime (e.g. 2025-01-01T00:00:00Z).", "title": "Changed After" } }, { "description": "Only include flaws updated before this ISO 8601 datetime.", "in": "query", "name": "changed_before", "required": false, "schema": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "Only include flaws updated before this ISO 8601 datetime.", "title": "Changed Before" } }, { "description": "Scope KPI metrics to flaws affecting this component, e.g. 'kernel'.", "in": "query", "name": "component", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Scope KPI metrics to flaws affecting this component, e.g. 'kernel'.", "title": "Component" } }, { "description": "Include compact suggestion/skip records and unique affected components. History compares suggestions with current OSIDB values, not past snapshots.", "in": "query", "name": "detail", "required": false, "schema": { "default": false, "description": "Include compact suggestion/skip records and unique affected components. History compares suggestions with current OSIDB values, not past snapshots.", "title": "Detail", "type": "boolean" } }, { "description": "Inclusive suggestion timestamp lower bound; does not filter flaw updated_dt.", "in": "query", "name": "recorded_after", "required": false, "schema": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "Inclusive suggestion timestamp lower bound; does not filter flaw updated_dt.", "title": "Recorded After" } }, { "description": "Inclusive suggestion timestamp upper bound; does not filter flaw updated_dt.", "in": "query", "name": "recorded_before", "required": false, "schema": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "description": "Inclusive suggestion timestamp upper bound; does not filter flaw updated_dt.", "title": "Recorded Before" } }, { "description": "Allowed Aegis versions/builds; repeat for multiple versions, empty string for unknown.", "in": "query", "name": "aegis_version", "required": false, "schema": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "description": "Allowed Aegis versions/builds; repeat for multiple versions, empty string for unknown.", "title": "Aegis Version" } } ], "responses": { "200": { "content": { "application/json": { "example": { "features": { "impact": { "acceptance_rate": 84.6, "avg_confidence": 0.82, "avg_data_quality": 0.85, "avg_suggestion_deviation": 0.35, "kept": 110, "modified": 20, "skipped": 12, "suggested": 133 } }, "total_flaws_processed": 142 }, "schema": { "$ref": "#/components/schemas/BotKPIResponse" } } }, "description": "Successful response with bot KPI metrics" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Too Many Requests" }, "503": { "content": { "application/json": { "example": { "detail": "Unable to connect to OSIDB." } } }, "description": "OSIDB is unreachable" }, "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unexpected error" } }, "summary": "Get osidb-bot KPI Metrics" } }, "/api/v1/feedback": { "post": { "description": "Receive feedback and log it to CSV file.\n\nAll data is preserved without modification. CSV library handles escaping.", "operationId": "save_feedback_api_v1_feedback_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Feedback" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Too Many Requests" }, "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unexpected error" } }, "summary": "Save Feedback" } }, "/api/v1/programmatic-feedback": { "post": { "description": "Receive programmatic feedback and log it to CSV file.\n\nThis endpoint captures AI suggestion acceptance data when users save flaws,\nincluding the suggested value and submitted value. The acceptance score is\ncalculated server-side based on whether the values match. For features that\nsupport semantic similarity (title, description, statement, mitigation),\nsemantic proximity scoring is attempted. If semantic scoring fails or times out,\nthe entry remains with an empty acceptance_score and can be retried later.", "operationId": "save_programmatic_feedback_api_v1_programmatic_feedback_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProgrammaticFeedback" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" }, "429": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Too Many Requests" }, "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Unexpected error" } }, "summary": "Save Programmatic Feedback" } } }, "security": [ { "ApiKeyAuth": [] } ] }