'=' getting converted to '%3D' in external call dataflow

Jaganath Kumar 110 Reputation points
2024-02-22T09:35:25.9766667+00:00

Hi Team, I am attempting to make an external API call using dataflow. I dynamically pass the value from the input file to the REST endpoint URL. However, when passing the value, '=' is being converted to '%3D'. The configuration settings are as follows. Actual URL

Uri: https://testapi.com:443/RestApi/resources/11.11.11.01/customer?q=customerNumber=234567

From ADF data preview output:

Uri: https://testapi.com:443/RestApi/resources/11.11.11.01/customer?q=customerNumber%3D234567

Method: GET Headers: content-type: application/json | accept: application/json | Authorization: ****** Body: User's image

User's image

Appreciate your help Thanks,

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

Accepted answer
  1. Harishga 6,005 Reputation points Microsoft External Staff
    2024-02-22T13:07:18.0633333+00:00

    Hi @Jaganath Kumar
    Welcome to Microsoft Q&A platform and thanks for posting your question here.

    The reason why '=' is being converted to '%3D' in your external API call using data flow is because '=' is a reserved character in URLs and needs to be URL encoded. When a URL is encoded, special characters are replaced with a percent sign (%) followed by a two-digit hexadecimal code. In this case, '=' is being replaced with '%3D'.

    In your case, the value of the query parameter is "customer Number=234567". To correctly encode this value, the equals sign needs to be replaced with '%3D'. This is why you are seeing the encoded value of "customerNumber%3D234567" in the ADF data preview output.

    This behavior is expected and is done to ensure that the URL is correctly interpreted by the server.  

    Reference
    https://learn.microsoft.com/en-us/azure/architecture/best-practices/api-design#urls

    I hope this information helps you. Let me know if you have any further questions or concerns.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.