anitya icon indicating copy to clipboard operation
anitya copied to clipboard

Packages API unable to distinguish projects with the same name

Open mizdebsk opened this issue 5 years ago • 1 comments

Packages API (/api/v2/packages) that lists package-to-project mappings includes project names, but not project IDs. This becomes problematic when there are multiple projects with the same name. In this case package API is not able to distinguish between projects with the same name.

Proposed solution:

  • include project ID in packages API
  • extend projects API to allow looking up project by ID

CC @terminus-brut

mizdebsk avatar May 15 '19 10:05 mizdebsk

Implementation details

This needs to add new parameter ID to post method PackageResource class in https://github.com/release-monitoring/anitya/blob/master/anitya/api_v2.py and the get method should also return ID of the project.

Also we need to return ID of the project in get method of ProjectsResource class in https://github.com/release-monitoring/anitya/blob/master/anitya/api_v2.py

Zlopez avatar May 15 '19 10:05 Zlopez