machine-learning-exchange/mlx

Add API endpoints for asset versioning

ckadner opened this issue · 1 comments

In order to enable versioning of the assets in the MLX catalog, we need to add additional API endpoints. This follows closely the approach taken, and API endpoints available for pipeline versions in KFP.

Existing API Endpoints (i.e. for components)

https://ml-exchange.org/apis/v1alpha1/ui/#/ComponentService

/components
  GET
  POST
/components/{id}
  GET
  DELETE
/components/{id}/download
  GET
/components/{id}/generate_code
  GET
/components/{id}/run
  POST
/components/{id}/templates
  GET
/components/upload
  POST
/components/upload_from_url
  POST
/components/{id}/upload:  ## update existing, currently overrides previous version, will be removed
  POST
/components/featured
  POST
/components/publish_approved
  POST

New API Endpoints (i.e. component_versions)

/component_versions
  GET
  POST
/component_versions/{version_id}
  GET
  DELETE
/component_versions/{version_id}/templates
  GET
/components/{component_id}/default_version/{version_id}
  POST
/components/upload_version
  POST

The properties of the new "version" Swagger object (i.e. apiComponentVersion)

- id
- name
- description
- created_at
- tag              # semantic tag, like Docker image tags 
- code_source_url  # GitHub URL including the commit hash corresponding to version in MLX
- ...              # remaining asset-specific properties

Additional properties added to existing Swagger objects (i.e. apiComponent)

- default_version
- code_source_url  # GitHub URL including the commit hash corresponding to version in MLX