Client Library FindMany finds all

I am attempting to use the .net client library to retrieve a subset of deployments based on a simple search function (done within the past week). Watching Fiddler I see that the Client is not sending anything related to my search through the API and is instead retrieving all deployments. This won’t work since there are many thousand deployments and getting them 30 will take forever. Is this intended behavior for FindMany?

For my purpose I may be able to use the ProjectPulse resource but this doesn’t seem to be exposed within the Client yet.

Note that my purpose is to attempt to run OctoDiff across all recent deployments. Assuming I get this working I’d be happy to contribute my code.

Hi,

You are correct - FindAll just pages through the deployments, then runs the filter locally. For deployments, I’m fairly sure we return them from most recent to least recent, so once you find one older than a week you should be able to stop searching (you might need to page through the results yourself rather than use FindAll though).

In 2.5 you’ll be able to query tasks and provide filters for environments and projects (that are applied on the server) which might help.

Hope that helps!

Paul