Does anyone know how to execute tasks remotely wit...
# ask-the-community
s
Does anyone know how to execute tasks remotely with a POST request? Is there documentation on it somewhere?
@Ketan (kumare3) Can you possibly assist?
k
can you not use one of the generated clients - https://github.com/flyteorg/flyte/tree/master/flyteidl/clients/go or python (flytekit.remote) or others in this repo
you can use rest, but the api is harder to use that way
s
Thanks @Ketan (kumare3). We have a front-end either built in Angular or React and are looking at kicking of flyte tasks from there.
k
Aah that works
We have a typescript client
Cc @Frank Flitton is that right
f
Yes, that's correct. You can see how we build the requests and encode/decode protobufs in the Flyte Console in these files: https://github.com/flyteorg/flyteconsole/blob/master/packages/console/src/models/Task/api.ts https://github.com/flyteorg/flyteconsole/blob/master/packages/console/src/models/AdminEntity/AdminEntity.ts The proto definitions can be added to your project from here: https://www.npmjs.com/package/@flyteorg/flyteidl Some helpful util fns are here (timestamps, etc): https://github.com/flyteorg/flyteconsole/blob/master/packages/console/src/common/utils.ts
You can always monitor the network requests from chrome to find the specific API endpoint(s) you need then reference these protos to build the request.