Use the result of an API response (JSON array matrix)

hey Guys,

I am trying to use an API response that is a JSON array/matrix as an INPUT for another call

this is the response ( I want to take all the values of bottom, right, top, left, with, height of ALL the faces identified)

I want to pass the response of the first call to another call as parameter

but I don’t know HOW TO FORMAT the parameter CORD in the WF action to take the whole matrix response, any ideas?
in other words to make it clear, I want to use the api response matrix {1,2,3},{4,5,6},{7,8,9} as an input for the next action (one single field)

in python it would look like this…piece of cake as Python handles tuples/matrixes pretty easily

muchas gracias

1 Like

@adamhholmes @Jici @NigelG @Keith cc’ing some seniors that are always helpful

I think that you should set the facedetect endpoint to be of type “text” instead of json. Use regex to only keep array and provide this result to cord parameter.

1 Like

the problem is that the API call “cord” parameter only accepts json.

I used a plugin to create a json from the response call but it’s not working…

steps:

  1. GET CALL - get json response to use in 2nd call
  2. POST CALL - use json response as “cord” parameter

if you have some time maybe I can pay for you time? I have been stuck with this problem for 2 days and I need to make progress. thanks!

in case you’re having the same issue, @jici was kind enough to help me, heaven belongs to the helpers

Solution:

  1. change datatype of first API call to TEXT instead of JSON
  2. use regex to keep the parameter info only
  3. the 2nd call is using body and json with dynamic values.
1 Like