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?
I'm looking to get download file event for example as response when I use log\get_events after the request
I 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 webappfiles preview_files Preview files from the webapp
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:AACQ8S3d39L9O3hcbMb9V1emEp31fZAwge8Connection: closeAuthorization: Bearer <redacted>Content-Length: 0Content-Type: application/octet-streamHost: content.dropboxapi.comUser-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_101)Accept-Encoding: gzip,deflateDropbox-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:AACQ8S3d39L9O3hcbMb9V1emEp31fZAwge8Connection: closeAuthorization: Bearer <redacted>Content-Length: 4Content-Type: application/octet-streamHost: content.dropboxapi.comUser-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_101)Accept-Encoding: gzip,deflateDropbox-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\"}
Thanks, that's helpful! We'll look into it.
By the way, I've redacted it from your post, but for the sake of security, you should revoke that access token. You can do so by revoking access to the app entirel, here:
https://www.dropbox.com/team/admin/team_apps
(Note that that will revoke all access tokens for that team-app pair.)
Thanks!
By the way I have fimiliar problem with restore, I keep getting revert events