{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-systems-manager/json-schema/amazon-systems-manager-experiment-run-schema.json",
  "title": "ExperimentRun",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-systems-manager-experimentruns-api-openapi.yml#/components/schemas/ExperimentRun",
  "type": "object",
  "properties": {
    "ApplicationId": {
      "type": "string",
      "description": "The application ID."
    },
    "ExperimentDefinitionId": {
      "type": "string",
      "description": "The experiment definition ID."
    },
    "Run": {
      "type": "integer",
      "description": "The experiment run number."
    },
    "Description": {
      "type": "string",
      "description": "A description of the experiment run."
    },
    "Status": {
      "type": "string",
      "enum": [
        "RUNNING",
        "DONE"
      ],
      "description": "The current status of the experiment run. Valid values: RUNNING, DONE."
    },
    "ExposurePercentage": {
      "type": "number",
      "description": "The percentage of the target audience exposed to treatments."
    },
    "TreatmentOverrides": {
      "$ref": "#/$defs/TreatmentOverrides"
    },
    "Result": {
      "$ref": "#/$defs/ExperimentRunResult"
    },
    "StartedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the experiment run started, in ISO 8601 format."
    },
    "UpdatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the experiment run was last updated, in ISO 8601 format."
    },
    "EndedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the experiment run ended, in ISO 8601 format."
    },
    "ExperimentDefinitionSnapshot": {
      "$ref": "#/$defs/ExperimentDefinitionSnapshot"
    }
  },
  "$defs": {
    "AttributeValue": {
      "type": "object",
      "properties": {
        "StringValue": {
          "type": "string",
          "description": "A string value for the attribute."
        },
        "NumberValue": {
          "type": "number",
          "description": "A numeric value for the attribute."
        },
        "BooleanValue": {
          "type": "boolean",
          "description": "A Boolean value for the attribute."
        },
        "StringArray": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of string values for the attribute."
        },
        "NumberArray": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "An array of numeric values for the attribute."
        }
      },
      "description": "Exactly one member is set."
    },
    "ExperimentDefinitionSnapshot": {
      "type": "object",
      "properties": {
        "ApplicationId": {
          "type": "string",
          "description": "The application ID at the time the run was started."
        },
        "Id": {
          "type": "string",
          "description": "The experiment definition ID."
        },
        "Name": {
          "type": "string",
          "description": "The name of the experiment definition at the time the run was started."
        },
        "Hypothesis": {
          "type": "string",
          "description": "The hypothesis at the time the run was started."
        },
        "ConfigurationProfileId": {
          "type": "string",
          "description": "The configuration profile ID at the time the run was started."
        },
        "EnvironmentId": {
          "type": "string",
          "description": "The environment ID at the time the run was started."
        },
        "FlagKey": {
          "type": "string",
          "description": "The feature flag key at the time the run was started."
        },
        "AudienceRule": {
          "type": "string",
          "description": "The audience rule at the time the run was started."
        },
        "AudienceDescription": {
          "type": "string",
          "description": "The audience description at the time the run was started."
        },
        "LaunchCriteria": {
          "type": "string",
          "description": "The launch criteria at the time the run was started."
        },
        "Treatments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Treatment"
          },
          "description": "The treatments at the time the run was started."
        },
        "Control": {
          "$ref": "#/$defs/Treatment"
        }
      }
    },
    "ExperimentRunResult": {
      "type": "object",
      "properties": {
        "ExecutiveSummary": {
          "type": "string",
          "description": "A summary of the experiment outcome and key findings."
        },
        "ReasonsToLaunch": {
          "type": "string",
          "description": "Evidence in favor of launching the winning treatment."
        },
        "ReasonsNotToLaunch": {
          "type": "string",
          "description": "Evidence against launching the treatment."
        }
      }
    },
    "FlagValue": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Specifies whether the feature flag is enabled for this treatment."
        },
        "AttributeValues": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/AttributeValue"
          },
          "description": "The attribute values associated with this flag value."
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "Treatment": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The unique key that identifies this treatment."
        },
        "Weight": {
          "type": "number",
          "description": "The traffic allocation weight for this treatment."
        },
        "Description": {
          "type": "string",
          "description": "A description of the treatment."
        },
        "FlagValue": {
          "$ref": "#/$defs/FlagValue"
        }
      },
      "required": [
        "Weight",
        "FlagValue"
      ]
    },
    "TreatmentOverrides": {
      "type": "object",
      "properties": {
        "Inline": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A map of entity IDs to treatment keys. Each entry assigns the specified entity to the specified treatment, bypassing random assignment."
        }
      },
      "description": "Exactly one member is set."
    }
  }
}