View Source

h1. Syntax
Build notifications can be queried using http GET method through below url:
{code}http://localhost:8810/rest/notifications?last_notified_build_id=<last notified build id>{code}
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:
{code}
<list>
<com.pmease.quickbuild.model.Build>
<id>3</id>
<requestDate>2010-01-30T20:15:03.446+08:00</requestDate>
<configuration>3</configuration>
<version>1.0.1</version>
<status>SUCCESSFUL</status>
<statusDate>2010-01-30T20:15:03.547+08:00</statusDate>
<beginDate>2010-01-30T20:15:03.454+08:00</beginDate>
<user>1</user>
<scheduled>false</scheduled>
<duration>93</duration>
<stepRuntimes>
<entry>
<string>master</string>
<com.pmease.quickbuild.stepsupport.StepRuntime>
<status>SUCCESSFUL</status>
<nodeAddress>matrix:8810</nodeAddress>
</com.pmease.quickbuild.stepsupport.StepRuntime>
</entry>
</stepRuntimes>
<repositoryRuntimes/>
<variables/>
</com.pmease.quickbuild.model.Build>
<com.pmease.quickbuild.model.Build>
<id>4</id>
<requestDate>2010-01-30T20:15:07.319+08:00</requestDate>
<configuration>2</configuration>
<version>1.0.1</version>
<status>SUCCESSFUL</status>
<statusDate>2010-01-30T20:15:07.364+08:00</statusDate>
<beginDate>2010-01-30T20:15:07.325+08:00</beginDate>
<user>1</user>
<scheduled>false</scheduled>
<duration>40</duration>
<stepRuntimes>
<entry>
<string>master</string>
<com.pmease.quickbuild.stepsupport.StepRuntime>
<status>SUCCESSFUL</status>
<nodeAddress>matrix:8810</nodeAddress>
</com.pmease.quickbuild.stepsupport.StepRuntime>
</entry>
</stepRuntimes>
<repositoryRuntimes/>
<variables/>
</com.pmease.quickbuild.model.Build>
</list>
{code}


h1. 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.

h1. Demo
Below [curl|http://curl.haxx.se/] command demonstrates how to get notifications for user _admin_ after build with id _100_:
{code}curl -u admin:admin http://localhost:8810/rest/notifications?last_notified_build_id=100{code}