sensitive-blueβ’17mo ago
Issue with returned response from API
Hello, I'm trying to integrate Stack AI API within VF.
Everything is working fine (or seems to), I'm getting "status:" 200, returned. However, when I run flow test, I'm getting "0" as an answer and I don't understand why.
I have mapped the correct variable and everything.

12 Replies
sensitive-blueOPβ’17mo ago

wise-whiteβ’17mo ago
Can you share a screenshot of the full API call step?
We're also using stack
sensitive-blueOPβ’17mo ago
There you go @MikeG


wise-whiteβ’17mo ago
In the
capture response
step, make it response.out-0
πsensitive-blueOPβ’17mo ago
So I tried replacing "out-0" with "response.out-0", but it is still returning "0"


wise-whiteβ’17mo ago
sorry, make it
outputs.out-0
My bad ^^sensitive-blueOPβ’17mo ago
Now it worked thanks! What's the logic behind? Why does it work with
outputs.out-0
rather than response.out-0
or simply out-0
?wise-whiteβ’17mo ago
because stack AI wraps it's response in a outputs object
So the response is
And thus to get to out-0, you need to go through outputs.
outputs.out-0
sensitive-blueOPβ’17mo ago
Actually question was more "Where did you see that Stack wraps its response as
outputs.out-0
, but I suppose it's all in the docs
Anyways, thanks for your time @MikeG !wise-whiteβ’17mo ago
Ye in the docs, but also if you make an API step, you can test it out within VF itself, which will show the response π
sensitive-blueOPβ’17mo ago
Hmmm, I do not have the developer reflexes. I should quickly acquire those aha!
Thanks a lot again π
wise-whiteβ’17mo ago
No worries! Aways happy to help if you run in to something!