-
Notifications
You must be signed in to change notification settings - Fork 2
Add ocl import commands (file, status, list) #2443
Copy link
Copy link
Closed
OpenConceptLab/ocl-cli
#2Labels
type/featureNew or improved functionalityNew or improved functionality
Description
Summary
Add an import command group to the OCL CLI with three subcommands for managing bulk imports via the /importers/bulk-import/ API endpoint.
Commands
ocl import file FILE [--queue QUEUE] [--no-update] [--parallel N] [--wait]— upload a file for bulk importocl import status TASK_ID [--wait]— check import task status, optionally poll until completeocl import list [--queue QUEUE]— list active/recent imports
Supported file types
All format conversion is handled server-side by the API:
.json/.jsonl— JSON Lines (one OCL resource per line).csv— OCL-formatted CSV.zip— OCL repository version export
Motivation
Provides CLI tooling for bulk imports, replacing manual curl/API calls. Prerequisite for the version-speedup workflow and useful for all OCL CLI users. Uses the current /importers/bulk-import/ endpoint (the existing bulk_import() client method uses the deprecated /manage/bulkimport/).
Implementation
- New API client methods:
import_file(),import_list(),import_status() - New command file:
commands/import_cmd.py - Output formatters for import responses
- Registration in
main.py
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type/featureNew or improved functionalityNew or improved functionality