Trouble retrieving data from public API in custom connector

Summary

The user is trying to build a custom connector to retrieve data from a public API in JSON format but is facing issues in receiving the data. They specifically need help in adjusting the connector to retrieve data from the second list in the JSON response.


Question

hello everyone,

I am currently trying to build a custom connector to get data from a public api, which returns data in json format.
https://api.worldbank.org/v2/country/bra/indicator/NY.GDP.MKTP.KD?format=json

This api will return data in the following format.
"status": 200,
"body": [
{
"page": 1,
"pages": 2,
"per_page": 50,
"total": 63,
"sourceid": "2",
"lastupdated": "2023-12-18"
},
[
{
"indicator": {
"id": "NY.GDP.MKTP.KD",
"value": "GDP (constant 2015 US$)"
},
"country": {
"id": "BR",
"value": "Brazil"
},
"countryiso3code": "BRA",
"date": "2022",
"value": 1901461002548.22,
"unit": "",
"obs_status": "",
"decimal": 0
},
// Add more indicator objects if needed
]
}
}

However I’m facing some problems trying to receive the data. I have attached a image with the error that we are facing.
I’ve already tryied to use record selector to get the correct data, but it did not work.

Does any of the experts in here knows how can I adjust my connector to retrieve the data correctly?
Im need to get the data inside the second list of this json, since the first list is not needed for the results.



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want to access the original thread.

Join the conversation on Slack

["custom-connector", "public-api", "json-format", "data-retrieval", "record-selector"]

This may be a new situation we haven’t seen before, in which the response body is a list in which the different values are not the same shape.

I’m not sure if this will work, but try setting the record selector to 1, to see if that properly points at the second value in the response body list

Thanks for your answer Lake.
I have tried to use 1 on record selector, however I’m still facing the same problem with the response.
We also tried to use some combinations of * , but it’s not working too.