{
  "openapi": "3.1.0",
  "info": {
    "title": "Rehearsal AI Failure Planner",
    "version": "1.0.0",
    "description": "Free deterministic planning only. No workflow upload, inspection, execution, model call, payment or credential required. Only documented query parameters are accepted, once each; maximum URL length 512 characters."
  },
  "servers": [
    {
      "url": "https://rehearsalqa.com"
    }
  ],
  "security": [],
  "paths": {
    "/api/v1/plan": {
      "get": {
        "operationId": "createFailureTestPlan",
        "summary": "Generate unexecuted workflow failure scenarios",
        "parameters": [
          {
            "name": "nodes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 15,
              "default": 5
            }
          },
          {
            "name": "destinations",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2,
              "default": 1
            }
          },
          {
            "name": "model_output",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "batch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A deterministic plan; every case is not_executed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "schema_version",
                    "service",
                    "mode",
                    "scope",
                    "scenario_count",
                    "scenarios",
                    "excluded_scenarios",
                    "limitations",
                    "customer_execution_available",
                    "payments_open",
                    "links"
                  ],
                  "properties": {
                    "schema_version": {
                      "type": "string",
                      "const": "1.0.0"
                    },
                    "service": {
                      "type": "string"
                    },
                    "mode": {
                      "type": "string",
                      "const": "planning_only"
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "nodes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 15,
                          "default": 5
                        },
                        "destinations": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2,
                          "default": 1
                        },
                        "model_output": {
                          "type": "boolean",
                          "default": true
                        },
                        "batch": {
                          "type": "boolean",
                          "default": true
                        }
                      }
                    },
                    "scenario_count": {
                      "type": "integer",
                      "minimum": 2,
                      "maximum": 8
                    },
                    "scenarios": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "title",
                          "fixture",
                          "fault",
                          "expected",
                          "observe",
                          "status"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "fixture": {
                            "type": "string"
                          },
                          "fault": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "observe": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "status": {
                            "type": "string",
                            "const": "not_executed"
                          }
                        }
                      }
                    },
                    "excluded_scenarios": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "limitations": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "customer_execution_available": {
                      "type": "boolean",
                      "const": false
                    },
                    "payments_open": {
                      "type": "boolean",
                      "const": false
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "documentation": {
                          "type": "string",
                          "format": "uri"
                        },
                        "openapi": {
                          "type": "string",
                          "format": "uri"
                        },
                        "enquiries": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid, unknown or repeated parameter."
          },
          "405": {
            "description": "Unsupported method."
          },
          "414": {
            "description": "Request URL exceeds 512 characters."
          }
        }
      }
    }
  }
}
