Webhook metadata for FILE.DELETE/TRASHED doesn't include name
回答済みI have setup webhook (via API) on a particular folder to monitor for FILE.DELETED or FILE.TRASHED.
When a file is deleted from that folder, the metadata I receive from the BOX doesn't include the file name that got TRASHED. Json element "source.name" is available on TRASHEd/DELETED.
Metadata is shown below.
The catch is I can't turnaround and get file name using BoxFile API using file-id (source.id) because the file is already trashed.
Any suggestions on how to get around this?
{ "type": "webhook_event", "id": "e17e66e3-24a2-480d-b5e8-aaaaaaa", "created_at": "2019-03-20T18:48:52+00:00", "trigger": "FILE.TRASHED", "webhook": { "id": "15555555", "type": "webhook" }, "created_by": { "type": "user", "id": "777777773", "name": "John", "login": "***email address removed for privacy***" }, "source": { "id": "425130999999", "type": "file" }, "additional_info": [] }
-
To get additional information about the trashed item, check this page out https://developer.box.com/reference#get-a-trashed-file, you use the File ID that is returned from box in this GetTrashedFile method and you'll get extra information like the file name, parent, creator etc.
サインインしてコメントを残してください。
コメント
3件のコメント