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



  • 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


    Log in to reply
     

  • inedo-engineer

    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



  • @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



  • 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.
    

    ???????



  • Mea culpa :)

    Fixed!

    Regards,
    Michal


  • inedo-engineer

    Hi @michal-roszak_0767,

    Can you please post what the fix was?

    Thanks,
    Rich


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation