cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We're looking to hear about your experience when using Dropbox in a web browser. What parts of Dropbox feels very slow to you and takes a lot of time to get done? What are you trying to do in the Dropbox web browser when you experience slowness? Tell us right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1
Ask
2
Reply and help

Team Logs Get Events API is returning empty events

Team Logs Get Events API is returning empty events

liftbox
Explorer | Level 3

By trying follwing API with newly created dropbox for business trial account is not returing events

 

https://api.dropboxapi.com/2/team_log/get_events

 

Please Check Reponse as follows

{
"events": [],
"cursor": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"has_more": true
}
4 Replies 4

Re: Team Logs Get Events API is returning empty events

Здравко
Super Collaborator | Level 20

Hi @liftbox,

Dropbox API calls (and not only) retrieving array of information (such as 2/team_log/get_events) are asynchronous. Which mean it's not clear when exactly the information you are querying gonna be available and in what "pieces" size. That's why there is "has_more" in the result.


has_more Boolean Is true if there may be additional events that have not been returned yet. An additional call to get_events/continue can retrieve them. Note that has_more may be true, even if events is empty.

Just follow the documentation advices. 😉

Hope this helps.

Re: Team Logs Get Events API is returning empty events

liftbox
Explorer | Level 3

Hi @Здравко I tried with your suggestion still I was not able to get the events. I even tried sending following data 

 

 
{
"limit": 50,
"category": "logins"
}

Re: Team Logs Get Events API is returning empty events

Здравко
Super Collaborator | Level 20

Hi again @liftbox,

What exactly you have tried? Did you get in loop with 2/team_log/get_events/continue till the moment when "has_more" becomes false? 🤔 Make sure on each loop's pass you use the cursor from the last call result (either get_events or get_events/continue). Don't use the same cursor! What is the result of your last call? You didn't post it.

Re: Team Logs Get Events API is returning empty events

Greg-DB
Dropboxer

@liftbox Здравко is correct; the number of events returned per single response is not guaranteed. Due to various implementation details, a single page may even contain zero events. In any case, your app should always check the 'has_more' value and then call back to /2/team_log/get_events/continue if it's 'true', and so on each time, supplying the latest returned 'cursor'. 

 

Please read the /2/team_log/get_events and /2/team_log/get_events/continue documentation for information on using them.

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    Здравко Super Collaborator | Level 20
  • User avatar
    liftbox Explorer | Level 3
What do Dropbox user levels mean?
Need more support?