-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: API to re-list a previously unlisted package #5191
Comments
Fortunately, it's already possible, but apparently not documented. If you hit the same url as the unlist API ( The same functionality exists in Leaving this open because we need documentation on this. @karann-msft @anangaur |
here's what happens when you try running the publish command
Not a documentation issue. Moreover, no such command shows up in |
Maybe it isn't in nuget.exe--I was pretty sure it was. In any case we are still missing the documentation for the nuget.org API. |
Please create a docs issue and provide sufficient information on what needs to go into the doc. Better yet, create a PR to the docs repo :) tagging @joelverhagen who authored this doc to understand why did we omit publish. |
Thanks for the instant documentation :) |
It is undocumented because it is not part of the official protocol, meaning the official NuGet client does not use it. Also, it is unclear whether other server implementations support it (I haven't tried). As @scottbommarito mentioned, the @chrisdunelm, feel free to use the endpoint right now (via a custom script). It is unlikely that we will remove or change this endpoint because a) our end-to-end tests use it to test the unlist/relist flow and b) other people are using it. If changes do sometime occur to any publicly accessibly endpoint, we will announce it via the NuGet/Announcements repository. Also, I would recommend creating an issue on NuGet/Home if you are interested in getting official support for this feature into the NuGet client. I would be happy to document it after talking to the team and agreeing this is something we want to officially support. Thoughts, @skofman1 @xavierdecoster? |
Typically we have not seen authors re-listing many packages together but seems like a general scenario for enterprises including Microsoft/.NET teams I think it makes sense to have a nuget.exe command to re-list package. |
The POST worked fine. Thanks for suggesting it. @anangaur No, we just However, due to the problem that caused #5183, we had many packages that were live on nuget.org, but a common dependency was not live. So yesterday I programmatically unlisted all of the latest version of all packages; then today programmatically relisted them all. Being able to do this using the POST request was extremely useful. (We also have had a number of occasions where we've released many packages containing a bug; and needed to unlist them all. This isn't relevant for the relist discussion though as these bug-ridden packages never need re-listing) |
@joelverhagen , agree we should document this endpoint. |
Documentation was updated. Closing. |
Waiting for deployment. |
Docs look good: https://docs.microsoft.com/en-us/nuget/api/package-publish-resource#relist-a-package |
Thanks for getting the docs out! (Note the docs say a (and even though it was apparently already in the code base would have been nice to get a heads up on this in the announcements repo) |
@maartenba, great feedback, thanks. Concerning the 204 vs. 200 -- nice catch. I made a bad assumption about Concerning the announcement -- yeah, good idea. @anangaur, could we make an announcement about this? This endpoint has been around for ages but we just now made it visible by documenting it in the API docs. We can work on the wordcraft tomorrow. |
It's currently possible to unlist a package from nuget.org using the API, as documented here.
However, there doesn't appear to be an API to re-list a previously unlisted package.
Please can one be added?
We manage hundreds of nuget packages on nuget.org, and occasionally it's very useful to be able to programmatically unlist/relist many packages. For example, when sorting out problems caused by #5183
Thank you
The text was updated successfully, but these errors were encountered: