{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/parallel-ai/json-schema/parallel-ai-find-all-run-schema.json",
  "title": "FindAllRun",
  "description": "FindAll run object with status and metadata.",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/parallel-ai-findall-api-openapi.yml#/components/schemas/FindAllRun",
  "properties": {
    "findall_id": {
      "type": "string",
      "title": "FindAll ID",
      "description": "ID of the FindAll run."
    },
    "status": {
      "$ref": "#/$defs/FindAllRunStatus",
      "description": "Status object for the FindAll run."
    },
    "generator": {
      "type": "string",
      "enum": [
        "base",
        "core",
        "pro",
        "preview"
      ],
      "title": "Generator",
      "description": "Generator for the FindAll run."
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ]
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata",
      "description": "Metadata for the FindAll run."
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At",
      "description": "Timestamp of the creation of the run, in RFC 3339 format."
    },
    "modified_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Modified At",
      "description": "Timestamp of the latest modification to the FindAll run result, in RFC 3339 format."
    }
  },
  "type": "object",
  "required": [
    "findall_id",
    "status",
    "generator"
  ],
  "$defs": {
    "FindAllCandidateMetrics": {
      "properties": {
        "generated_candidates_count": {
          "type": "integer",
          "title": "Generated Candidates Count",
          "description": "Number of candidates that were selected.",
          "default": 0
        },
        "matched_candidates_count": {
          "type": "integer",
          "title": "Matched Candidates Count",
          "description": "Number of candidates that evaluated to matched.",
          "default": 0
        }
      },
      "type": "object",
      "title": "FindAllCandidateMetrics",
      "description": "Metrics object for FindAll run."
    },
    "FindAllRunStatus": {
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "queued",
            "action_required",
            "running",
            "completed",
            "failed",
            "cancelling",
            "cancelled"
          ],
          "title": "Status",
          "description": "Status of the FindAll run."
        },
        "is_active": {
          "type": "boolean",
          "title": "Is Active",
          "description": "Whether the FindAll run is active"
        },
        "metrics": {
          "$ref": "#/$defs/FindAllCandidateMetrics",
          "description": "Candidate metrics for the FindAll run."
        },
        "termination_reason": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "low_match_rate",
                "match_limit_met",
                "candidates_exhausted",
                "user_cancelled",
                "error_occurred",
                "timeout",
                "insufficient_funds"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Termination Reason",
          "description": "Reason for termination when FindAll run is in terminal status."
        }
      },
      "type": "object",
      "required": [
        "status",
        "is_active",
        "metrics"
      ],
      "title": "FindAllRunStatus",
      "description": "Status object for FindAll run."
    }
  }
}