TeamCity post build step with Secure value in API


When I post this XML:

<param name="octopus_additionalcommandlinearguments" value="--packageversion=%build.number%" />
<param name="octopus_deployto" value="Test" />
<param name="octopus_host" value="https://host" />
<param name="octopus_project_name" value="%system.SiteName%" />
<param name="octopus_releasenumber" value="%build.number%" />
<param name="octopus_version" value="3.0+" />
<param name="octopus_waitfordeployments" value="true" />
<param name="secure:octopus_apikey" value="mykey" />
<param name="teamcity.step.mode" value="default" />

It comes out empty on the server, the whole parameter is just not even there in the XML.

So how can I post a secure parameter through the API?


Hello Roger,

Secure parameters, i.e. type=password, are listed, but the values not included into response. You can check the parameter if you print it into the file.


Yeah I know, but when I do a post of the given XML, and I check the XML on the server file system in the data directory, the secure:octopus_apikey is not set.



Could you please provide an example of the POST request that you send?


It's the XML from my first post.


Please sign in to leave a comment.