Navigation

    Inedo Community Forums

    Forums

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. francesco.campanella_3733
    F
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    francesco.campanella_3733

    @francesco.campanella_3733

    0
    Reputation
    5
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    francesco.campanella_3733 Follow

    Best posts made by francesco.campanella_3733

    This user hasn't posted anything yet.

    Latest posts made by francesco.campanella_3733

    • RE: Unable to use the API

      I found what feeds are causing the problem:

      601fc343-9cd9-4398-91f8-64fe86deb34e-image.png

      When I run https://traka-proget.ad.global:8625/api/management/feeds/get/<FEED_NAME> against them, I get "Persisted object is not a FeedConfig.". All the others work fine.

      For the nuget feeds, I ended up using a NuGet client to discover and download them all. For the docker feeds, I will use the Docker CLI. For the Universal feeds, I'll use the ProGet API (either http methods, SDK, or pgutils).

      I am going to try this tomorrow and let you know if I have any issues like the ones I mentioned in the original post.

      posted in Support
      F
      francesco.campanella_3733
    • RE: Unable to use the API

      Here is the output from that query:

      d7b26d68-95cc-4312-8458-8a26baa874cb-image.png

      Let me know if the screenshot is not legible.

      posted in Support
      F
      francesco.campanella_3733
    • RE: Unable to use the API

      We have run the SQL query, here is the FeedConfiguration_Xml column:

      a08e5b60-2aed-47df-8ac3-8dc28640cb72-image.png

      <Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig Assembly="ProGetCoreEx"><Properties SymbolServerEnabled="False" StripSymbolFiles="False" StripSourceCodeInvert="False" StripSignature="False" UseApiV3="False" ProxyIcons="False" ExcludeAllDelistedPackages="False" FeedUsage="Mixed" HideFeedTips="AddRetentionPolicy" HasRepackaged="False" PackageStatisticsEnabled="True" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig>
      
      <Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig Assembly="ProGetCoreEx"><Properties SymbolServerEnabled="False" StripSymbolFiles="False" StripSourceCodeInvert="False" StripSignature="False" UseApiV3="False" ProxyIcons="False" ExcludeAllDelistedPackages="False" FeedUsage="Mixed" HideFeedTips="AddRetentionPolicy" HasRepackaged="False" PackageStatisticsEnabled="False" RestrictPackageStatistics="False" DeploymentRecordsEnabled="False" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig>
      
      <Inedo.ProGet.Feeds.FeedConfig Assembly="ProGetCoreEx"><Properties FeedUsage="Mixed" HideFeedTips="0" HasRepackaged="True" PackageStatisticsEnabled="True" RestrictPackageStatistics="True" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.FeedConfig>
      
      NULL
      
      NULL
      
      <Inedo.ProGet.Feeds.FeedConfig Assembly="ProGetCoreEx"><Properties FeedUsage="PrivateOnly" HideFeedTips="0" HasRepackaged="False" PackageStatisticsEnabled="False" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.FeedConfig>
      
      <Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig Assembly="ProGetCoreEx"><Properties PackageStatisticsEnabled="True" SymbolServerEnabled="False" StripSymbolFiles="False" StripSourceCodeInvert="False" /></Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig>
      
      <Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig Assembly="ProGetCoreEx"><Properties SymbolServerEnabled="False" StripSymbolFiles="False" StripSourceCodeInvert="False" StripSignature="False" UseApiV3="False" ProxyIcons="False" ExcludeAllDelistedPackages="False" V2DeprecatedQueriesUsed="False" HideV2DeprecatedQueriesUsedMessage="False" IgnoreInvalidApiKeys="False" FeedUsage="Mixed" HideFeedTips="AddRetentionPolicy" HasRepackaged="False" PackageStatisticsEnabled="True" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig>
      
      NULL
      
      <Inedo.ProGet.Feeds.Universal.UniversalFeedConfig Assembly="ProGetCoreEx"><Properties CacheConstructedVirtualPackages="False" FeedUsage="Promoted" HideFeedTips="PromoteToFeed, AddPromoters" HasRepackaged="False" PackageStatisticsEnabled="True" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" VulnerabilitiesEnabled="False" LicensesEnabled="False" UseWithProjects="True" /></Inedo.ProGet.Feeds.Universal.UniversalFeedConfig>
      
      <Inedo.ProGet.Feeds.FeedConfig Assembly="ProGetCoreEx"><Properties FeedUsage="Mixed" HideFeedTips="0" HasRepackaged="True" PackageStatisticsEnabled="True" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.FeedConfig>
      
      <Inedo.ProGet.Feeds.FeedConfig Assembly="ProGetCoreEx"><Properties FeedUsage="Mixed" HideFeedTips="UseCiCdVersioning, AddRetentionPolicy" HasRepackaged="True" PackageStatisticsEnabled="True" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.FeedConfig>
      
      <Inedo.ProGet.Feeds.FeedConfig Assembly="ProGetCoreEx"><Properties FeedUsage="Promoted" HideFeedTips="PromoteToFeed, AddPromoters" HasRepackaged="True" PackageStatisticsEnabled="True" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.FeedConfig>
      
      <Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig Assembly="ProGetCoreEx"><Properties PackageStatisticsEnabled="True" SymbolServerEnabled="False" StripSymbolFiles="False" StripSourceCodeInvert="False" /></Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig>
      
      NULL
      
      NULL
      
      <Inedo.ProGet.Feeds.FeedConfig Assembly="ProGetCoreEx"><Properties FeedUsage="Mixed" HideFeedTips="0" HasRepackaged="False" PackageStatisticsEnabled="True" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.FeedConfig>
      
      <Inedo.ProGet.Feeds.FeedConfig Assembly="ProGetCoreEx"><Properties FeedUsage="Mixed" HideFeedTips="0" HasRepackaged="False" PackageStatisticsEnabled="True" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.FeedConfig>
      
      <Inedo.ProGet.Feeds.FeedConfig Assembly="ProGetCoreEx"><Properties FeedUsage="Mixed" HideFeedTips="0" HasRepackaged="False" PackageStatisticsEnabled="False" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.FeedConfig>
      
      <Inedo.ProGet.Feeds.Docker.DockerFeedConfig Assembly="ProGetCoreEx"><Properties UseCommonBlobStorage="True" EnableStrictVersioning="False" FeedUsage="Mixed" HideFeedTips="0" HasRepackaged="True" PackageStatisticsEnabled="False" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.Docker.DockerFeedConfig>
      
      <Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig Assembly="ProGetCoreEx"><Properties SymbolServerEnabled="False" StripSymbolFiles="False" StripSourceCodeInvert="False" StripSignature="False" UseApiV3="True" ProxyIcons="False" ExcludeAllDelistedPackages="False" FeedUsage="Promoted" HideFeedTips="0" HasRepackaged="False" PackageStatisticsEnabled="False" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.NuGet.NuGetFeedConfig>
      
      <Inedo.ProGet.Feeds.FeedConfig Assembly="ProGetCoreEx"><Properties FeedUsage="Mixed" HideFeedTips="0" HasRepackaged="False" PackageStatisticsEnabled="False" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" /></Inedo.ProGet.Feeds.FeedConfig>
      
      <Inedo.ProGet.Feeds.FeedConfig Assembly="ProGetCoreEx"><Properties FeedUsage="Mixed" HideFeedTips="0" HasRepackaged="False" PackageStatisticsEnabled="False" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" VulnerabilitiesEnabled="True" LicensesEnabled="True" UseWithProjects="True" /></Inedo.ProGet.Feeds.FeedConfig>
      
      <Inedo.ProGet.Feeds.FeedConfig Assembly="ProGetCoreEx"><Properties HideFeedTips="0" HasRepackaged="False" PackageStatisticsEnabled="False" RestrictPackageStatistics="False" DeploymentRecordsEnabled="True" UsageRecordsEnabled="True" OnDemandVulnerabilityInfo="0" VulnerabilitiesEnabled="False" LicensesEnabled="False" UseWithProjects="True" /></Inedo.ProGet.Feeds.FeedConfig>
      

      Are the NULLs allowed? Or is it something else perhaps?

      posted in Support
      F
      francesco.campanella_3733
    • RE: Unable to use the API

      @atripp Thanks for replying. I am going to try to run the commands against different feeds and see if that helps. I will also get in touch with the person that manages that instance and see if we can run that SQL command.

      posted in Support
      F
      francesco.campanella_3733
    • Unable to use the API

      We are using a self-hosted instance of ProGet 22.0.26. We are trying to download all the packages from all feeds, and therefore need to use the API.

      We have tried using the pgutil CLI, the Native API, HTTP Methods, and the .NET Inedo.ProGet nuget package, but none of them work.

      If I try to browse "https://#####/api/management/feeds/list" on my browser, I get "Persisted object is not a FeedConfig."

      If I try to use the nuget package, set up as follows:

      var creds = new ProGetApiKeyAuthentication("#####");
      var proGetClient = new ProGetClient("https://#####", creds);
      var createFeedResponse = await proGetClient.CreateFeedAsync("test-feed-from-dotnet", "nuget", CancellationToken.None);
      

      I get

      Unhandled exception. Inedo.ProGet.ProGetClientException: Server responded with BadRequest (400): Expected content-type application/json.                                                     
         at Inedo.ProGet.ProGetClient.CheckResponseAsync(HttpResponseMessage response, CancellationToken cancellationToken)                                                                        
         at Inedo.ProGet.ProGetClient.CreateFeedAsync(String feedName, String feedType, CancellationToken cancellationToken)                                                                       
         at NugetSync.ConsoleApp.Clients.TrakaProgetClient.ListPackagesAsync(String feed) in C:\Users\frcamp\RiderProjects\nuget-sync\src\NugetSync.ConsoleApp\Clients\TrakaProgetClient.cs:line 13
         at Program.<Main>$(String[] args) in C:\Users\frcamp\RiderProjects\nuget-sync\src\NugetSync.ConsoleApp\Program.cs:line 15                                                                 
         at Program.<Main>(String[] args)     
      

      If I try to list the feeds:

              var feedsResponse = proGetClient.ListFeedsAsync();
              var feeds = new List<ProGetFeed>();
              await foreach (var feed in feedsResponse)
              {
                  feeds.Add(feed);
              }
      

      I get:

      Unhandled exception. System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).                                                                         
         at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()                                                                                                                                             
         at System.Net.Http.Json.HttpClientJsonExtensions.<FromJsonStreamAsyncCore>g__Core|7_0[TValue](HttpClient client, Uri requestUri, JsonTypeInfo`1 jsonTypeInfo, CancellationToken cancellationToken)+MoveNext()
         at NugetSync.ConsoleApp.Clients.TrakaProgetClient.ListPackagesAsync(String feedName) in C:\Users\frcamp\RiderProjects\nuget-sync\src\NugetSync.ConsoleApp\Clients\TrakaProgetClient.cs:line 16               
         at NugetSync.ConsoleApp.Clients.TrakaProgetClient.ListPackagesAsync(String feedName) in C:\Users\frcamp\RiderProjects\nuget-sync\src\NugetSync.ConsoleApp\Clients\TrakaProgetClient.cs:line 16               
         at Program.<Main>$(String[] args) in C:\Users\frcamp\RiderProjects\nuget-sync\src\NugetSync.ConsoleApp\Program.cs:line 15                                                                                    
         at Program.<Main>(String[] args)
      

      When I try to make requests from postman, I always get a 401, no matter if I put the API Key in the headers or query.

      I have also tried one of the example PowerShell scripts on the docs:

      $feedName = "#####"
      $apiUrl = "https://#####/api/packages/$feedName/latest"
      $apiKey = "######"
      
      $queryParams = @{
          stableOnly = "true"
      }
      
      $headers = @{
          "X-API-Key" = $apiKey
      }
      
      $response = Invoke-RestMethod -Uri $apiUrl -Headers $headers -Method Get -Body $queryParams
      
      foreach ($package in $response) {
          Write-Host "Package Name: $($package.name)"
          Write-Host "Latest Version: $($package.version)"
          Write-Host "--------------------"
      }
      

      But always get a 401.

      I have also tried to use a pseudo key (username:password) but I get the same exact results with all methods (pgutil, nuget package, HTTP methods).

      How can we call the API for ProGet?

      posted in Support
      F
      francesco.campanella_3733