Objective: I would like to create an external collection using this API: Free API - Inspirational quotes JSON with code examples - #9 by SergeyWebPro - JavaScript - The freeCodeCamp Forum
By using this URL: https://type.fit/api/quotes
Problem: I’m getting an error (screenshot below) when trying to test the connection. From looking at other posts, I suspect this is valid JSON but not a RESTful response. Does Adalo have a way to access / process these types of responses, where there is no named object / array to include as the results key?
What I’ve tried:
- Adding different Content-Types to the header
- Trying different entries in the results key to access the levels of JSON including full stop / period and square brackets
Screenshot
Data Extract Example
[
{
“text”: “Genius is one percent inspiration and ninety-nine percent perspiration.”,
“author”: “Thomas Edison”
},
{
“text”: “You can observe a lot just by watching.”,
“author”: “Yogi Berra”
},
{
“text”: “A house divided against itself cannot stand.”,
“author”: “Abraham Lincoln”
},
{
“text”: “Difficulties increase the nearer we get to the goal.”,
“author”: “Johann Wolfgang von Goethe”
},
{
“text”: “Fate is in your hands and no one elses”,
“author”: “Byron Pulsifer”
},
{
“text”: “Be the chief but never the lord.”,
“author”: “Lao Tzu”
},
{
“text”: “Nothing happens unless first we dream.”,
“author”: “Carl Sandburg”
},
{
“text”: “Well begun is half done.”,
“author”: “Aristotle”
}
]
Solutions
This other API works in terms of being able to setup an External Collection: http://universities.hipolabs.com/search?country=United+States
And it appears to follow the same structure as before, using an anonymous array containing multiple objects with no named results key but it uses a json content type. The original API at the top used a plain text content type. Unless you can control the third party API, you might need to manipulate this outside of Adalo (using Integromat or similar)
BUT I then noticed that setting up a list to point to this collection (Without any filters, etc) just sets all items in the list to be the same value, which is the last entry returned by the API
Resolution to Repeating Values
More info here: API Result Display on Repeat - #12 by joeyology
Name is unique but it wasn’t at the top by default so you need to drag it to the top manually. This could be an ID or similar in your case