We have a hosted instance of Kubeflow that I am trying to access programmatically. Although Kubeflow v1 has Swagger docs for an HTTP API, v2 does not. There's almost no mention of authentication, let alone actual descriptions or examples of how to authenticate against this API.
I can log in using a browser, and by inspecting the developer console, I can reverse-engineer some of the requests. E.g. I can make a curl
request to http://example.com/apis/v1beta1/pipelines
, and if I pass along the authservice_session
cookie, I can get an HTTP 200 response. But I am taunted with the response that these endpoints require Javascript:
<noscript>Please enable JavaScript to view this website.</noscript>
I'm not clear as to why JavaScript should be required or why the existence of the API seems so obfuscated. If you inspect the dev tools, it looks like the browser is hitting the endpoints described in the Swagger docs. The v2 docs for "Run a Pipeline", for instance, lists only 3 ways to run a pipeline:
- from the KFP Dashboard (i.e. it would have to be initiated by a human or an over-engineered headless browser)
- from the KFP SDK client (i.e. you'd have to install a compatible version of Python and shell out to it), or
- from the KFP SDK CLI (i.e. you'd have to install this Python SDK and shell out to it).
None of these 3 options seems like a sensible standard for an application's interface when behind the scenes it seems like it's powered by an HTTP API (or possibly GRPC? Some responses reference GRPC).
Is there a way to read and run Kubeflow Pipelines programmatically via standard language-agnostic HTTP requests like any normal REST API?