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!

    Create Choco feed with the API

    Scheduled Pinned Locked Moved Support
    feedsprogetapi
    6 Posts 3 Posters 55 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
      clint.jenkinson_0617
      last edited by

      Hi Guys,

      Just wondering, is there an API function to create chocolatey feeds? i cant seem to find it in the doco.

      thanks,

      Clint

      Product: ProGet
      Version: 5.0.8

      1 Reply Last reply Reply Quote 0
      • benB Offline
        ben inedo-engineer
        last edited by

        Hello Clint,

        To do this, you would need to use the native API. For example:

        (newlines inserted for readability. they would not be in the actual request.)

        POST /api/json/Feeds_CreateFeed HTTP/1.1
        Content-Type: application/x-www-form-urlencoded
        
        key=[your native API key]&
        Feed_Name=[feed name]&
        FeedType_Name=Chocolatey&
        FeedConfiguration_Xml=%3CInedo.ProGet.Feeds.NuGet.NuGetFeedConfig%20Assembly%3D%22ProGetCoreEx%22%3E
        %3CProperties%20UseLegacyVersioning%3D%22False%22%20%2F%3E
        %3C%2FInedo.ProGet.Feeds.NuGet.NuGetFeedConfig%3E
        

        The easiest way to get a value for FeedConfiguration_Xml is to configure a feed in ProGet and then copy that column from the database.

        1 Reply Last reply Reply Quote 0
        • C Offline
          clint.jenkinson_0617
          last edited by

          Fantastic, thanks Ben. Get that to work OK - however when I then try to call the promotions api to promote, it returns the Native JSON API Reference instead of actually doing anything.

          POST /api/json/promotions/promote HTTP/1.1
          Host: proget.server
          Content-Type: application/x-www-form-urlencoded
          Cache-Control: no-cache
          Postman-Token: 109411c1-d1b5-81f7-603f-be2c9901a42f

          key=BjvV78liayx7CEay6O1Y%2Bg%3D%3D&packageName=QCAD.ARL.Service&fromFeed=QCAD&toFeed=NewFeed

          going to /api/promotions/promote as per the doco just returns a 500 error

          thoughts?

          thanks,
          Clint

          1 Reply Last reply Reply Quote 0
          • C Offline
            clint.jenkinson_0617
            last edited by

            Sorry, I did get it working, didn't see that 'version' was required. is there any way to just promote 'latest' rather than a named version?

            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

              Good idea ... in 5.0.9, there should be! I just added PG-1216, and assuming there are no issues with it, we'll ship it.

              1 Reply Last reply Reply Quote 0
              • C Offline
                clint.jenkinson_0617
                last edited by

                Outstanding, thanks Alex

                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