{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kognitos/json-schema/kognitos-dashboards-query-insights-response-schema.json",
  "title": "dashboardsQueryInsightsResponse",
  "description": "Response message for QueryInsights method.\nContains aggregated analytics insights across value, runs, and completions.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kognitos-analytics-api-openapi.yml#/components/schemas/dashboardsQueryInsightsResponse",
  "type": "object",
  "properties": {
    "value_insight": {
      "$ref": "#/$defs/dashboardsValueInsight"
    },
    "run_insight": {
      "$ref": "#/$defs/dashboardsRunInsight"
    },
    "completion_insight": {
      "$ref": "#/$defs/dashboardsCompletionInsight"
    },
    "awaiting_guidance_insight": {
      "$ref": "#/$defs/dashboardsAwaitingGuidanceInsight"
    }
  },
  "$defs": {
    "dashboardsAutomationRunInsight": {
      "type": "object",
      "properties": {
        "automation_id": {
          "type": "string",
          "title": "The automation ID.\nFormat: organizations/{organization}/workspaces/{workspace}/automations/{automation}",
          "readOnly": true
        },
        "display_name": {
          "type": "string",
          "description": "The display name of the automation.",
          "readOnly": true
        },
        "runs_count": {
          "type": "string",
          "format": "int64",
          "description": "Number of runs for this automation.",
          "readOnly": true
        }
      },
      "description": "AutomationRunInsight contains run count metrics for a specific automation."
    },
    "dashboardsAutomationRunInsightList": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/dashboardsAutomationRunInsight"
          },
          "description": "List of run insights per automation.",
          "readOnly": true
        }
      },
      "description": "AutomationRunInsightList contains run insights for automations within a workspace."
    },
    "dashboardsAutomationValueInsight": {
      "type": "object",
      "properties": {
        "automation_id": {
          "type": "string",
          "title": "The automation ID.\nFormat: organizations/{organization}/workspaces/{workspace}/automations/{automation}",
          "readOnly": true
        },
        "display_name": {
          "type": "string",
          "description": "The display name of the automation.",
          "readOnly": true
        },
        "time_saved_secs": {
          "type": "string",
          "format": "int64",
          "description": "Time saved by this automation in seconds.",
          "readOnly": true
        },
        "money_saved_usd": {
          "type": "string",
          "description": "Money saved by this automation in USD.",
          "readOnly": true
        }
      },
      "description": "AutomationValueInsight contains value metrics for a specific automation."
    },
    "dashboardsAutomationValueInsightList": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/dashboardsAutomationValueInsight"
          },
          "description": "List of value insights per automation.",
          "readOnly": true
        }
      },
      "description": "AutomationValueInsightList contains value insights for automations within a workspace."
    },
    "dashboardsAwaitingGuidanceInsight": {
      "type": "object",
      "properties": {
        "total_runs_awaiting_guidance": {
          "type": "string",
          "format": "int64",
          "description": "Total number of runs awaiting guidance.",
          "readOnly": true
        },
        "runs_per_period": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/dashboardsRunsAwaitingGuidanceByPeriod"
          },
          "description": "Runs awaiting guidance grouped per time period.",
          "readOnly": true
        }
      },
      "description": "AwaitingGuidanceInsight contains metrics for runs awaiting guidance."
    },
    "dashboardsCompletionInsight": {
      "type": "object",
      "properties": {
        "total_percent_completions": {
          "type": "number",
          "format": "double",
          "description": "Overall completion percentage across all runs.",
          "readOnly": true
        },
        "completions_per_period": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/dashboardsCumulativeCompletionInsight"
          },
          "description": "Completion insights grouped per time period.",
          "readOnly": true
        },
        "trend": {
          "$ref": "#/$defs/dashboardsTrend"
        },
        "stp": {
          "type": "number",
          "format": "double",
          "description": "Straight-through processing rate.",
          "readOnly": true
        }
      },
      "description": "CompletionInsight contains completion rate metrics."
    },
    "dashboardsCumulativeCompletionInsight": {
      "type": "object",
      "properties": {
        "window_label": {
          "type": "string",
          "description": "The display label of the time period (e.g., \"Week 1\", \"January 2025\").",
          "readOnly": true
        },
        "auto_completed_count": {
          "type": "string",
          "format": "int64",
          "description": "Number of runs that completed automatically without manual intervention.",
          "readOnly": true
        },
        "manually_resolved_count": {
          "type": "string",
          "format": "int64",
          "description": "Number of runs that required manual resolution.",
          "readOnly": true
        }
      },
      "description": "CumulativeCompletionInsight contains completion metrics for a specific time period."
    },
    "dashboardsCumulativeRunInsight": {
      "type": "object",
      "properties": {
        "window_label": {
          "type": "string",
          "description": "The display label of the time period (e.g., \"Week 1\", \"January 2025\").",
          "readOnly": true
        },
        "runs_count": {
          "type": "string",
          "format": "int64",
          "description": "Number of runs during this period.",
          "readOnly": true
        }
      },
      "description": "CumulativeRunInsight contains run count metrics for a specific time period."
    },
    "dashboardsCumulativeRunInsightList": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/dashboardsCumulativeRunInsight"
          },
          "description": "List of run insights per time period.",
          "readOnly": true
        }
      },
      "description": "CumulativeRunInsightList contains run insights grouped per time period within a workspace."
    },
    "dashboardsCumulativeValueInsight": {
      "type": "object",
      "properties": {
        "window_label": {
          "type": "string",
          "description": "The display label of the time period (e.g., \"Week 1\", \"January 2025\").",
          "readOnly": true
        },
        "time_saved_secs": {
          "type": "string",
          "format": "int64",
          "description": "Time saved during this period in seconds.",
          "readOnly": true
        },
        "money_saved_usd": {
          "type": "string",
          "description": "Money saved during this period in USD.",
          "readOnly": true
        }
      },
      "description": "CumulativeValueInsight contains value metrics for a specific time period."
    },
    "dashboardsCumulativeValueInsightList": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/dashboardsCumulativeValueInsight"
          },
          "description": "List of value insights per time period.",
          "readOnly": true
        }
      },
      "description": "CumulativeValueInsightList contains value insights grouped per time period within a workspace."
    },
    "dashboardsRunInsight": {
      "type": "object",
      "properties": {
        "total_runs_count": {
          "type": "string",
          "format": "int64",
          "description": "Total number of runs across all automations and workspaces.",
          "readOnly": true
        },
        "insights_per_automation_per_workspace": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/dashboardsAutomationRunInsightList"
          },
          "title": "Run insights grouped per automation per workspace.\nKey: workspace_id (format: organizations/{org}/workspaces/{workspace})",
          "readOnly": true
        },
        "insights_per_period_per_workspace": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/dashboardsCumulativeRunInsightList"
          },
          "title": "Run insights grouped per time period per workspace.\nKey: workspace_id (format: organizations/{org}/workspaces/{workspace})",
          "readOnly": true
        },
        "trend": {
          "$ref": "#/$defs/dashboardsTrend"
        }
      },
      "description": "RunInsight contains aggregated runCount metrics."
    },
    "dashboardsRunsAwaitingGuidanceByPeriod": {
      "type": "object",
      "properties": {
        "window_label": {
          "type": "string",
          "description": "The display label of the time period (e.g., \"January 2026\", \"December 2025\").",
          "readOnly": true
        },
        "runs_awaiting_guidance": {
          "type": "string",
          "format": "int64",
          "description": "Number of runs created in this period that are awaiting guidance.",
          "readOnly": true
        }
      },
      "description": "RunsAwaitingGuidanceByPeriod contains runs awaiting guidance for a specific time period."
    },
    "dashboardsTrend": {
      "type": "object",
      "properties": {
        "percent_change": {
          "type": "number",
          "format": "double",
          "description": "The percentage change compared to the previous time window.\nPositive values indicate increase, negative values indicate decrease.",
          "readOnly": true
        },
        "comparison_window": {
          "type": "string",
          "description": "The label of the time window being compared against (e.g., \"Last Week\", \"Previous Month\").",
          "readOnly": true
        }
      },
      "description": "Trend represents a percentage change compared to a previous time window."
    },
    "dashboardsValueInsight": {
      "type": "object",
      "properties": {
        "total_money_saved_usd": {
          "type": "string",
          "description": "Total money saved across all automations and workspaces in USD.",
          "readOnly": true
        },
        "total_time_saved_secs": {
          "type": "string",
          "format": "int64",
          "description": "Total time saved across all automations and workspaces in seconds.",
          "readOnly": true
        },
        "insights_per_automation_per_workspace": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/dashboardsAutomationValueInsightList"
          },
          "title": "Value insights grouped per automation per workspace.\nKey: workspace_id (format: organizations/{org}/workspaces/{workspace})",
          "readOnly": true
        },
        "insights_per_period_per_workspace": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/dashboardsCumulativeValueInsightList"
          },
          "title": "Value insights grouped per time period per workspace.\nKey: workspace_id (format: organizations/{org}/workspaces/{workspace})",
          "readOnly": true
        }
      },
      "description": "ValueInsight contains aggregated value metrics (cost and time savings)."
    }
  }
}