{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-get-abtest-response-schema.json",
  "title": "GetABTestResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-ab-tests-api-openapi.yml#/components/schemas/GetABTestResponse",
  "type": "object",
  "properties": {
    "abTestId": {
      "type": "string",
      "description": "The unique identifier of the A/B test."
    },
    "abTestArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the A/B test."
    },
    "name": {
      "type": "string",
      "description": "The name of the A/B test."
    },
    "description": {
      "type": "string",
      "description": "The description of the A/B test."
    },
    "status": {
      "type": "string",
      "enum": [
        "CREATING",
        "ACTIVE",
        "CREATE_FAILED",
        "UPDATING",
        "UPDATE_FAILED",
        "DELETING",
        "DELETE_FAILED",
        "FAILED"
      ],
      "description": "The current status of the A/B test."
    },
    "executionStatus": {
      "type": "string",
      "enum": [
        "PAUSED",
        "RUNNING",
        "STOPPED",
        "NOT_STARTED"
      ],
      "description": "The execution status indicating whether the A/B test is currently running."
    },
    "gatewayArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the gateway used for traffic splitting."
    },
    "variants": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Variant"
      },
      "description": "The list of variants in the A/B test."
    },
    "gatewayFilter": {
      "$ref": "#/$defs/GatewayFilter"
    },
    "evaluationConfig": {
      "$ref": "#/$defs/ABTestEvaluationConfig"
    },
    "roleArn": {
      "type": "string",
      "description": "The IAM role ARN used by the A/B test."
    },
    "currentRunId": {
      "type": "string",
      "description": "The identifier of the current run of the A/B test."
    },
    "errorDetails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The error details if the A/B test encountered failures."
    },
    "startedAt": {
      "type": "string",
      "description": "The timestamp when the A/B test was started."
    },
    "stoppedAt": {
      "type": "string",
      "description": "The timestamp when the A/B test was stopped."
    },
    "maxDurationExpiresAt": {
      "type": "string",
      "description": "The timestamp when the A/B test will automatically expire."
    },
    "createdAt": {
      "type": "string",
      "description": "The timestamp when the A/B test was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "The timestamp when the A/B test was last updated."
    },
    "results": {
      "$ref": "#/$defs/ABTestResults"
    }
  },
  "required": [
    "abTestId",
    "abTestArn",
    "name",
    "status",
    "executionStatus",
    "gatewayArn",
    "variants",
    "evaluationConfig",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "ABTestEvaluationConfig": {
      "type": "object",
      "properties": {
        "onlineEvaluationConfigArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of a single online evaluation configuration to use for both variants."
        },
        "perVariantOnlineEvaluationConfig": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PerVariantOnlineEvaluationConfig"
          },
          "description": "Per-variant online evaluation configurations, allowing different evaluation settings for each variant."
        }
      },
      "description": "Exactly one member is set."
    },
    "ABTestResults": {
      "type": "object",
      "properties": {
        "analysisTimestamp": {
          "type": "string",
          "description": "The timestamp when the analysis was performed."
        },
        "evaluatorMetrics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EvaluatorMetric"
          },
          "description": "The per-evaluator metrics comparing control and treatment variants."
        }
      },
      "required": [
        "evaluatorMetrics"
      ]
    },
    "ConfidenceInterval": {
      "type": "object",
      "properties": {
        "lower": {
          "type": "number",
          "description": "The lower bound of the confidence interval."
        },
        "upper": {
          "type": "number",
          "description": "The upper bound of the confidence interval."
        }
      }
    },
    "ConfigurationBundleRef": {
      "type": "object",
      "properties": {
        "bundleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the configuration bundle."
        },
        "bundleVersion": {
          "type": "string",
          "description": "The version of the configuration bundle."
        }
      },
      "required": [
        "bundleArn",
        "bundleVersion"
      ]
    },
    "ControlStats": {
      "type": "object",
      "properties": {
        "variantName": {
          "type": "string",
          "description": "The name of the control variant."
        },
        "sampleSize": {
          "type": "integer",
          "description": "The number of sessions evaluated for the control variant."
        },
        "mean": {
          "type": "number",
          "description": "The mean evaluation score for the control variant."
        }
      },
      "required": [
        "variantName",
        "sampleSize",
        "mean"
      ]
    },
    "EvaluatorMetric": {
      "type": "object",
      "properties": {
        "evaluatorArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the evaluator."
        },
        "controlStats": {
          "$ref": "#/$defs/ControlStats"
        },
        "variantResults": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VariantResult"
          },
          "description": "The results for each treatment variant compared against the control."
        }
      },
      "required": [
        "evaluatorArn",
        "controlStats",
        "variantResults"
      ]
    },
    "GatewayFilter": {
      "type": "object",
      "properties": {
        "targetPaths": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of target path patterns to include in the A/B test."
        }
      }
    },
    "PerVariantOnlineEvaluationConfig": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the variant this evaluation configuration applies to."
        },
        "onlineEvaluationConfigArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the online evaluation configuration for this variant."
        }
      },
      "required": [
        "name",
        "onlineEvaluationConfigArn"
      ]
    },
    "TargetRef": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the gateway target."
        }
      },
      "required": [
        "name"
      ]
    },
    "Variant": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the variant. Must be C for control or T1 for treatment."
        },
        "weight": {
          "type": "integer",
          "description": "The percentage of traffic to route to this variant. Weights across all variants must sum to 100."
        },
        "variantConfiguration": {
          "$ref": "#/$defs/VariantConfiguration"
        }
      },
      "required": [
        "name",
        "weight",
        "variantConfiguration"
      ]
    },
    "VariantConfiguration": {
      "type": "object",
      "properties": {
        "configurationBundle": {
          "$ref": "#/$defs/ConfigurationBundleRef"
        },
        "target": {
          "$ref": "#/$defs/TargetRef"
        }
      }
    },
    "VariantResult": {
      "type": "object",
      "properties": {
        "variantName": {
          "type": "string",
          "description": "The name of the treatment variant."
        },
        "sampleSize": {
          "type": "integer",
          "description": "The number of sessions evaluated for this variant."
        },
        "mean": {
          "type": "number",
          "description": "The mean evaluation score for this variant."
        },
        "absoluteChange": {
          "type": "number",
          "description": "The absolute change in mean score compared to the control variant."
        },
        "percentChange": {
          "type": "number",
          "description": "The percentage change in mean score compared to the control variant."
        },
        "pValue": {
          "type": "number",
          "description": "The p-value indicating the statistical significance of the observed difference."
        },
        "confidenceInterval": {
          "$ref": "#/$defs/ConfidenceInterval"
        },
        "isSignificant": {
          "type": "boolean",
          "description": "Whether the observed difference is statistically significant."
        }
      },
      "required": [
        "variantName",
        "sampleSize",
        "mean",
        "isSignificant"
      ]
    }
  }
}