Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.

Forum Discussion

devb's avatar
devb
New member | Level 1
5 months ago

How to filter events in dotnet SDK ?

I want to only query the team events of the event type file_download. I can't seem to figure out how I'm supposed to do it the way the developers intended. I can't find clear documentation on how to do this.

GetTeamEventsResult events = await _dropbox.TeamLog.GetEventsAsync(eventType: WHAT DO I PUT HERE);

I tried doing this: 

GetTeamEventsResult events = await _dropbox.TeamLog.GetEventsAsync(eventType: new EventTypeArg().AsFileDownload);

But that just returns all events and doesn't filter them.

2 Replies

  • DB-Des's avatar
    DB-Des
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 months ago

    Hi devb

    Thanks for the report! We're investigating this issue. We'll follow up here once we have an update.

  • DB-Des's avatar
    DB-Des
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 months ago

    Hi devb,

    Got a quick update for you. The "AsFileDownload" method, in this case, is for casting subtypes of existing instances of union types, not for setting new instances of parameters like EventTypeArg.FileDownload.

    For your use case, the correct use would be:

    GetTeamEventsResult events = await _dropbox.TeamLog.GetEventsAsync(eventType: EventTypeArg.FileDownload.Instance);

     

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,039 PostsLatest Activity: 5 hours ago
415 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!