-1

I have a jenkins pipeline job which doesn't support concurrent build (as per requirement). so whenever multiple jobs are submitted, all jobs get queued. i want to know does jenkins provide any api which can give me number of jobs in queue for that jenkins job.

deewreck
  • 113
  • 7

1 Answers1

1

Yes you can access the queue API at http://<JENKINS_URL>/queue/api/json

ycr
  • 12,828
  • 2
  • 25
  • 45
  • 1
    yup i found out this API. But this API shows all queued jobs throughout jenkins server. I was kind of looking for api which can provide queue size for specific pipeline on jenkins server . however i have handled the issue by parsing the output and finding all jenkins jobs name in the queue list. – deewreck Mar 15 '23 at 13:47