anitya icon indicating copy to clipboard operation
anitya copied to clipboard

Backwards incompatible API change?

Open Jille opened this issue 3 years ago • 2 comments

Hi.

We (https://www.snoozethis.com) recently integrated with your API to allow our users to wait for new releases on e.g. GitHub.

This broke around June 22nd. Previously we POSTed {"id":"1234"} to https://release-monitoring.org/api/v2/versions/ but that started returning HTTP 400s. We switched to GETting https://release-monitoring.org/api/v2/versions/?project_id=1234 and that seems to work now.

The commit message in https://github.com/fedora-infra/anitya/pull/1105 indicates it wasn't supposed to change.

Jille avatar Jun 28 '22 17:06 Jille

This wasn't an intended change. We just replaced the old API backend which wasn't supported anymore to new one. One thing that came to my mind at first glance, maybe the old API backend was not that strict regarding data types. The id was defined as int and looking at our POST request your are sending string. So changing the payload to {"id":1234} should fix the issue. It would also explain HTTP 400. The GET will work as well.

Zlopez avatar Jun 29 '22 07:06 Zlopez

@Jille Did you tried to change the id in post request to int?

Zlopez avatar Aug 02 '22 12:08 Zlopez

I'm closing this issue, because it's not an issue with API. If there is still something to discuss here feel free to open the ticket.

Zlopez avatar Sep 14 '22 14:09 Zlopez