Skip to content

Add ocl import commands (file, status, list) #2443

@paynejd

Description

@paynejd

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 import
  • ocl import status TASK_ID [--wait] — check import task status, optionally poll until complete
  • ocl 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/featureNew or improved functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions