cuddly-jelly-27016
05/14/2025, 12:12 AM@dataclass
class Outputs():
...
t1 = SyncRestAPI(
url="https://mydomain/xyz?params={{.inputs.x}}¶ms={{.inputs.y}}",
inputs=kwargs(x=int,y=int),
outputs=Outputs,
timeout=30s,
retries=3,
caching....,
)
@workflow
def foo():
t1(x=...)
the backend plugin can be a simple HTTP Rest call invoker, that passes a json input and receives a json input. this plugin can implement the following API
https://github.com/flyteorg/flyteplugins/blob/master/go/tasks/pluginmachinery/webapi/plugin.go#L148-L154
It is important to handle timeouts, retries, http error codes etc.
Outputs can be either a complex JSON or maybe a single item or map etc
### Goal: What should the final outcome look like, ideally?
Explained above
### Describe alternatives you've considered
using python to invoke and write an API called. This is very expensive owing to the fact of starting a pod.
### Propose: Link/Inline OR Additional context
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/14/2025, 2:32 PMcuddly-jelly-27016
05/14/2025, 2:32 PM