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!

    API request Unauthorized on Windows

    Scheduled Pinned Locked Moved Support
    10 Posts 2 Posters 24 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.
    • M Offline
      michal.roszak_0767
      last edited by michal.roszak_0767

      "Fresh" installation on Windows server.
      ProGet v.2024.32

      I'm trying to make simple API request.
      curl -v --header "X-ApiKey: ******* " http://******:8624/api/json/Security_GetPrivileges

      Response:

      • Trying ****:8624...
      • Connected to ******* port 8624 (#0)

      GET /api/json/Security_GetPrivileges HTTP/1.1
      Host: *****:8624
      User-Agent: curl/7.84.0
      Accept: /
      X-ApiKey: *******

      • Mark bundle as not supporting multiuse
        < HTTP/1.1 401 Unauthorized

      If I run ProGet on Linux (docker), the response on the same request is:
      Connected to ********* port 8080 (#0)

      GET /api/json/Security_GetPrivileges HTTP/1.1
      Host: ******:8080
      User-Agent: curl/7.84.0
      Accept: /
      X-ApiKey: ********

      • Mark bundle as not supporting multiuse
        < HTTP/1.1 200 OK

      Where is the problem?

      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @michal.roszak_0767
        last edited by

        Hi @michal-roszak_0767 ,

        The first thing that comes to mind is WIndows Integrated Authentication.

        Curl does not support that, but if you use PowerShell wtih --UseDefaultCredentials it will. You can also bypass the request by appending ?bypassIntegrated=false to the URL.

        Cheers,
        Alana

        M 2 Replies Last reply Reply Quote 0
        • M Offline
          michal.roszak_0767 @atripp
          last edited by

          @atripp,

          Thanks :)

          I added ?bypassIntegrated=true to URL and it's OK.

          Cheers,
          Michal

          1 Reply Last reply Reply Quote 0
          • M Offline
            michal.roszak_0767 @atripp
            last edited by

            @atripp

            Why you don't recommend using API?
            I've seen a lot of forum threads on this topic and people seem to be using it.

            Regards,
            Michal

            atrippA 1 Reply Last reply Reply Quote 0
            • atrippA Offline
              atripp inedo-engineer @michal.roszak_0767
              last edited by

              Hi @michal-roszak_0767 ,

              I assume you mean, why don't we recommend using the Native API?

              We don't recommend using the Native API because we do not document usage and the methods are subject to removal or change, even in maintenance versions.

              In this case, we do not have an alternative API for getting security privileges, so the only option is Security_GetPrivileges if you want to do that programmatically.

              Thanks,
              Alana

              M 1 Reply Last reply Reply Quote 0
              • M Offline
                michal.roszak_0767 @atripp
                last edited by michal.roszak_0767

                @atripp

                Which API do you recommend? Where can I find documentation for it?

                Thanks,
                Michal

                atrippA 1 Reply Last reply Reply Quote 0
                • atrippA Offline
                  atripp inedo-engineer @michal.roszak_0767
                  last edited by

                  Hi @michal-roszak_0767 ,

                  We do not have a non-Native API to assign privleges at this time, but otherwise our documented APIs are here: https://docs.inedo.com/docs/proget/api

                  Here is the info about the Native API:
                  https://docs.inedo.com/docs/proget/api/http-requests#native-api-endpoints

                  Thanks,
                  Alana

                  M 1 Reply Last reply Reply Quote 0
                  • M Offline
                    michal.roszak_0767 @atripp
                    last edited by michal.roszak_0767

                    @atripp

                    Hi Alana,

                    Can I modify/set "Other Settings" section elements using pgutil?

                    In properties section I see only:

                    alternateNames=*not set*
                    feedType=maven2
                    active=true
                    dropPath=*not set*
                    endpointUrl=http://******/maven2/MyNewMavenFeed/
                    connectors=*not set*
                    canPublish=true
                    vulnerabilitiesEnabled=true
                    

                    9ac164cc-d3c2-4ea7-af4e-6d474a0f0b6d-image.png

                    Cheers,
                    Michal

                    atrippA 1 Reply Last reply Reply Quote 0
                    • atrippA Offline
                      atripp inedo-engineer @michal.roszak_0767
                      last edited by

                      @michal-roszak_0767 only what's shown there is currently supported.

                      I saw that @zs-dahe is is looking for a the RetentionActive setting as well (see https://forums.inedo.com/topic/5341/retention-activation-via-api), so it would probably easiest to do these at once: I'm almost certain this is done at the ProGet level, not pgutil.

                      Can you open a new thread w/ the requested fields/properties? This will make it much easier for people searching in the future :)

                      M 1 Reply Last reply Reply Quote 0
                      • M Offline
                        michal.roszak_0767 @atripp
                        last edited by

                        @atripp

                        Done: https://forums.inedo.com/topic/5347/feature-request-feed-other-settings-editor

                        Michal

                        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