{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/seqbench-com/json-schema/seqbench-com-batch-result-schema.json",
  "title": "BatchResult",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/seqbench-com-openapi.json#/components/schemas/BatchResult",
  "type": "object",
  "properties": {
    "tool": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    },
    "capped": {
      "type": "boolean",
      "description": "True if input exceeded the record limit."
    },
    "limit": {
      "type": "integer",
      "description": "Maximum records per call (500)."
    },
    "columns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BatchRow"
      }
    },
    "errors": {
      "type": "integer"
    },
    "provenance": {
      "$ref": "#/$defs/Provenance"
    }
  },
  "required": [
    "tool",
    "count",
    "capped",
    "limit",
    "columns",
    "rows",
    "errors",
    "provenance"
  ],
  "$defs": {
    "BatchRow": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "cells": {
          "type": "object",
          "additionalProperties": {
            "type": [
              "string",
              "number"
            ]
          }
        },
        "error": {
          "type": "string"
        },
        "errorCode": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        }
      },
      "required": [
        "name",
        "cells"
      ]
    },
    "Provenance": {
      "type": "object",
      "properties": {
        "apiVersion": {
          "type": "string"
        },
        "tool": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ],
          "description": "Tool slug, or an array of slugs (one per step) for a workflow."
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp of when the result was generated."
        }
      },
      "required": [
        "apiVersion",
        "tool",
        "generatedAt"
      ]
    }
  }
}