how to pass lookup activity output as a parameter to webactivity inside foreach in case of JIRA rest API ( In JIRA REST api everything needs to be pass inside JQL )

Amar Agnihotri 916 Reputation points

Hi All,
I am calling JIRA rest api to get the issues for three projects . I am calling this way in postman


You can see here that i passed the project names using OR inside jql. This is the structure of JIRA api to pass everything inside jql.

Now i want it to be dynamic inside adf. Rather then passing project name hard coded in jql i want to use lookup file for project name and then want to iterate through each project name inside Foreach. Like this


Now I am stuck at one step . How to pass project name to jql as a parameter . In the my web activity inside Foreach right now i am using URL as
but i am not able to understand where to define parameters and store the output of lookup activity inside that. Moreover, how to pass that parameter to jql because jql is something like this


Any suggestions will be appreciated.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,751 questions
0 comments No comments
{count} votes

Accepted answer
  1. MartinJaffer-MSFT 26,036 Reputation points

    Hello again @Amar Agnihotri

    If you want each call to only do one project, then pass the output of the Lookup to the items of the ForEach. Then in the web activity you do a concatenation.

    @concat('jql=project%3d' , item() , 'and%20order%20by ... )  

    If you are getting an unknown number of projects from your lookup, and want to put them all in a single query together.
    You do not want to query each separately. The difficulty is how to put them together dynamically.

    If we have all the project names in an array like ["proj1","proj2","proj3"] , then I would reccomend using

    @join( myProjectList , "%20or%20")  
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful