I am writing a web app to allow team members to launch builds in TeamCity. I would like to accomplish this by issuing AJAX calls from the single page web app client to the Team City server.
After going through existing documentation on rest api and CORS, I am still having problems. Specifically, when I issue a POST from the web app to launch a build configuration on the build queue, Chrome, IE10, and Firefox will all send a CORS pre-flight OPTIONS request to TC server. The TC server responds with 401 Unauthorized.
I have set internal properties:
The CORS OPTIONS url is sent to http://MyTeamCity:8080/httpAuth/app/rest/buildQueue since that is where the initial POST is directed.
There is nothing in the rest api build log regarding this request. Does TeamCity log these incoming CORS OPTIONS preflight requests?
In general, more detailed examples in the Team City documentation on how to control and monitor Team City builds from a single page web app would be extremely helpful.