Azure Data Factory API config help

Shround1984 1 Reputation point
2022-11-25T01:18:59.05+00:00

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.
10,131 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sonny Gillissen 3,351 Reputation points
    2022-11-28T13:18:47.207+00:00

    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