You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何向Eclipse Bugzilla API发送GET请求获取Bug数据?

Eclipse Bugzilla API 请求问题解决办法
  • Eclipse的Bugzilla并未启用REST API,它使用的是XML-RPC API,这就是你访问https://bugs.eclipse.org/rest/bug?id=251041返回404的核心原因。
  • 获取特定Bug的请求方式:
    需调用Bug.get方法,请求地址为https://bugs.eclipse.org/bugs/xmlrpc.cgi,通过POST发送XML格式的参数。比如获取ID为251041的Bug,curl命令示例如下:
    curl -X POST https://bugs.eclipse.org/bugs/xmlrpc.cgi \
      -H "Content-Type: text/xml" \
      -d '<?xml version="1.0"?>
    <methodCall>
      <methodName>Bug.get</methodName>
      <params>
        <param>
          <struct>
            <member>
              <name>ids</name>
              <value><array><data><value><int>251041</int></value></data></array></value>
            </member>
          </struct>
        </param>
      </params>
    </methodCall>'
    
  • 获取Bug列表的请求方式:
    使用Bug.search方法,可通过参数指定筛选条件,比如status(状态)、limit(数量限制)、product(目标项目)等。例如要获取10条NEW状态的缺陷,只需在XML参数中添加对应字段:
    <?xml version="1.0"?>
    <methodCall>
      <methodName>Bug.search</methodName>
      <params>
        <param>
          <struct>
            <member>
              <name>status</name>
              <value><array><data><value>NEW</value></data></array></value>
            </member>
            <member>
              <name>limit</name>
              <value><int>10</int></value>
            </member>
            <member>
              <name>product</name>
              <value><array><data><value>Eclipse</value></data></array></value>
            </member>
          </struct>
        </param>
      </params>
    </methodCall>
    
  • API文档查看路径:在Eclipse Bugzilla页面登录后,进入「Help」→「Bugzilla API Documentation」,即可查看完整的XML-RPC方法说明及参数细节。

内容的提问来源于stack exchange,提问作者ayowhatthedogdoin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.01 23:18:30