List all pakages deployed per release

Im using Artifactory as external feed and i´d like to tag artifacts than have been deployed by octopus into the production environment.
SO i need to list releases of ALL Projects that happened on Production environment, get the packages name (one release can have multiples packages) and ID and tag this on artifactory.

What endpoints should i use?
If i use /releases/{release id} i get something like:

SelectedPackages": [
      "StepName": "xxxxxxxxxxxxxxxxxx ",
      "ActionName": "xxxxxxxxxxxxxxxxxxxxxx",
      "Version": "2.34.19",
      "PackageReferenceName": ""

and i cant see the PackageNAme.

Hi Andrew,

Thanks for getting in touch! I think the best way to get the Package ID for the release is to look at the ProjectDeploymentProcessSnapshot associated with the release. I have a couple of screenshots below from an old test release on my instance that help.

First is my result from /releases/Releases-51968. I’m seeing the same as you with the just the package version. (I believe the PacakgeReferenceName is from our Reference Package feature.)

I can use the ProjectDeploymentProcessSnapshotId to view the information Octopus snapshot about the deployment process associated with the release (which contains the PackageId). You can also copy the URL from the Links field. Screenshot is from /deploymentprocesses/deploymentprocess-Projects-2865-s-11-Q3W35/

I think the best way to get this information via API script would be to return the release page for the package version and the deployment process snapshot associated with the release. Then get the Package ID from the Steps -> Actions -> Step name/ID -> Packages. If your project has multiple package steps, then you will need to confirm that the step name matches the value from the release page.

I hope that helps!

If you have any questions or thoughts at all here, please don’t hesitate to let me know.

Best regards,

Deployment process doesnt work from me,.
I have a release with 2 deployments (one to Development, one to Test). if i get the deploymentprocess id, the most i can see is the reference of the package

“Packages”: [
“Id”: “762d88574addd30d4defe59e5b520bdd”,
“Name”: “”,
“PackageId”: “#{PackageName}”,
“FeedId”: “feeds-octopusdeploymentpackages”,
“AcquisitionLocation”: “Server”,
“Properties”: {}

Hey @andrescolodrero,

I think I may have a script that will help you get what you need, would you be able to test it out, please?

getPackagesFromRelease.ps1 (2.3 KB)

It should check to see if the package name is in variable format and if so, it will search the variable-set attached to the release for the variable value.

Please let me know if this is what you’re looking for or not!

Kind Regards,