Jenkins—get “Build Time Trend” values using “Remote Access API”

孤者浪人 提交于 2019-11-30 06:43:40

You can use something like this URL:

http://jenkins:8080/job/MY-APPLICATION/api/json?tree=builds[number,id,timestamp,result,duration]

There's a little more documentation in the root api element:

http://jenkins:8080/job/MY-APPLICATION/api

I admit to not completely understanding the tree parameter. I couldn't find a simple example of retrieving the entire builds subtree.

I admit to not completely understanding the tree parameter. I couldn't find a simple example of retrieving the entire builds subtree.

You can access the entire subtree of an element by using [*] such as http://jenkins:8080/job/MY-APPLICATION/api/json?tree=builds[*]

Cheers,

For retrieving ALL builds, use

http://jenkins:8080/job/MY-APPLICATION/api/json?tree=allBuilds[number,id,timestamp,result,duration]

Note that B is capitalized in allBuilds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!