A client I am working for make use of some external APIs to drive some parts of their website using their current web platform. Since we are looking at options for the new site, with Umbraco amongst them, I wanted to check how you’d go about REST API consumption.
We will need to make API calls to an external API to pull in pagination data and then render this to the page via the regular Razor templates that form Umbraco’s front-end templates.
What is the best way of consuming an external API
A client I am working for make use of some external APIs to drive some parts of their website using their current web platform. Since we are looking at options for the new site, with Umbraco amongst them, I wanted to check how you’d go about REST API consumption.
We will need to make API calls to an external API to pull in pagination data and then render this to the page via the regular Razor templates that form Umbraco’s front-end templates.
How would I go about this?
Here's an (old) example of how we pulled data into an umbraco partial view from an XML api: https://gist.github.com/amirkhan81/87764dad8ff95258ed945de6b8437d13
You can render that partial in your template like any other.
is working on a reply...