View deployment log via API

Hi

We are using the Octopus.Client library to access the API, and this library clearly wraps most functionality available through the Dashboard. However the only way I can see to access a deployment log is to call OctopusRepository.Client.GetContent("/api/tasks//details") for the task linked to the deployment, and then parse the JSON to see which steps worked for which machine. Can you confirm this is the recommended way to retrieve deployment log information via this API, and that it will be supported in future releases ? Also if possible can you confirm which class the returned “ActivityLog” object maps to ?

Hi Diego,

Thanks for getting in touch.

Does this bit of code point you in the right direction ?

var endpoint = new OctopusServerEndpoint(server, apiKey);
var repository = new OctopusRepository(endpoint);


var deployment = repository.Deployments.Get("deployments-1126");
var task = repository.Tasks.Get(deployment.Links["Task"]);
var details = repository.Tasks.GetDetails(task);

Regards

Damian M

Damian

That’s exactly what I was looking for !

Thanks
Diego