Copied to clipboard

Flag this post as spam?

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


  • Hazar Askari 12 posts 73 karma points
    May 01, 2015 @ 00:37
    Hazar Askari
    0

    Using UmbracoApiController to get external json

    Hello guys, im pretty new to MVC and Umbraco in general, and ive stumbled upon what seems to be an impossible task for me :P 

    i want to:

    1: Go to this url https://www.bankid.no/api/counter/transactions?_=1430428099722
    2: Get that int from the given service via Ajax and show it on my page. 

    I know i need to create a Controller that inherits from UmbracoApiController, but thats pretty much all i know, the rest is a mystery for me, can anyone really smart help me out with this impossible task?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 01, 2015 @ 09:23
    Jan Skovgaard
    0

    Hi Hazar

    I'm not sure that you need to create your own Umbraco API controller for this - The Umbraco API controllers are used when you need to expose data from you "CONTENT" section to be consumed by JavaScript for instance on your own page.

    It seems to me that what you need to figure out is how you can consume the external API from bankid.no?

    So are you using XSLT or Razor for rendering your pages? Or are you thinking about using JavaScript?

    Looking forward to hearing from you.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft