本文介绍了如何使用远程访问 API 获取 jenkins 的系统配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Jenkins 提供了不错的 Remote Access API,可以用于获取大量信息,例如作业和视图.

我想知道是否或如何从远程访问 API 获取系统(全局)配置.

这些信息在网页 http://your.jenkins.url/manage

解决方案

您可以通过

获取您的主节点/节点的配置

http://your.jenkins.url/computer/(master)/config.xml

这对你来说足够了吗?

注意:自 2014 年年中起,发布已被禁用.>

要了解有关 API 的更多信息,请尝试在某些网址的末尾添加/api.

要查找哪些对象公开了 API,请在 https://github.com 中搜索 _api.jelly/jenkinsci/jenkins/find/master(按t"然后输入_api.jelly")

Jenkins provide nice Remote Access API, which can be used to fetch lots of information like jobs and views.

I wonder whether or how to fetch the system (global) configurations from remote access API.

Those information are in web page http://your.jenkins.url/manage

解决方案

You can GET the config of your master / nodes through

http://your.jenkins.url/computer/(master)/config.xml

Is that good enough for you ?

Note: since mid-2014, POSTing has been disabled.

To find more about APIs, try adding /api to the end of some URLs.

To find which objects expose APIs, search for _api.jelly in https://github.com/jenkinsci/jenkins/find/master (press 't' then type '_api.jelly')

这篇关于如何使用远程访问 API 获取 jenkins 的系统配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 02:53