Octopus API - list of deployed projects in release

Hi,

I have Parent Orchestrator Project that have multiple projects included via process step: Deploy a Release. And each included project can have multiple packages to deploy.

Please, is there some way to get all project release versions included in specific Parent Project release via Octopus API? I want to make some script to check all included project releases versions, but now I can get only included packages versions from API.

Thank you,
Shooty

Hello, and welcome to the forum!

I want to make sure I understand what you’re asking - you’re looking for an API call to return all of the package versions for the projects deployed in your orchestration project?

For instance, if your orchestration project deploys a project called MyProject (including packages MyApp and MyDatabase) and a project called AnotherProject (including packages AnotherApp and AnotherDatabase), and you deployed a release version 2021.08.18 it with:

  • MyApp 1.0.1
  • MyDatabase 1.0.6
  • AnotherApp 1.0.3
  • AnotherApp 1.0.2

You want to be able to query your orchestration release for 20201.08.18 and return the deployed versions for each package?

I don’t want to know packages, just versions of project releases.

For example I have orchestrator project MyProject and two child projects and I want to know only versions of that projects - because I need to check if that Project release was deployed in Dev or Test or actual progression of that release.

MyProject 1.1.0

  • MyDatabaseProject 1.0.1
  • MyAnotherAppProject 1.0.2

I’m going to do some more digging on the correct API calls to return the information you’re looking for.

In the meantime, I noticed you’re using the Deploy a Release step for orchestration - have you looked at the Deploy Child Octopus Deploy Project step template outlined in this post? It offers some better functionality for managing/promoting releases in the way you’re describing. Specifically, it has both a promote and a redeploy mode to make version management easier when orchestrating multiple project deployments.

No I haven’t looked at it yet, but I will, thanks :slight_smile:

Hello,

Please, have you find some solution for this?

Thank you,

Michal

Hello Michal, sorry for the delay!

For getting released versions, I’d look at the API call for GET /releases/{ID}

This call returns JSON, including a collection called SelectedPackages, which represent the packages and versions that were included in the release.

You can also take a look at this sample API script, which uses the Progression API to get the most recent release for a project/environment combo. It also returns the Release ID that you can feed to the above call to get your specific package versions.

I hope this helps, let me know if you have any other questions!

1 Like

Yes, absolutely great, this is something I need.

And I am sorry, because I didn’t see that SelectedPackages property. We have one big orchestrator project and I scrolled down that response, but I cannot find that, because it is in the very bottom of that json :smiley: Sorry for that, and thanks for the solution with script.

No problem, glad you’re up and running! Don’t hesitate to reach out if you have any other questions or need a hand with anything else.

1 Like