{
 "openapi": "3.1.0",
 "info": {
  "title": "Job Runs (Platform)",
  "version": "20261030b",
  "description": "Every run that has happened, what it selected, and what it did to each record. A run cannot be deleted — that is the point of keeping it."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "batch-runs": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "run_no": {
      "type": "string",
      "description": "Run no",
      "readOnly": true
     },
     "job_code": {
      "type": "string",
      "description": "Job code",
      "readOnly": true
     },
     "module": {
      "type": "string",
      "description": "Module",
      "readOnly": true
     },
     "dry_run": {
      "type": "boolean",
      "description": "Dry run",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "selected": {
      "type": "integer",
      "description": "Selected",
      "readOnly": true
     },
     "succeeded": {
      "type": "integer",
      "description": "Succeeded",
      "readOnly": true
     },
     "skipped": {
      "type": "integer",
      "description": "Skipped",
      "readOnly": true
     },
     "failed": {
      "type": "integer",
      "description": "Failed",
      "readOnly": true
     },
     "summary": {
      "type": "string",
      "description": "Summary",
      "readOnly": true
     },
     "error_detail": {
      "type": "string",
      "description": "Error detail",
      "readOnly": true
     },
     "duration_ms": {
      "type": "integer",
      "description": "Duration ms",
      "readOnly": true
     },
     "started_at": {
      "type": "string",
      "format": "date-time",
      "description": "Started at",
      "readOnly": true
     },
     "finished_at": {
      "type": "string",
      "format": "date-time",
      "description": "Finished at",
      "readOnly": true
     },
     "parameters": {
      "type": "object",
      "description": "Parameters",
      "readOnly": true
     },
     "job_name": {
      "type": "string",
      "description": "Job name",
      "readOnly": true
     },
     "category": {
      "type": "string",
      "description": "Category",
      "readOnly": true
     },
     "run_by_name": {
      "type": "string",
      "description": "Run by name",
      "readOnly": true
     },
     "set_run_no": {
      "type": "string",
      "description": "Set run no",
      "readOnly": true
     },
     "set_code": {
      "type": "string",
      "description": "Set code",
      "readOnly": true
     },
     "standing": {
      "type": "string",
      "description": "Standing",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/platform/batch-runs": {
   "get": {
    "summary": "list batch-runs",
    "operationId": "list_batch_runs_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post job runs",
    "operationId": "action_batch_runs_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/batch-runs/{id}": {
   "get": {
    "summary": "get batch-runs",
    "operationId": "get_batch_runs_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put job runs",
    "operationId": "action_batch_runs_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete job runs",
    "operationId": "action_batch_runs_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/batch-runs/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_batch_runs_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}