Skip to content

Migrate API upload from create_or_update_arc to create_harvest/submit_arc_in_harvest #34

@Zalfsten

Description

@Zalfsten

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:

  1. ApiClient.create_harvest(rdi) — create a harvest session for the RDI
  2. 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

  • create_or_update_arc is no longer called anywhere in sql_to_arc
  • The harvest workflow is covered by integration tests
  • .specifica/features/api-upload/spec.md describes the new contract

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions