Hi @Namanap29 ,
You need to write groovy script and any script which will call the Query Builder Rest API through the jenkins job.
I doubt one thing, how you will mitigate your need by writing jenkins query builder job. As the query builder API is always comes with dynamic requirements based on case to case.