Reference Response Values in other requests (chaining)
complete
Gregory Schier
complete
🥳 https://yaak.app/blog/2024.8.0
Gregory Schier
This is now available in the 2024.8.0-beta.3! https://yaak.app/blog/2024.8.0-beta.1
B
Bharat Mandava
Gregory Schier Quick video example to demo this?
Gregory Schier
Bharat Mandava https://x.com/yaakapp/status/1826723493674975661
Gregory Schier
Merged in a post:
Ability to set environment variables based on response values
A
Ark Rozycki
I see value in being able to execute a
/login
endpoint that returns a bearer token in the response. If I could set the environment bearer token variable I could then easily re-use that variable in my other endpoints that require it. Instead of having to copy paste the token to all my endpoints when executing. Perhaps an ability to use JSONPath, XPath or even regex depending on payload to set values after a response.
H
Hamilton Chevez
Glad I found this open issue and learned that is in progress. After the OpenAPI Import feature release, adding the ability to reference response values in other requests would allow me to complete my full detachment from Postman and stay happy with Yaak.
Thank you for all you're doing putting this tool together.
Gregory Schier
Hamilton Chevez amazing! Just finishing up some work on the plug-in system before this can happen, but it's next up!
H
Hamilton Chevez
Gregory Schier Thanks for getting this out!
Not sure if its something to improve on down the line.
My flow is generally just login in with one endpoint and then copy/pasting that token into the auth bearer header.
With the helper video you shared I had not realized that it was only for GraphQL that had the bottom variables section and I was lost for a while figuring out how bring that up for a JSON request. Turns out I just had to type the function response() out. I also stumbled upon this too on the Token field, since all text displays as the hidden dot text I thought there was no way of referencing it until I I finished typing out the function name.
So maybe a few other videos for other work flows would be nice.
Otherwise, thanks for all you do!
Gregory Schier
Hamilton Chevez thanks for the great feedback! It's indeed a very early release so there's still some work to do in order to improve usability and discoverability. And definitely docs!
R
Robert Alexander
I made a video trying to explain better https://vimeo.com/955788569 but I would say my problem is not understanding how to save the access token from the first route to the environment so that the second protected route requesting the bearer token will work. Thanks a lot
Gregory Schier
Merged in a post:
One route returns access_token, see it in the reply but not sure how to save it and use it as a bearer token for a second route. Placed it in Bearer-Token but does not seem to be used. A small video showing would be priceless.
R
Robert Alexander
MacOS 2024.5.2
Gregory Schier
If I understand correctly, you want "Request Chaining" which is on the roadmap. I'm going to merge this request with that ticket
Gregory Schier
in progress
Gregory Schier
planned