devo-ps/pipelines

{{ all_variables.json() }}

Opened this issue · 3 comments

c3aw commented

Would be a graet way to retrieve all variables (prompt/vars combined) as JSON, say for example to pass the information to a REST endpoint.

JuhaS commented

We have been thinking to start using Jinja2 as the templating engine and they just merged a tojson filter two weeks ago. That would allow to do something like {{ all_vars | tojson }} inside an action. We'd still need to add the all_vars parameter but that should be simple.

@c3aw just to be clear what kind of use case do you have in mind? Can you post an example action if you have one?

c3aw commented

@JuhaS the use case is to submit JSON payloads to REST services. I've submitted a terrible PR that works for me (but does the job nicely). I think a more generic REST action would be great though!

@JuhaS I think we should extend the webhook plugin to allow webhook actions (with a payload).