I’ve connected an external API to my Adalo app successfully, but I’m having trouble understanding how the query parameters communicate with the API. There isn’t much documentation on the subject so I thought I’d throw it out here.
These are the settings, and getting all records works great. However, I can’t figure out how to sort by individual patients. In a browser I can retrieve it like this: https://qa.myholisticoffice.com/api/api2/PatientPortal/52
that brings back the records for patient ID 52. What query parameter do I need to achieve the same in Adalo?
I’m not sure you can add this API as an external collection. When I do a request to https://qa.myholisticoffice.com/api/api2/PatientPortal/, I don’t see any field with a unique ID for the record. This might prevent Adalo from working with it correctly.
Thanks so much for offering help! We’ve changed the API so that it returns a unique id for each record, though it still won’t work with the query parameter filter. Is there something simple I’m missing?
Just to clarify: “Query parameter” filter is an interface to create the parameters in the HTTP URL query.
E.g. if you have an API with base URL like: https://api.example.com/v1/,
then adding query parameter like yours will result in something like https://api.example.com/v1?id=115
If your API doesn’t have query parameters, it makes no sense using this filter.
Important note: if your API returns records with unique IDs, then if you create a List, you can access a record in this list in a similar way you do with built-in collections. You just need to set up the Get One request URL correctly. Usually it is set up as https://api.example.com/v1/id, where id is the unique ID of the record.
First let me say thank you so much for responding and helping me along the way, I’m steadily understanding more and more. I now understand query parameters and how the API needs to be set up. With Postman I have this query for patientID working beautifully:
however, in Adalo when I attempt the same query parameter to filter a list, it only ever will return the Get All with no filter, and seemingly no parameter properly communicated. Here are some screen shots to show you what I’m doing: