Finally found a solution for this requirement.
This is working now, I had to “Enable project-based security” on the job and provide the necessary access to build and read for given user. ( i.e. foo )
Please find below curl syntax used
curl -X POST http://foo:[email protected]:8080/job/my_testjob/buildWithParameters"
Regards