Skip to main content
Version: QB12

Query Build Notifications

Syntax

Build notifications can be queried using http GET method through below url:

http://localhost:8810/rest/notifications?last_notified_build_id=<last notified build id>

QuickBuild uses http BASIC authentication information to determine the user who queries the notification, and only returns notifications belonging to that user. The parameter last_notified_build_id is optional. If not specified, the most recent notification will be returned; otherwise, all notifications after specified build will be returned. The response is of mime type application/xml and the content is xml representation of list of builds to be notified. A sample response is like below:

<list>
<com.pmease.quickbuild.model.Build>
<id>16</id>
<configuration>2</configuration>
<version>1.0.15</version>
<requester>1</requester>

<scheduled>false</scheduled>
<status>SUCCESSFUL</status>
<statusDate>2010-06-09T21:46:11.627+08:00</statusDate>
<beginDate>2010-06-09T21:46:11.131+08:00</beginDate>
<duration>496</duration>
<stepRuntimes>

<entry>
<string>master</string>
<com.pmease.quickbuild.stepsupport.StepRuntime>
<status>SUCCESSFUL</status>
<nodeAddress>matrix:8810</nodeAddress>
<duration>424</duration>
</com.pmease.quickbuild.stepsupport.StepRuntime>

</entry>
<entry>
<string>master&gt;checkout</string>
<com.pmease.quickbuild.stepsupport.StepRuntime>
<status>SUCCESSFUL</status>
<nodeAddress>matrix:8810</nodeAddress>
<duration>380</duration>

</com.pmease.quickbuild.stepsupport.StepRuntime>
</entry>
</stepRuntimes>
<repositoryRuntimes>
<entry>
<string>svn</string>
<com.pmease.quickbuild.repositorysupport.RepositoryRuntime>
<revisionDOM>

<com.pmease.quickbuild.plugin.scm.svn.SvnRevision revision="0.0">
<value>101</value>
</com.pmease.quickbuild.plugin.scm.svn.SvnRevision>
</revisionDOM>
<checkout>true</checkout>
</com.pmease.quickbuild.repositorysupport.RepositoryRuntime>
</entry>
</repositoryRuntimes>

<variableValues/>
</com.pmease.quickbuild.model.Build>
<com.pmease.quickbuild.model.Build>
<id>17</id>
<configuration>2</configuration>
<version>1.0.16</version>
<requester>1</requester>

<scheduled>false</scheduled>
<status>SUCCESSFUL</status>
<statusDate>2010-06-09T21:46:13.448+08:00</statusDate>
<beginDate>2010-06-09T21:46:12.854+08:00</beginDate>
<duration>594</duration>
<stepRuntimes>

<entry>
<string>master</string>
<com.pmease.quickbuild.stepsupport.StepRuntime>
<status>SUCCESSFUL</status>
<nodeAddress>matrix:8810</nodeAddress>
<duration>535</duration>
</com.pmease.quickbuild.stepsupport.StepRuntime>

</entry>
<entry>
<string>master&gt;checkout</string>
<com.pmease.quickbuild.stepsupport.StepRuntime>
<status>SUCCESSFUL</status>
<nodeAddress>matrix:8810</nodeAddress>
<duration>492</duration>

</com.pmease.quickbuild.stepsupport.StepRuntime>
</entry>
</stepRuntimes>
<repositoryRuntimes>
<entry>
<string>svn</string>
<com.pmease.quickbuild.repositorysupport.RepositoryRuntime>
<revisionDOM>

<com.pmease.quickbuild.plugin.scm.svn.SvnRevision revision="0.0">
<value>101</value>
</com.pmease.quickbuild.plugin.scm.svn.SvnRevision>
</revisionDOM>
<checkout>true</checkout>
</com.pmease.quickbuild.repositorysupport.RepositoryRuntime>
</entry>
</repositoryRuntimes>

<variableValues/>
</com.pmease.quickbuild.model.Build>
</list>

Security

You will need to use http BASIC authentication to login as authorized QuickBuild user to use this API. QuickBuild only returns notifications belonging to that user.

Demo

Below curl command demonstrates how to get notifications for user admin after build with id 100:

curl -u admin:admin http://localhost:8810/rest/notifications?last_notified_build_id=100