Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nick Lewis 30 posts 138 karma points
    Aug 28, 2020 @ 08:35
    Nick Lewis
    0

    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?

  • Amir Khan 1287 posts 2744 karma points
    Aug 30, 2020 @ 19:00
    Amir Khan
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft