Hello,
I need someone experienced to give me advice or recommend a detailed guide or video about it.
I want to understand how exactly get one works in adalo.
the online guide is not very helpful in this regard.
is it possible to have a list of items with few data (e.g. id, name) in the getall and then in the get one to get all the data i need?
At the moment in the get all i get all the data of all the elements but it’s a bit heavy.
hi @theadaloguy,
Tks for the reply, but I just want to know if and how the additional data that I would take in the get one of the method can be shown in a detail page,
I have done some trying and I am not able to do it.
Hi @theadaloguy,
I’m sorry I can’t make myself understood, probably due to the fact that English is not my language.
I will try to explain myself as clearly as possible:
I have an external collection (“People” )that returns an array of names that I show in the list:
my endpoint: www.exemple.com/api/v1/people
and the result:
[{“id”:“1”,“Name”:“Pino”},{“id”:“2”,“Name”:“Fabio”}]
then clicking on the list and passing to the new screen the “current People” I want to get all the further data of that item using the get one of adalo where I can put my own endpoint and show them www.exemple.com/api/v1/people?id={{id}}
and the result:
{“id”:“2”,“Name”:“Fabio”,“LastName”:“Rossi”,“age”:“100”,“eye”:“brown”}
I did some tests but I couldn’t do it, I guess it depends on my error, at the moment I take all the data of everyone but this creates performance problems in the long run.
I think maybe everything needs to be in the GET ALL, as Adalo tests the GET ALL endpoint and not the others. So Adalo is only aware of data that gets returned from the GET ALL, even if your GET ONE is returning extra data.
I could be wrong, but it seems that way from my experience.
Another idea: You could also make a completely different external collection and endpoint for the GET ONE.
Make your function stack a Query all records, but make sure it only returns one result, then have that as an external collection with a slightly different name. Let Adalo THINK it is a GET ALL endpoint, even if in reality it’s returning one result.
Using Xano here as well, and I agree with @theadaloguy. So far my experience with these APIs is that GET ALL is the most important one. Once you learn how to properly filter by fields and use addons to get the right fields within Adalo, I would recommend making your GET ALL call be able to narrow down a record by _id.