C# OctopusClient Download package from feed

(Kristian) #1

We are writing a C# deployment script to deploy apps to Microsoft Intune. I understand how to use OctopusClient to list Feeds but I cannot get my head around how to download a package with a specific id from one of the feeds available. Are there any examples available to look at to make this more clear?

(Matthew Casperson) #3

Hi @swekjaks, thanks for reaching out.

The client library doesn’t expose a download method, but you can call the https://octopusserver/api/<spaceid>/packages/<packageid>/raw url with the X-Octopus-ApiKey header set to an Octopus API key to download a file.

For example, a Curl command might be:

curl -o test.zip --header "X-Octopus-ApiKey: API-ApiKeyGoesHere" https://master.octopushq.com/api/Spaces-22/packages/packages-TFVars.1.0.0/raw

Regards
Matt C

(system) closed #4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.