{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloudtrail/json-schema/amazon-cloudtrail-list-insights-metric-data-response-schema.json",
  "title": "ListInsightsMetricDataResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-cloudtrail-operations-api-openapi.yml#/components/schemas/ListInsightsMetricDataResponse",
  "type": "object",
  "properties": {
    "TrailARN": {
      "type": "string",
      "description": "Specifies the ARN of the trail. This is only returned when Insights is enabled on a trail logging data events."
    },
    "EventSource": {
      "type": "string",
      "description": "The Amazon Web Services service to which the request was made, such as iam.amazonaws.com or s3.amazonaws.com."
    },
    "EventName": {
      "type": "string",
      "description": "The name of the event, typically the Amazon Web Services API on which unusual levels of activity were recorded."
    },
    "InsightType": {
      "type": "string",
      "enum": [
        "ApiCallRateInsight",
        "ApiErrorRateInsight"
      ],
      "description": "The type of CloudTrail Insights event, which is either ApiCallRateInsight or ApiErrorRateInsight. The ApiCallRateInsight Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume. The ApiErrorRateInsight Insights type analyzes management API calls that result in error codes."
    },
    "ErrorCode": {
      "type": "string",
      "description": "Only returned if InsightType parameter was set to ApiErrorRateInsight. If returning metrics for the ApiErrorRateInsight Insights type, this is the error to retrieve data for. For example, AccessDenied."
    },
    "Timestamps": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "date-time"
      },
      "description": "List of timestamps at intervals corresponding to the specified time period."
    },
    "Values": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "List of values representing the API call rate or error rate at each timestamp. The number of values is equal to the number of timestamps."
    },
    "NextToken": {
      "type": "string",
      "description": "Only returned if the full results could not be returned in a single query. You can set the NextToken parameter in the next request to this value to continue retrieval."
    }
  }
}