How to get Value from API Call

Hi All,

I tried to request API from an endpoint and get result below

 {
    "body": {
        "metadata": {
            "id": "64f700d3eb31ebea4e298046",
            "status": "Success",
            "created_at": "2023-09-05 10:20:03 UTC",
            "processed_at": "2023-09-05 10:20:03 UTC",
            "total_time_taken": 0.98
        },
        
        "result": [
            {
                "value": "bike shop near me",
                "score": 800,
                ...
    
            },
            {
                "value": "bike shop twisp",
                "score": 601,
                ...
                
            },
            {
                "value": "bike hub",
                "score": 600,
                ...
                
            },
            {
                "value": "bike shop",
                "score": 561,
                ...
                
            },
            
        ],

        "verbatim_score": 1300
    },

}

Actually i want to get result.values and display on my repeating text .
How i can do that ?

My planning workflow :

  1. API Call
  2. set state to get result.values (but i confuse here )
    Result of Step 1 (my api call)'s results:firstitems:value

but above workflow was error . How to fix that ?

What is the ‘Type’ of the custom state? (the type needs to be the same as the saved API response value).

For now state type is name of API call that i registered on API Connector plugin . Is it problem ?

It’s not a problem if that’s your intention. (if it’s not, then it is).

But in that case the value you set for the state must be the API response itself, and not some part of it.

Hi Adam,

already solved. i use repeating group without set custom state.

Thanks

1 Like