Can't get a list of releases

Hi all.
Am trying to use the API call “api/releases{?skip}” command from a c#.NET program to get a list of releases in my test installation.

I have a release in Development area so I reckon it should be visible to this call.
However, every parameter I try fails to return the release.
I have tried nothing after the word releases, 0,skip=0,?skip=0,?skip=0&take=100 etc etc to no avail.

What should I be putting in the call please?

Thank you

Hi,

Thanks for reaching out!

Is there a reason why you are sticking with the raw API calls instead of using the .NET client we have out there? With it you could just do:

var apiKey = "API-ABCDGD3CYYBTWM9UWB8";
var octopusURL = "http://OctopusServer";
            
var endpoint = new OctopusServerEndpoint(octopusURL, apiKey);
var repository = new OctopusRepository(endpoint);

var Releases = repository.Releases.FindAll();

.NET Client: https://www.nuget.org/packages/Octopus.Client/

Gotcha: you need to make sure to use a version of the .NET client that matches your Octopus Server version. If you are not sure which version to use, let me know which server version you are using

Best regards,
Dalmiro

I am using the API because I have been asked to write a program using REST as partly investigation, partly training, partly familiarisation with .NET/Azure etc
That’s why I need to get this running using Raw API calls.

My API is 3.0.0
Application is Octopus Deploy
Version “3.4.0-beta0002”

Thanks

Hi Lee,

To get the releases using the RAW you need to start with a GET to /api/releases. That will give you the first set of 30 results. At the bottom of those results you’ll find a “Links” property which should have a “Page.Next” property with a link. If you GET that link you’ll get the next set of 30 results, which will also have its own “Links.Page.next”. You need to follow that rabbit hole and gather the releases on each page, until you reach a GET result that doesn’t have “Links.Page.Next”, meaning there’s no more releases after that.

See attached screenshot too.

Also please try to upgrade from 3.4.0-beta0002 as soon as you can. We’ve already released a couple of stable versions of 3.4, so we are no longer supporting the Betas.

Thanks,
Dalmiro