Is it possible to retrieve historical build or user build information through API

13 views
Skip to first unread message

Michael W

unread,
Feb 6, 2018, 5:01:52 PM2/6/18
to Jenkins Users
Hi,

I'm trying to create a report on which builds each team member has kicked off over time.  The report would have a job column, user column, and number column for number of deploys per user of that job. Does anyone know if the API supports this?  I google'd some info that was 3 years old that said historical build info was not available in the API.  When I look at the API options on the build console page it seems to only retrieve in-progress information.  I also looked under People for the specific users and build history but couldn't find any valid API calls there either that would return data.

Thanks

Victor Martinez

unread,
Feb 6, 2018, 6:54:47 PM2/6/18
to Jenkins Users
Hi,

IIUC, open your <JENKINS_URL>/api/xml?depth=2 to see the whole dashboard view in XML format, although it might be a bit tricky if you use nested folders though.

Regarding a particular job and it's historical build:

- <JENKINS_URL>/job/<job_name>/api/xml?depth=1 , it should provide the whole build history of a specific job name called <job_name> and the xml tag 'cause' should provide how it was built and also the user in case it was triggered manually.

Regarding the user information:
- <JENKINS_URL>/asynchPeople/api/xml?depth=1

There are some more details below:

Reply all
Reply to author
Forward
0 new messages