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



  • 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.


  • inedo-engineer

    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



  • @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


  • inedo-engineer

    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


  • inedo-engineer

    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.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation