locked
Sample REST API for HTTP connector RRS feed

  • Question

  • So I have a Logic app and I need to wait for a pipeline in a data factory to finish.  Of the skills that I have, I was looking into a Automation Runbook powershell script, but really its not ideal for this scenario.  When you factor in the queue time and whatnot, it becomes a 1-3 minute process just to check a status of the pipeline.

    So I started researching Rest APIs.  I have been doing some sample API calls that are not Azure just to start learning.  Messing around with Fiddler and curl in Powershell.  It is going good for elementary calls.

    However, the problem I have is trying to understand how to do the authentication and the kind of "call and response"  in the HTTP connector.

    While I was looking for examples/samples, the only thing I could find was stuff like "do this kind of thing", then make a call with some key or whatever, but I could never find an actual working example of something just elementary with a simple authentication with maybe just getting account name or anything.

    Is there a sample that has an end to end working example where essentially you would just plug in stuff like your resource group / account name / tennent id, etc?  or is it not that simple.

    Any help is appreciated.

    Thanks,
    Matt

    Monday, January 8, 2018 3:17 PM

Answers

  • Hi,

    I assume you are talking about OAuth  bearer token Key generation and passing as header in the next  subsequent HTTP call .I usually use two different  HTTP actions  one to generate oauth bearer token and another to post the actual req body along with bearer token in header .

    You can see the simple example at http://deanhume.com/home/blogpost/a-simple-guide-to-using-oauth-with-c-/49

    Let me know if you face any issues while doing your process,happy to help out .


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Tuesday, January 9, 2018 1:13 AM