{
 "openapi": "3.1.0",
 "info": {
  "title": "Migration Batches (Platform)",
  "version": "20261030b",
  "description": "Every consignment of rows, with what became of each."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "migration-batches": {
    "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
     },
     "batch_no": {
      "type": "string",
      "description": "Batch no",
      "readOnly": true
     },
     "source_id": {
      "type": "string",
      "format": "uuid",
      "description": "Source id",
      "readOnly": true
     },
     "object_id": {
      "type": "string",
      "format": "uuid",
      "description": "Object id",
      "readOnly": true
     },
     "object_code": {
      "type": "string",
      "description": "Object code",
      "readOnly": true
     },
     "data_class": {
      "type": "string",
      "description": "Data class",
      "readOnly": true
     },
     "file_name": {
      "type": "string",
      "description": "File name",
      "readOnly": true
     },
     "row_count": {
      "type": "integer",
      "description": "Row count",
      "readOnly": true
     },
     "staged": {
      "type": "integer",
      "description": "Staged",
      "readOnly": true
     },
     "validated": {
      "type": "integer",
      "description": "Validated",
      "readOnly": true
     },
     "rejected": {
      "type": "integer",
      "description": "Rejected",
      "readOnly": true
     },
     "loaded": {
      "type": "integer",
      "description": "Loaded",
      "readOnly": true
     },
     "archived": {
      "type": "integer",
      "description": "Archived",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "summary": {
      "type": "string",
      "description": "Summary",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "kind": {
      "type": "string",
      "description": "Kind",
      "readOnly": true
     },
     "as_of": {
      "type": "string",
      "format": "date",
      "description": "As of",
      "readOnly": true
     },
     "source_drive_id": {
      "type": "string",
      "format": "uuid",
      "description": "Source drive id",
      "readOnly": true
     },
     "source_path": {
      "type": "string",
      "description": "Source path",
      "readOnly": true
     },
     "source_external_id": {
      "type": "string",
      "description": "Source external id",
      "readOnly": true
     },
     "chunk_no": {
      "type": "integer",
      "description": "Chunk no",
      "readOnly": true
     },
     "first_row": {
      "type": "integer",
      "description": "First row",
      "readOnly": true
     },
     "last_row": {
      "type": "integer",
      "description": "Last row",
      "readOnly": true
     },
     "ingest_run_id": {
      "type": "string",
      "format": "uuid",
      "description": "Ingest run id",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "source_code": {
      "type": "string",
      "description": "Source code",
      "readOnly": true
     },
     "object_name": {
      "type": "string",
      "description": "Object name",
      "readOnly": true
     },
     "target_module": {
      "type": "string",
      "description": "Target module",
      "readOnly": true
     },
     "target_resource": {
      "type": "string",
      "description": "Target resource",
      "readOnly": true
     },
     "created_by_name": {
      "type": "string",
      "description": "Created by name",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/platform/migration-batches": {
   "get": {
    "summary": "list migration-batches",
    "operationId": "list_migration_batches_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post migration batches",
    "operationId": "action_migration_batches_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/migration-batches/{id}": {
   "get": {
    "summary": "get migration-batches",
    "operationId": "get_migration_batches_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put migration batches",
    "operationId": "action_migration_batches_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete migration batches",
    "operationId": "action_migration_batches_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/migration-batches/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_migration_batches_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"
     }
    }
   }
  }
 }
}