Missing Pagination in Packages from NuGet ( Can only display 20 Versions ) and missing download count in github api #168257
Replies: 4 comments 2 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
|
This is a common limitation that several teams face with GitHub Packages. You're right that both approaches have their constraints: The NuGet query endpoint is paginated and limited to 20 results, which isn't sufficient for proper cleanup operations. Meanwhile, the GitHub REST API for package versions doesn't include download counts in the response. Possible workarounds: You could try using the GraphQL API instead, as it sometimes provides more flexible querying options for packages. Alternatively, consider implementing a client-side solution that makes multiple paginated requests to gather all versions, then cross-references them with download data from another source. For a more permanent solution, I'd recommend opening a feature request with GitHub asking for either: Increased pagination limits on the NuGet query endpoint Download count data to be included in the REST API package versions response A dedicated cleanup API endpoint for packages Many organizations need better package management tools, so your feedback could help prioritize these improvements. You might want to check GitHub's roadmap or existing issues to see if this is already being addressed. |
Beta Was this translation helpful? Give feedback.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Hi there
We publish packages to the github feed as part of our buildchain.
We're currently struggling to implement a cleanup.
I want to delete packages depending on their download count
When I request it using the query endpoint in curl
https://nuget.pkg.github.com/$myorg/query?q=$mypackage&prerelease=trueI can only get 20 Versions which is basically just not enough.
Additionally I would prefer to get the package versions directly using the github Rest api.
This one however is currently completely missing the downloadCount
https://api.github.com/orgs/$myorg/packages/nuget/$mypackage/versionsIs there anything that can be done here ?
Beta Was this translation helpful? Give feedback.
All reactions