Octopus.Client API does not provide external feeds' URI info when fetching feed object

Hi :slight_smile:

I’m on Octopus.Client version 6.0.2.0 with C# .NET Core and am using _repository.Feeds.FindByName(externalFeed.Name) to retrieve the external feed object. I’m able to get the name and feed type, but feed URI does not come up as a property for the object. How can I get this through the Octopus.Client API?

Note: I can get this information through a web request using https://server/api/feeds/Feeds-1190 (has feed uri, name, and feed type comes up as a string instead of object - as desired), but for a cleaner project we would like to stick to one method of connecting to the API.

Thanks :slight_smile:

Hi,

Thanks for reaching out! Could you try casting the feed object to a (NugetFeedResource) as the example below? That should tell the .NET compiler that you want the feed object that has the FeedUri property on it

            var feed = (NuGetFeedResource)baseRepository.Feeds.FindByName("MyFeed");
            Console.WriteLine(feed.FeedUri);

Let me know if that works for you

Thanks,
Dalmiro

Thanks Dalmiro, yes that works!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.