anitya
anitya copied to clipboard
Packages API unable to distinguish projects with the same name
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
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