pipelines/backend/api/v2beta1/python_http_client/README.md

13 KiB

kfp-server-api

This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0-beta.2
  • Package version: 2.0.0-beta.2
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://www.google.com

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import kfp_server_api

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import kfp_server_api

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function

import time
import kfp_server_api
from kfp_server_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = kfp_server_api.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Bearer
configuration = kfp_server_api.Configuration(
    host = "http://localhost",
    api_key = {
        'authorization': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['authorization'] = 'Bearer'


# Enter a context with an instance of the API client
with kfp_server_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kfp_server_api.AuthServiceApi(api_client)
    namespace = 'namespace_example' # str |  (optional)
resources = 'UNASSIGNED_RESOURCES' # str |  (optional) (default to 'UNASSIGNED_RESOURCES')
verb = 'UNASSIGNED_VERB' # str |  (optional) (default to 'UNASSIGNED_VERB')

    try:
        api_response = api_instance.authorize(namespace=namespace, resources=resources, verb=verb)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AuthServiceApi->authorize: %s\n" % e)
    

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AuthServiceApi authorize GET /apis/v2beta1/auth
ExperimentServiceApi archive_experiment POST /apis/v2beta1/experiments/{experiment_id}:archive Archives an experiment and the experiment's runs and recurring runs.
ExperimentServiceApi create_experiment POST /apis/v2beta1/experiments Creates a new experiment.
ExperimentServiceApi delete_experiment DELETE /apis/v2beta1/experiments/{experiment_id} Deletes an experiment without deleting the experiment's runs and recurring runs. To avoid unexpected behaviors, delete an experiment's runs and recurring runs before deleting the experiment.
ExperimentServiceApi get_experiment GET /apis/v2beta1/experiments/{experiment_id} Finds a specific experiment by ID.
ExperimentServiceApi list_experiments GET /apis/v2beta1/experiments Finds all experiments. Supports pagination, and sorting on certain fields.
ExperimentServiceApi unarchive_experiment POST /apis/v2beta1/experiments/{experiment_id}:unarchive Restores an archived experiment. The experiment's archived runs and recurring runs will stay archived.
HealthzServiceApi get_healthz GET /apis/v2beta1/healthz Get healthz data.
PipelineServiceApi create_pipeline POST /apis/v2beta1/pipelines Creates a pipeline.
PipelineServiceApi create_pipeline_version POST /apis/v2beta1/pipelines/{pipeline_id}/versions Adds a pipeline version to the specified pipeline ID.
PipelineServiceApi delete_pipeline DELETE /apis/v2beta1/pipelines/{pipeline_id} Deletes an empty pipeline by ID. Returns error if the pipeline has pipeline versions.
PipelineServiceApi delete_pipeline_version DELETE /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id} Deletes a specific pipeline version by pipeline version ID and pipeline ID.
PipelineServiceApi get_pipeline GET /apis/v2beta1/pipelines/{pipeline_id} Finds a specific pipeline by ID.
PipelineServiceApi get_pipeline_by_name GET /apis/v2beta1/pipelines/names/{name} Finds a specific pipeline by name and namespace.
PipelineServiceApi get_pipeline_version GET /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id} Gets a pipeline version by pipeline version ID and pipeline ID.
PipelineServiceApi list_pipeline_versions GET /apis/v2beta1/pipelines/{pipeline_id}/versions Lists all pipeline versions of a given pipeline ID.
PipelineServiceApi list_pipelines GET /apis/v2beta1/pipelines Finds all pipelines within a namespace.
PipelineUploadServiceApi upload_pipeline POST /apis/v2beta1/pipelines/upload
PipelineUploadServiceApi upload_pipeline_version POST /apis/v2beta1/pipelines/upload_version
RecurringRunServiceApi create_recurring_run POST /apis/v2beta1/recurringruns Creates a new recurring run in an experiment, given the experiment ID.
RecurringRunServiceApi delete_recurring_run DELETE /apis/v2beta1/recurringruns/{recurring_run_id} Deletes a recurring run.
RecurringRunServiceApi disable_recurring_run POST /apis/v2beta1/recurringruns/{recurring_run_id}:disable Stops a recurring run and all its associated runs. The recurring run is not deleted.
RecurringRunServiceApi enable_recurring_run POST /apis/v2beta1/recurringruns/{recurring_run_id}:enable Restarts a recurring run that was previously stopped. All runs associated with the recurring run will continue.
RecurringRunServiceApi get_recurring_run GET /apis/v2beta1/recurringruns/{recurring_run_id} Finds a specific recurring run by ID.
RecurringRunServiceApi list_recurring_runs GET /apis/v2beta1/recurringruns Finds all recurring runs given experiment and namespace. If experiment ID is not specified, find all recurring runs across all experiments.
ReportServiceApi report_scheduled_workflow POST /apis/v2beta1/scheduledworkflows
ReportServiceApi report_workflow POST /apis/v2beta1/workflows
RunServiceApi archive_run POST /apis/v2beta1/runs/{run_id}:archive Archives a run in an experiment given by run ID and experiment ID.
RunServiceApi create_run POST /apis/v2beta1/runs Creates a new run in an experiment specified by experiment ID. If experiment ID is not specified, the run is created in the default experiment.
RunServiceApi delete_run DELETE /apis/v2beta1/runs/{run_id} Deletes a run in an experiment given by run ID and experiment ID.
RunServiceApi get_run GET /apis/v2beta1/runs/{run_id} Finds a specific run by ID.
RunServiceApi list_runs GET /apis/v2beta1/runs Finds all runs in an experiment given by experiment ID. If experiment id is not specified, finds all runs across all experiments.
RunServiceApi read_artifact GET /apis/v2beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read Finds artifact data in a run.
RunServiceApi retry_run POST /apis/v2beta1/runs/{run_id}:retry Re-initiates a failed or terminated run.
RunServiceApi terminate_run POST /apis/v2beta1/runs/{run_id}:terminate Terminates an active run.
RunServiceApi unarchive_run POST /apis/v2beta1/runs/{run_id}:unarchive Restores an archived run in an experiment given by run ID and experiment ID.
VisualizationServiceApi create_visualization_v1 POST /apis/v2beta1/visualizations/{namespace}

Documentation For Models

Documentation For Authorization

Bearer

  • Type: API key
  • API key parameter name: authorization
  • Location: HTTP header

Author

kubeflow-pipelines@google.com