Rest API request guidance. #9752
-
Hi Guys, Just starting my low-code journey with Budibase. Looking to build an internal app for a security company. I will have a database with all store locations in UK with postcodes. I want to be able to get auto long/lat of these post codes, then using the Police API https://data.police.uk/docs/method/crime-street/ send API requests to get the latest crime for that area. I have successfully connected to the API via the docs, I would just appreciate any help or guidance to get me started on pulling together the above in Budibase. Thank you in advance |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
hey @BigMacUK007 - welcome to Budibase 😊 I've had a play around with your idea on my end and I think I have a good way for you to pull everything together. For the calculation of lat/long from a postcode I created a new REST datasource that queries postcodes.io with a postcode as a binding. I have this set to run on an automation when a new Location row is added. After the query runs with the newly added Postcode, the lat/long returned from the query are added to the location row. As the homepage of my app I have a dashboard with all of my locations and a form sidebar to create more. I've included a map component here to visualise the locations available. When I click a row or a marker it takes me to the location details page. This takes the location For the location details page I have a repeater block with location data filtered down to the location by Hopefully this gives you some ideas of how to proceed with your app! I've attached my app export here if you would like to play around with it or see how I have done specific parts of it. If you have any questions let me know and I will try and help! |
Beta Was this translation helpful? Give feedback.
-
I have managed to aggregate using the transformer. However, in the app it is just using the default lat and long values regardless of what location I set, not the bindings. Any advice, do I need to add more in the transformer? Ben |
Beta Was this translation helpful? Give feedback.
hey @BigMacUK007 - welcome to Budibase 😊
I've had a play around with your idea on my end and I think I have a good way for you to pull everything together.
For the calculation of lat/long from a postcode I created a new REST datasource that queries postcodes.io with a postcode as a binding. I have this set to run on an automation when a new Location row is added. After the query runs with the newly added Postcode, the lat/long returned from the query are added to the location row.
As the homepage of my app I have a dashboard with all of my locations and a form sidebar to create more. I've included a map component here to visualise the locations available. When I click a row or a marker …