Octopus API - getting releases by Project name, not Project Id

OK, so I can get a list of releases for a particular project like this:


Note the “Projects-244”. Is it possible to do this specifying the name of the project instead instead?


Thanks for reaching out. Its not possible to do this just specifying the project name.

You can do it in 2 ways:

The raw API way: First you gotta get the project all the projects from /api/projects/all, filter the one you want by name and get its ID.

The Powershell way: Use the cmdlet Get-OctopusRelease from the open source module Octoposh, which has a -ProjectName parameter.

Octoposh site: http://octoposh.net/
Cmdlet wiki: https://github.com/Dalmirog/OctoPosh/wiki/Get-OctopusRelease

Hope that helps,

Excellent, thanks Dalmiro.

For those that want to know, in Powershell you do something like this:



$projects=Invoke-RestMethod -Method Get -Uri $octopusUrl

ForEach($project in $projects){
        Write-Output ("Found project: {0},{1}" -f $project.Name, $project.Id)
1 Like