Interact with Issues

Version 2 by Steve Luo
on Jun 13, 2011 06:07.


compared with
Version 3 by Steve Luo
on Jun 13, 2011 06:49.


Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 4 changes. View first change.

 {panel:title=TOC|titleBGColor=#F7D6C1|bgColor=#FFFFFF}
 {toc:style=disc|indent=20px}
 {panel}
  
 Since QuickBuild 4.0, you can retrieve issues via RESTful APIs. The base URI for changes RESTful APIs is:
 {code}
 /rest/\{tracker}
  /rest/{tracker}
 {code}
  
 Here, tracker is the type of your issue tracker, in QuickBuild, includes:
 * Jira - /rest/jira
 * Trac - /rest/trac
 * Bugzilla - /rest/bugzilla
  
 below, we will use $baseURI to represent the URI: /rest/\{tracker}.
  
 h3. List all supported APIs
 ||URI||Response Type||Params||
 |$baseURI/help|_text/html_| |
  
  
 h3. Get the data version of changes
 ||URI||Response Type||Params||
 |$baseURI/version|_text/plain_| |
  
h3. Retrieve the builds
  h3. Retrieve the latest builds
 ||URI||Response Type||Params||
|$baseURI/builds/\{configuration}|_text/xml|* *configuration* - PATH_PARAM
  |$baseURI/builds/\{configuration}|_text/xml_|* *configuration* - PATH_PARAM
 Specify the configuration. By default, specify configuration id here, if you want to specify a configuration path, you need add prefix PATH:, for example, _PATH:root/My/DEV_
 * *key* - QUERY_PARAM
 The issue key. If specified, the builds related to this issue will return.
 * *count* - QUERY_PARAM
 Specify at most how many records you want. If not specified, all records found will return.|
  
 *Query all builds*
 Below example shows how to retrieve the latest 50 builds related to a configuration:
 {code}
 http://quickbuild:8810/rest/jira/5/builds?count=50
  
 or
  
 http://quickbuild:8810/rest/jira/PATH:root/My Test/builds?count=50
 {code}
 the response looks like:
 {code}
 <list>
  <build>
  <id>321</id>
  <version>1.0.15</version>
  <status>SUCCESSFUL</status>
  <beginDate class="sql-timestamp">2011-06-10T17:11:35.662000000+08:00</beginDate>
  <duration>3409</duration>
  <scheduled>false</scheduled>
  <requester>Administrator</requester>
  <deleted>false</deleted>
  </build>
  
  ... ...
 </list>
  
 The build element here is just a simple fragment of the build object, if you want more detailed information about build, you need retrieve the builds via /rest/builds API, see [Interact with Builds].
  
 *Query builds related to an issue*
 {code}
 http://quickbuild:8810/rest/jira/5/builds?key=QB-123
 {code}
 here, query param *key* is the issue key which you want to find.
  
 h3. Retrieve the changes of an issue
 ||URI||Response Type||Params||
 |$baseURI/changes/\{configuration}/\{key}|_text/xml_|* *configuration* - PATH_PARAM
 Specify the configuration. By default, specify configuration id here, if you want to specify a configuration path, you need add prefix PATH:, for example, PATH:root/My/DEV
 * *key* - PATH_PARAM
 The issue key you want to search.
 * *count* - QUERY_PARAM
 Specify at most how many records you want. If not specified, all records found will return.|
  
 {code}
 http://quickbuild:8810/rest/jira/changes/5/TST-123
  
 or
  
 http://quickbuild:8810/rest/jira/changes/PATH:root/My Dev/TST-123
 {code}