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!

    Error using HTTP Request

    Scheduled Pinned Locked Moved Support
    6 Posts 3 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.
    • M Offline
      michal.roszak_0767
      last edited by atripp

      Hi,

      I'm trying to list asset folders content:
      https://docs.inedo.com/docs/proget/api/assets/folders/list

      curl -v --header "X-ApiKey: <api key>" --header "Content-Type: application/json" --request GET https://proget.*****/endpoints/qual-t-raw/dir/audit-report
      

      All requests ends with:

      Anonymous is not permitted to perform the Feeds_ViewFeed task for the current scope.
      

      If I use the same API Key to get feed properties:

      curl --header "X-ApiKey: <api key>" --header "Content-Type: application/json" --request POST --data @feed.json https://proget.******/api/json/Feeds_GetFeed | jq
      
      feed.json:
      {"Feed_Name": "qualt-t-maven"}
      
      {
        "FeedType": 22,
        "FeedConfiguration": {
          "HideFeedTips": 0,
          "HasRepackaged": false,
          "PackageStatisticsEnabled": true,
          "RestrictPackageStatistics": false,
          "LayoutConfig": null,
          "DeploymentRecordsEnabled": true,
          "UsageRecordsEnabled": true,
          "PromoteToFeedId": null,
          "HiddenUsageInstructionNames": null,
          "HiddenPackageInstallInstructionNames": null,
          "VulnerabilitiesEnabled": true,
          "LicensesEnabled": true,
          "UseWithProjects": true,
          "DisableReleaseAnalysis": false,
          "Migration23Skipped": null,
          "MigratedTo23": null,
          "RetentionRulesEnabled": false,
          "DeletionRecordRetentionPeriod": null
        },
        "Active_Indicator": true,
        "AllowNoncompliant_Indicator": null,
        "AllowUnassessedVulnerabilities_Indicator": null,
        "AllowUnknownLicenses_Indicator": true,
        "Cache_Connectors_Indicator": true,
        "DropPath_Text": null,
        "Feed_Description": null,
        "Feed_Id": 35,
        "Feed_Name": "qualt-t-maven",
        "FeedConfiguration_Xml": "<Inedo.ProGet.Feeds.Maven2.Maven2FeedConfig Assembly=\"ProGetCoreEx\"><Properties AllowNonStandardFiles=\"True\" AllowInvalidVersions=\"True\" HideFeedTips=\"0\" HasRepackaged=\"False\" PackageStatisticsEnabled=\"True\" RestrictPackageStatistics=\"False\" DeploymentRecordsEnabled=\"True\" UsageRecordsEnabled=\"True\" VulnerabilitiesEnabled=\"True\" LicensesEnabled=\"True\" UseWithProjects=\"True\" DisableReleaseAnalysis=\"False\" RetentionRulesEnabled=\"False\" /></Inedo.ProGet.Feeds.Maven2.Maven2FeedConfig>",
        "FeedGroup_Id": 2,
        "FeedPathOverride_Text": null,
        "FeedState_Number": 45,
        "FeedType_Name": "Maven2",
        "LastPackageUpdate_Date": "2025-05-19T10:25:15.287Z",
        "LastPolicyUpdate_Date": "2025-05-29T22:49:57.29Z",
        "LastSync_Date": null,
        "PackageStoreConfiguration_Xml": null,
        "ReplicationConfiguration_Xml": null
      }
      
      

      pgutil response (the same api key)

      pgutil assets list --feed=qualt-t-raw --path=audit-report
      clients                                                     <DIR>
      

      91c97041-1569-4741-85d8-f767c885f9eb-image.png

      What's wrong?

      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'm not sure, but maybe it's something simple like a typo. I don't see it though.

        That 401 message will occur when credentials weren't sent.

        Behind the scenes, pgutil uses that API and authenticates by adding the same header:
        https://github.com/Inedo/pgutil/blob/thousand/Inedo.ProGet/ProGetClient.cs#L37

        Perhaps you can use a proxy like Fiddler or ProxyMan to see the difference in HTTP Traffic?

        Thanks,
        Alana

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

          @atripp

          No typo!

          curl -v --header "X-ApiKey: <api key>" --header "Content-Type: application/json" https://proget.<host>/endpoints/qual-t-raw/dir/
          curl -v --header "X-ApiKey: <api key>" --header "Content-Type: application/json" --data @feed.json https://proget.<host>/api/json/Feeds_GetFeed | jq

          feed.json:
          {"Feed_Name": "qualt-t-raw"}

          The same request template. Different endpoint.

          Cheers,
          Michal

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

            Even more.
            I added directly Anonymous access to this feed.

            3b0b5fcc-de8b-4284-85fc-33dadceb3e1d-image.png

            Still error!

            curl -v --header "X-ApiKey: <api key>" https://proget.<host>/endpoints/qual-t-raw/dir
            
            ......
            Anonymous is not permitted to perform the Feeds_ViewFeed task for the current scope.
            

            ???????

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

              Mea culpa :)

              Fixed!

              Regards,
              Michal

              1 Reply Last reply Reply Quote 0
              • rhessingerR Offline
                rhessinger inedo-engineer
                last edited by

                Hi @michal-roszak_0767,

                Can you please post what the fix was?

                Thanks,
                Rich

                Products Engineer, Inedo

                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