Background
The converter currently calls ApiClient.create_or_update_arc(rdi, arc) in processor.py to upload each ARC to the FAIRagro Middleware API.
This method is outdated. The API now uses a harvest-based workflow.
Required Change
Replace the single create_or_update_arc call with the two-step harvest API:
ApiClient.create_harvest(rdi) — create a harvest session for the RDI
ApiClient.submit_arc_in_harvest(harvest_id, arc) — submit each ARC within that harvest
The exact interface of these methods needs to be verified against the current middleware.api_client library.
Files to change
middleware/sql_to_arc/src/middleware/sql_to_arc/processor.py — replace the upload call
.specifica/features/api-upload/spec.md — update requirements to reflect the new API contract
Acceptance Criteria
Background
The converter currently calls
ApiClient.create_or_update_arc(rdi, arc)inprocessor.pyto upload each ARC to the FAIRagro Middleware API.This method is outdated. The API now uses a harvest-based workflow.
Required Change
Replace the single
create_or_update_arccall with the two-step harvest API:ApiClient.create_harvest(rdi)— create a harvest session for the RDIApiClient.submit_arc_in_harvest(harvest_id, arc)— submit each ARC within that harvestThe exact interface of these methods needs to be verified against the current
middleware.api_clientlibrary.Files to change
middleware/sql_to_arc/src/middleware/sql_to_arc/processor.py— replace the upload call.specifica/features/api-upload/spec.md— update requirements to reflect the new API contractAcceptance Criteria
create_or_update_arcis no longer called anywhere insql_to_arc.specifica/features/api-upload/spec.mddescribes the new contract