cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

request_id in team_log/get_events and associating API actions with events

request_id in team_log/get_events and associating API actions with events

dtheodor
Explorer | Level 3

I am developing Dropbox apps, utilizing both User and Business endpoints to perform actions on files, as well as the event log for analytics purposes. I am looking to associate file actions performed by the app through API calls (e.g., a file download through the "/files/download" endpoint) with the corresponding events as they appear in the event log (e.g. the corresponding "file_download" event).

 

As far as I can tell, the only deterministic way to associate API actions with their correspondings events is through the "origin.access_method.api.request_id" attribute of the events. There's an undocumented "x-dropbox-request-id" header returned in all HTTP POST API requests to dropbox, which must carry the same value with the event field.

 

I have some reservations about whether this works, because from a quick look at event data I retrieve from the API, only 70% of events with the api access method carry a proper request_id, such as "dbarid:d34db33f890..." . The rest of them have a placeholder value of "dbarid:". There's nothing special I can point out about the events missing the request-id, they are recent events of a multitude of event types. Also the fact that the request-id header is undocumented is discouraging.

 

Is this the recommended way of doing this? Why am I seeing these numbers?

1 Reply 1

Greg-DB
Dropbox Staff

Unfortunately, as 'X-Dropbox-Request-Id' isn't officially documented or guaranteed, I can't recommend relying on it like this.

 

It can be useful when working with Dropbox to debug issues, but we don't currently guarantee it, due to some various backend details.

 

I'll send this along as a feature request to make this reliable and documented, but I can't guarantee if/when that might be done. Apologies I don't have a better answer for you!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?