Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Saar A.
9 years agoExplorer | Level 4
events followed by api request
hey, when I post download or get_preview request I get the content that I asked for, but I can't get event back. Is there anything to do about it?
Saar A.
9 years agoExplorer | Level 4
I'm looking to get download file event for example as response when I use log\get_events after the request
Greg-DB
Dropbox Community Moderator
9 years agoI see, thanks for clarifying. The /1/team/log/get_events endpoint doesn't return events for API calls like this. From the documentation, these events are only reported for the web app:
files download_files Download files from the webapp files preview_files Preview files from the webapp
- Saar A.9 years agoExplorer | Level 4thanks for the clarification. What about edit file or restore file?
Any time I edit file I recieve add_file and for restore file I get revert to previous revision. Any idea what to do?- Greg-DB9 years ago
Dropbox Community Moderator
Can you share the specific steps to reproduce these issues, and some sample output showing them? Thanks in advance!- Saar A.9 years agoExplorer | Level 4
Of course.
First, I realized that for editing a file I need to upload it with certain writeMode. I chose update(I assume that the rev is correct so I won't have any conflict).
Post https://content.dropboxapi.com/2/files/upload
Dropbox-API-Select-User: dbmid:AACQ8S3d39L9O3hcbMb9V1emEp31fZAwge8
Connection: close
Authorization: Bearer <redacted>
Content-Length: 0
Content-Type: application/octet-stream
Host: content.dropboxapi.com
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_101)
Accept-Encoding: gzip,deflate
Dropbox-API-Arg: {"path":"/test1.txt"}Next I will edit it by using upload with this arguments(got last rev by get_metadata):
Dropbox-API-Select-User: dbmid:AACQ8S3d39L9O3hcbMb9V1emEp31fZAwge8
Connection: close
Authorization: Bearer <redacted>
Content-Length: 4
Content-Type: application/octet-stream
Host: content.dropboxapi.com
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_101)
Accept-Encoding: gzip,deflate
Dropbox-API-Arg: {"path":"/test1.txt", "mode":{".tag":"update", "update":"e2e31fbcd7b"}}This is the 2 events I get in return(I deleted irrelevant fields):
{\"event_type\": \"add_files\", \"info_dict\": {\"actor_app_id\": 706966, \"is_dir\": false, \"file_id\": \"id:iyTVkdn9p0YAAAAAAAAG-Q\", \"host_id\": 3469059452, \"path\": \"/test1.txt\"}, \"event_type_description\": \"Added files\", \"event_category\": \"files\", \"time\": \"2016-10-27T05:01:13+00:00\",},
{\"event_type\": \"add_files\", \"info_dict\": {\"actor_app_id\": 706966, \"is_dir\": false, \"file_id\": \"id:iyTVkdn9p0YAAAAAAAAG-Q\", \"path\": \"/test1.txt\"}, \"event_type_description\": \"Added files\", \"event_category\": \"files\", \"time\": \"2016-10-27T05:05:21+00:00\"}
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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, Facebook or Instagram.
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!