Q:

REST API of Teamcity for initiate a build

Can anybody suggest how TEAMCITY RestAPI can used for trigger a build for a particular project availble in bitbucket/mercurial repository and getting the result of the build ,that is jar/war file .

A:

See JetBrains help:

To start a build, send POST request to
  http://teamcity:8111/httpAuth/app/rest/buildQueue with the "build"
  node in content - the same node as details of a queued build or
  finished build. The queued build details will be returned.

Set up build configuration as normal, and trigger using REST API with steps above.

