TeamCity post build step with Secure value in API

Answered

When I post this XML:

 <parameters>
<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" />
</parameters>

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?

4 comments

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.

0

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.

 

0

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

0

It's the XML from my first post.

0

Please sign in to leave a comment.