Skip to content

feat: migrate to ENA JSON API (Webin REST V2)#126

Open
harryautomazione wants to merge 1 commit intousegalaxy-eu:masterfrom
harryautomazione:feature/json-api-migration
Open

feat: migrate to ENA JSON API (Webin REST V2)#126
harryautomazione wants to merge 1 commit intousegalaxy-eu:masterfrom
harryautomazione:feature/json-api-migration

Conversation

@harryautomazione
Copy link
Copy Markdown

@harryautomazione harryautomazione commented Mar 12, 2026

Description

This PR migrates the ena-upload-cli tool from using XML APIs to the more modern and simplified ENA Webin REST V2 JSON API. This transition simplifies the submission architecture and removes the dependency on legacy XML templates and local XSD validation for new submissions.

Tasks

  • Implementation of EnaClient for native Webin REST V2 JSON submissions.
  • Refactoring of run_construct_json for dynamic payload generation.
  • Integration of JSON-based ENA Checklist retrieval.
  • Automated handling of Sample attributes and core field mapping (camelCase).
  • Normalization of metadata fields (e.g., file checksum naming variants).
  • Update of submission flow in ena_upload.py to prioritize JSON API.
  • Verification of generated payloads against ENA V2 standards.

Changes:

  • Migration to JSON: Removed XML templating (Genshi/Jinja) for new submissions, replacing it with a dynamic JSON payload generator.
  • New API Client: Implemented direct interaction with Webin REST V2 endpoints via ena_client.py.
  • Refined Resilience: Enhanced metadata parsing to handle inconsistencies in ISA-JSON input files.

Fixes #122

- Replaced XML templating with dynamic JSON payload generation
- Implemented EnaClient for direct REST V2 submissions
- Added support for JSON checklist retrieval
- Simplified architecture by removing local XSD validation for new submissions
- Secured workspace by ignoring automation tools in .gitignore

Fixes usegalaxy-eu#122
@bedroesb
Copy link
Copy Markdown
Collaborator

hello @harryautomazione, I noticed you contributions have Italian comments and you are not taking into account/removing the current templating mechanisms that the XSD ways of working has.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the JSON API instead of the xml API

2 participants