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!

Proget: API for release versions only/Hide prerelease?



  • Hi,
    I'm wondering if there's a way to pull only non-prerelease versions from the Proget Api.

    In the UI, in the All Versions tab, you can click Hide Prerelease, and this only shows versions with Major.Minor.Patch and no attached metadata. The URL bar shows it tacks on the param ?HidePrerelease=True to the URL.

    I can't seem to duplicate this behavior in the api:

    Invoke-WebRequest "https://proget.myorg.com/upack/$FeedName/versions?group=$GroupName&name=$PackageName&HidePrerelease=True"
    

    doesn't filter the prerelease versions out for me.

    I can build a thing to parse for only the MMP versions, but is there an accessible API for this?

    This doesn't work:

    iwr "https://proget.myorg.com/upack/$FeedName/$GroupName/$PackageName/versions/all?HidePrerelease=True"

  • inedo-engineer

    Hi @mcascone,

    There isn't an API/endpoint for that at this time, but it's easy enough to handle at the consumer/client-level. To tell if something is prerelease, you can just do versionNumber.Contains('-').

    In the case of the all versions page, the "client" (i.e. the page) just queries the versions and displays non-prerelease.

    Cheers,
    Alana


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation