Listening Tentacle API

I have been looking at the following Octopus Deploy API Documentation. https://github.com/OctopusDeploy/OctopusDeploy-Api/wiki It is great! Unfortunately, it is also incomplete.

Specifically I was looking for the API for creating a new listening tentacle in an environment. https://github.com/OctopusDeploy/OctopusDeploy-Api/wiki/ListeningTentacleEndpoints

Is there somewhere else you can point me for documentation or perhaps put the POST and PUT endpoints in the reply?

Thanks for your help,
Charles

So, I did some digging with the API and I think I have figured out how to do it:

POST https://<OCTOPUS_DEPLOY_SERVER>/api/machines with the following body
{
“Id”: “Machines-API”,
“Name”: “api.ci.underpaid.com”,
“Thumbprint”: “F74361FAE2641D4CB1FF0A5995C67966EE518420”,
“Uri”: “https://:10933/”,
“IsDisabled”: false,
“EnvironmentIds”: [
“Environments-1”
],
“Roles”: [
“MyRole”
],
“Status”: “Online”,
“HasLatestCalamari”: true,
“StatusSummary”: “Octopus was able to successfully establish a connection with this machine on Thursday, January 28, 2016 9:17 AM”,
“Endpoint”: {
“CommunicationStyle”: “TentaclePassive”,
“Uri”: “https://:10933/”,
“Thumbprint”: “F74361FAE2641D4CB1FF0A5995C67966EE518420”,
“TentacleVersionDetails”: {
“UpgradeLocked”: false,
“Version”: “3.2.17”,
“UpgradeSuggested”: false,
“UpgradeRequired”: false
}
}
}

Hi Charles,

Thanks for reaching out. Glad to hear you figured it out on your own. I also wrote this cleaner script for the same: https://github.com/OctopusDeploy/OctopusDeploy-Api/blob/master/REST/PowerShell/Targets/RegisterTentacle.ps1

Regards,
Dalmiro

Thanks for your help! That script is great!