WEB activity & Copy activity realated to Rest API Giving error while making GET Request

Shreyash Choudhary 126 Reputation points
2022-12-15T07:43:17.657+00:00

Hi, i am facing a huge problem with rest api
I need to fetch data from an API customer has providesd URL(external API) and with 3 headers main one is x-api-key , while creating Linked service i provided the base URL of api and Authentication type is basic,server certificate validation is enabled & Auth headers with the 3 header which is given to me i put the same

Iam using This linked service in correponding REST dataset
This dataset i am using in copy activty at source side

whenever i am previewing i am getting error

Error Message is below
Error code:23353
Details: Rest call failed with client error,status code 400 Badrequest,please check your activity settings Request URL : https:// i removed due to privacy. Response : {"error":"invalid request : WQL error.","errors"[{error:Enter a Valid report field.This field is invalid : RECORDNUMBER."field":"RECORDNUMBER","Location":Invalid SELECT Clause }]}

i have checked the activity setting , its by default nothing changed, on source side also noting added just linked service and Get and rest are by default

also tried with Web activity receving same error details with error code 2108, it is showing "failuretype" :"UserError" in web activity setting i only provided 3 headers just ,thats all & its showing "failuretype" :"UserError" !!!!

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sreeju Nair 12,666 Reputation points
    2022-12-15T07:51:47.687+00:00

    I recommend you to use tools like Postman or Fiddler to connect with the REST API and verify whether everything works in the API call. See the troubleshooting tips from

    https://learn.microsoft.com/en-us/azure/data-factory/connector-troubleshoot-rest#unexpected-network-response-from-the-rest-connector

    Postman is a free tool that can help you to test your API calls. https://learning.postman.com/docs/designing-and-developing-your-api/testing-an-api/

    Hope this helps


  2. HimanshuSinha-msft 19,486 Reputation points Microsoft Employee Moderator
    2022-12-15T19:38:36.26+00:00

    Hello @Shreyash Choudhary ,
    Thanks for the question and using MS Q&A platform.
    As the error says , it looks to be some config issues on your side . But then are you sure this API is fetching records ? If yes how did you tested that ?
    As mentioned by @Sreeju Nair , we need to make sure that the API is really working , you can use postman/curl to check that .
    I can says theat from the below error

    {"error":"invalid request : WQL error.","errors"[{error:Enter a Valid report field.This field is invalid : RECORDNUMBER."field":"RECORDNUMBER","Location":Invalid SELECT Clause }]}

    It looks like it is hitting some API which is expecting some RECORDNUMBER and some SELECT statement . Are you passing those in the header ?

    We need more information here from you to help you .
    Thanks
    Himanshu


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.