405 Only POST method is allowed for this request issue
Hello. I am trying to trigger TeamCity build via command line.
curl http://<user name>:<user password>@<server address>/httpAuth/action.html?add2Queue=<build configuration Id>
But got the following answer:
405 Only POST method is allowed for this request
How I can trigger TeamCity build via command line in such conditions?
Thank you.
Please sign in to leave a comment.
As I understand the solution could be via REST API
Example of build.xml
But for me is not clear where should I store my configured build.xml???
Hi,
you should store in the folder where you are running curl from, as curl will take it from there. Alternatively, you can pass the data as a string.
Regarding your first usage, it's discouraged and the REST API is preferred, as you mentioned.