Skip to content

Commit

Permalink
[SDK] Add list_pipeline_versions to kfp.Client (#3340)
Browse files Browse the repository at this point in the history
Allows the user to list available pipeline versions for a given pipeline id.
  • Loading branch information
pselden committed Jun 19, 2020
1 parent b3d8e04 commit a802dbb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sdk/python/kfp/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,3 +763,16 @@ def delete_pipeline(self, pipeline_id):
Exception if pipeline is not found.
"""
return self._pipelines_api.delete_pipeline(id=pipeline_id)

def list_pipeline_versions(self, pipeline_id, page_token='', page_size=10, sort_by=''):
"""Lists pipeline versions.
Args:
pipeline_id: id of the pipeline to list versions
page_token: token for starting of the page.
page_size: size of the page.
sort_by: one of 'field_name', 'field_name des'. For example, 'name des'.
Returns:
A response object including a list of versions and next page token.
"""

return self._pipelines_api.list_pipeline_versions(page_token=page_token, page_size=page_size, sort_by=sort_by, resource_key_type=kfp_server_api.models.api_resource_type.ApiResourceType.PIPELINE, resource_key_id=pipeline_id)

0 comments on commit a802dbb

Please sign in to comment.