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!

    Proget: API for release versions only/Hide prerelease?

    Scheduled Pinned Locked Moved Support
    2 Posts 2 Posters 11 Views 1 Watching
    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.
    • MaxCasconeM Offline
      MaxCascone
      last edited by MaxCascone

      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"
      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @MaxCascone
        last edited by

        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

        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