API returns 200 but nothing changes
Hi! I'm using TeamCity Professional 2019.1.2 (build 66342) and trying to modificate some build parameters, add new one, for ex.:
user@linux:~$ curl -v -u username:passwd --request POST http://ipaddr:8111/httpAuth/app/rest/buildTypes/id:myBuildid/parameters --header "Content-Type: application/xml" --data "<property name=\"someparam_enabled\" value=\"true\" inherited=\"true\"><type rawValue=\"checkbox uncheckedValue='false' display='prompt' checkedValue='true'\"/></property>"
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying ipaddr...
* TCP_NODELAY set
* Connected to ipaddr (ipaddr) port 8111 (#0)
* Server auth using Basic with user 'username'
> POST /httpAuth/app/rest/buildTypes/id:myBuildid/parameters HTTP/1.1
> Host: ipaddr:8111
> Authorization: Basic authhash
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/xml
> Content-Length: 162
>
* upload completely sent off: 162 out of 162 bytes
< HTTP/1.1 200
< TeamCity-Node-Id: MAIN_SERVER
< Set-Cookie: TCSESSIONID=cookiesessionid; Path=/; HttpOnly
< Set-Cookie: RememberMe=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
< Cache-Control: no-store
< Content-Type: application/xml
< Content-Length: 200
< Date: Mon, 14 Oct 2019 14:22:35 GMT
<
* Curl_http_done: called premature == 0
* Connection #0 to host ipaddr left intact
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><property name="someparam_enabled" value="true"><type rawValue="checkbox uncheckedValue='false' display='prompt' checkedValue='true'"/></property>
So, I got the '200', but after refreshing browser's tab I see that nothing has been changed. Changing request gives some errors - 400, 404, etc..
But what am I doing wrong in request above?
Thank you!
Please sign in to leave a comment.
Huh!..
So, I saw nothing just because of refreshing project's parameters page, but thru API I changed build's parameters.