Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    NuGetPackages_SetListed api endpoint no longer working

    Scheduled Pinned Locked Moved Support
    progetapi
    5 Posts 3 Posters 97 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      Chris.Camburn_5718
      last edited by

      In the last few versions of ProGet, I have been unable to use the NuGetPackages_SetListed api endpoint. The below is an example call in PowerShell:

      $feed_Id = 5
      $package_Id = 'Package.Id.Hidden'
      $package_Version = '0.1.0.12-rc'
      $listedIndicator = 'false'
      $unlistUri = "$baseUri/api/json/NuGetPackages_SetListed?Feed_Id=$($feed_Id)&Package_Id=$($package_Id)&Version_Text=$($package_Version)&Listed_Indicator=$($listedIndicator)"
      Write-Output $unlistUri
      $r = Invoke-WebRequest -Uri $unlistUri -Method Post -Headers $reqheaders -UseBasicParsing
      

      Running the above (with appropriate headers and access) previously unlisted or listed a package, but it no longer works. It returns a 200 with no content, which is expected, but the package remains in it's previous state. I confirmed in the web ui and the database that the package is still listed.

      1 Reply Last reply Reply Quote 0
      • jjonesJ Offline
        jjones inedo-engineer
        last edited by

        Hi Chris,

        I do not see any issues with your powershell script, and I too am unable to unlist a package with this endpoint. We have created an issue and will be assessing it to determine what release this will go into.

        Issue: PG-1549

        Thanks,
        Jason

        1 Reply Last reply Reply Quote 1
        • C Offline
          Chris.Camburn_5718
          last edited by

          @jjones

          Thanks for the update. In the meantime, especially if this is going to be a while before a fix is introduced, is there a supported workaround? Perhaps using the stored procedure in the database?

          Thanks,
          Chris

          1 Reply Last reply Reply Quote 0
          • jjonesJ Offline
            jjones inedo-engineer
            last edited by

            Hi Chris,

            I have a feeling what you'll need is the NuGetPackagesV2_SetListed stored procedure which requires two additional parameters, LatestVersion_Text and LatestStableVersion_Text. Currently this is set to internal and we are assessing if we can make this part of the api.

            Thanks,
            Jason

            1 Reply Last reply Reply Quote 0
            • apxltdA Offline
              apxltd inedo-engineer
              last edited by

              Hi Chris,

              You'll need to run the NuGetPackagesV2_SetListed method instead. In order to this, you'll need to mark it as non-internal; this can be done with a simple database query...

              UPDATE [__StoredProcInfo] SET [Internal_Indicator] = 'N' WHERE [StoredProc_Name] = 'NuGetPackagesV2_SetListed'

              This will be also be updated in 5.2.10 as PG-1549.

              Founder and CEO, Inedo

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post
              Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation