是否有可能向下钻取"使用jql REST查询进入对象

时间:2016-09-12 14:47:37

标签: jira

让我们说我需要获取上周更新的所有Jira问题列表,但我真的只关心每个问题的摘要和项目ID字段。当我做的时候

/rest/api/2/search?jql=updated%3E=-1w&fields=key&fields=summary,project

我带回整个项目的json,包括链接到不同分辨率的头像

{
    "expand":"schema,names",
    "startAt":0,
    "maxResults":1000,
    "total":1726,
    "issues":[
        {
        "expand":"operations,versionedRepresentations,editmeta,changelog,transitions,renderedFields",
        "id":"24976",
        "self":".../rest/api/2/issue/24976",
        "key":"ABC-241",
        "fields":{
            "summary":"As a client, blah blah blah",
            "project":{
              "self":.../rest/api/2/project/10732",
              "id":"10732",
              "key":"ABC",
              "name":"Ay Bee See",
              "avatarUrls":{
                "48x48":".../secure/projectavatar?pid=10732&avatarId=11046",
                "24x24":".../secure/projectavatar?size=small&pid=10732&avatarId=11046",
                "16x16":".../secure/projectavatar?size=xsmall&pid=10732&avatarId=11046",
                "32x32":".../secure/projectavatar?size=medium&pid=10732&avatarId=11046"
              }
            }
          }
        },
        ...

这使得响应比我需要的大得多。有没有办法形成查询不返回所有项目信息,只是返回其ID?

1 个答案:

答案 0 :(得分:1)

不幸的是,您在展开的project变量中看到的字段是最低JIRA返回值。