在 JIRA REST 中获取 属性 版本 - 如何使用搜索 jql?
get property of version in JIRA REST - how to use search jql?
我正在尝试获取 Jira 的 versions
的 2 个属性,即检查它是否是 released
并获取他的 name
。我如何使用 REST
获取此信息?
到目前为止,我已经通过以下方法获得了版本 JSON
:https://myproject/rest/api/2/project/projectkey/versions/
但是当我尝试添加 search?jql=released=false
时,我得到 status 404
...
提前致谢!
我想您需要通过迭代 /rest/api/2/project/projectkey/versions/ 的结果来找到所有已发布的版本,然后您可以搜索映射到这些版本的问题:
fixVersion in ("1.1", "1.2")
好吧,Volodymyr 正确地回答了你原来的问题。
第二个问题的答案是您不能那样过滤版本。 JIRA REST API 使用以下 URL 方案
http://host:port/context/rest/api-name/api-version/resource-name
这将转换为您当前的 URL 为
https://myproject/rest/api/2/resource-name
资源名称部分是关键。您可以使用多种资源。其中之一是 project
,另一个是 search
。在同一文档页面上,您可以找到每个资源的详细信息,您可以在其中看到 project resource is basically used to query the projects. There are some other URL's for querying a specific project and some important attibutes (like all of the versions, or just a specific 版本)。
JIRA 文档的 search resource is used to query JIRA issues. The syntax which you added to your post is resembles of an issue query. These two cannot be mixed. You can read more about the JQL syntax on the Advanced searching 页面
据我所知,JIRA REST API 没有提供您可以查询的方式 "the unreleased versions for a given project"。您必须查询所有版本并以编程方式过滤出结果。
我正在尝试获取 Jira 的 versions
的 2 个属性,即检查它是否是 released
并获取他的 name
。我如何使用 REST
获取此信息?
到目前为止,我已经通过以下方法获得了版本 JSON
:https://myproject/rest/api/2/project/projectkey/versions/
但是当我尝试添加 search?jql=released=false
时,我得到 status 404
...
提前致谢!
我想您需要通过迭代 /rest/api/2/project/projectkey/versions/ 的结果来找到所有已发布的版本,然后您可以搜索映射到这些版本的问题:
fixVersion in ("1.1", "1.2")
好吧,Volodymyr 正确地回答了你原来的问题。
第二个问题的答案是您不能那样过滤版本。 JIRA REST API 使用以下 URL 方案
http://host:port/context/rest/api-name/api-version/resource-name
这将转换为您当前的 URL 为
https://myproject/rest/api/2/resource-name
资源名称部分是关键。您可以使用多种资源。其中之一是 project
,另一个是 search
。在同一文档页面上,您可以找到每个资源的详细信息,您可以在其中看到 project resource is basically used to query the projects. There are some other URL's for querying a specific project and some important attibutes (like all of the versions, or just a specific 版本)。
JIRA 文档的 search resource is used to query JIRA issues. The syntax which you added to your post is resembles of an issue query. These two cannot be mixed. You can read more about the JQL syntax on the Advanced searching 页面
据我所知,JIRA REST API 没有提供您可以查询的方式 "the unreleased versions for a given project"。您必须查询所有版本并以编程方式过滤出结果。