Releases API returns an empty list

I’m trying to get the list of repository releases via Github API for the component symfony/event-dispatcher.

https://github.com/symfony/event-dispatcher/releases contains an actual list of releases.

According to the documentation, it should return the list of releases but I’ve retrieved only the empty list.

Request example URL: https://api.github.com/repos/symfony/event-dispatcher/releases.

Also, for  symfony/symfony the API https://api.github.com/repos/symfony/symfony/releases works.

I don’t see any releases at https://github.com/symfony/event-dispatcher/releases. Is it possible that they are still drafts? I think these are not returned unless you have read access to the repository.

Try to send an authenticated request

1 Like

Not sure what they are drafts, they available on https://packagist.org/packages/symfony/event-dispatcher and via composer.

What do you mean by “Try to send an authenticated request”? I’m using Github API token authentication.

Also, the result should be the same as on Releases Web Page for the repository.

Nevermind what I said, it does not apply in your case.

It looks like you didn’t create any releases yet, what you see is a list of tags.

Create a new release at https://github.com/symfony/event-dispatcher/releases/new (you get there by hitting the “Draft a new release” button on https://github.com/symfony/event-dispatcher/releases), after you create one it should be returned in the API. 

Yes, I understood they have not published releases but if I see such releases on the web page I should have a possibility to get them via REST API. Releases and tags web pages are different in comparison to Tags REST API because REST API returns unordered results and there is no possibility to sort results.

I’m not an owner of the mentioned repositories, so I can’t just publish such releases. There are a lot of popular repositories which not publish releases in such way but they available via Web Page and Composer (PHP dependencies manager).

In my understanding, there should a possibility to get the same result as on Web Page but via REST API and some attribute, like published, could be used to show if a release is published or not. 

4 Likes