I suggest you ...

API access to functionality

It would be great to have an API to automate certain tasks on MyGet!

32 votes
Vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
AdminMyGet (Admin, MyGet - Package management made easier) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

9 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...
  • Anonymous commented  ·   ·  Flag as inappropriate

    Pinning packages is very tedius and is something that could be automated via calls from a continuous integration server (i.e. TeamCity) if an API was available

  • Michael Ketting commented  ·   ·  Flag as inappropriate

    @Admin
    That's great advice, thank you for pointing me to it. I'll admit, I never thought to look for this under "Package Retention" on the docu site.

  • AdminMyGet (Admin, MyGet - Package management made easier) commented  ·   ·  Flag as inappropriate

    @Michael Ketting, try the following for removing NuGet packages:

    Try:

    nuget delete $PackageName $PackageVersion $ApiKey -Source https://www.myget.org/F/feedname/api/v2/package?hardDelete=true

    Alternatively, you can simply submit an HTTP DELETE request to the following endpoint:

    DELETE /F/feedname/api/v2/Package/$PackageName/$PackageVersion?hardDelete=true HTTP/1.1
    Host: www.myget.org
    X-NuGet-ApiKey: your-api-key
    Cache-Control: no-cache

  • Michael Ketting commented  ·   ·  Flag as inappropriate

    I would need the option for deleting packages. Up to 6-12 months ago, I was able to just send a DELETE REST request on the delete-url in the UI but the server is employing XSRF protection and other changes and my REST calls no longer work.

    Using delete via NuGet is not an option since I want to delete the packages, not unlist them.

    The reason, in case you're wondering, is to preserve space in the storage quotas.

  • James Newton-King commented  ·   ·  Flag as inappropriate

    +1

    I'd like to automate adding feed privileges for a private feed. I have users that log into another website and I'd like for them to automatically be granted a privilege.

  • daniel hegner commented  ·   ·  Flag as inappropriate

    I'd like an API to be able to automate pushing packages upstream.
    This would make it possible to create a very nice Continuous Delivery pipeline where packages that has gone through various QA steps can automatically be promoted from a build repository to a production repository.

  • Drew Marsh commented  ·   ·  Flag as inappropriate

    +3. I would like to be able to automate repository creation/deletion at bare minimum.

Feedback and Knowledge Base