Share via

Azure Data Factory API config help

Shround1984 1 Reputation point
Nov 25, 2022, 1:18 AM

Hi I am trying to connect to a HR system to simply pull down some data and copy in ASDB

I have managed to get it to work in excel using the following code below in the advanced editor but dont even know where to start in terms of where i put this information in Azure Data Factory

let url="https://api.peoplehr.net/Query",

body="{""APIKey"": ""ENTER API KEY HERE"",""Action"": ""GetQueryResultByQueryName"",""QueryName"":""ENTER QUERY NAME HERE""}",

Source = Json.Document(Web.Contents(url,[

     Headers = [ #"Content-Type"="application/json"],  

        Content = Text.ToBinary(body)  

        ]  

    ))  

in Source

my understanding is this is a REST api and i have an API key. I am very new to ADF and to API's in general, i have spent days on google trying to get a solution that works

there is a guide here https://help.peoplehr.com/en/articles/2492019-people-queries-and-excel-power-bi

that describes how to do it in excel which i basicall want to replicate in Azure Data Factory and create a table in SQL DB

thanks in advance

I have used the ingest wizard in ADF with the "Copy" function and the source set to REST

The options on the source only allow me to pass Auth Headers and not additional headers and body (hope that makes sense)

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,037 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sonny Gillissen 3,356 Reputation points
    Nov 28, 2022, 1:18 PM

    You can add in a 'Web' activity in your Azure Data Factory pipeline, where you enter the URL.

    Next, click on the 'Web' activity in your editor canvas and select the 'Settings' tab to make changes.
    Set the method accordingly (I assumed it to be post) and fill in the body, and add the header.

    264759-image.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.