This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var server = "http://yourserveraddress:8065/"; //Your server and IP address | |
var apiKey = "API-XXXXXXXXXXXXXXXXXXXXXXXXX"; // Get this from your 'profile' page in the Octopus web portal | |
var endpoint = new OctopusServerEndpoint(server, apiKey); | |
var repository = new OctopusRepository(endpoint); | |
var deployment = repository.Deployments.Get("deployments-774"); | |
var newDeployment = new Octopus.Client.Model.DeploymentResource(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var deployment = repository.Deployments.FindOne(d => d.EnvironmentId == "Environments-65" && d.ProjectId == "projects-193"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$server = "http://blah" | |
$apiKey = "API-XXXXXXXXXXXXXXXX" | |
$command = $($server + "/api/tasks") | |
$task = @{} | |
$task.Name = "Backup" | |
$task.Description = "Backup requested via API" | |
$body = $task | ConvertTo-Json |
NewerOlder