box / box-python-sdk

Box SDK for Python
http://opensource.box.com/box-python-sdk/
Apache License 2.0
418 stars 215 forks source link

Can I get a list of files in a folder that has been moved to trash using a webhook event with a FOLDER.TRASHED trigger? #764

Closed mingchun-zhao closed 1 year ago

mingchun-zhao commented 1 year ago

Can I get a list of files in a folder that has been moved to trash using a webhook event with a FOLDER.TRASHED trigger? The webhook event caught by the FOLDER.TRASHED trigger seemed to contain only the ID information of the folder as shown below.

{
  "type": "webhook_event",
    "id": "xxx",
    "created_at": "2022-09-28T20:46:37-07:00",
    "trigger": "FOLDER.TRASHED",
    "webhook": {
      "id": "xxx",
      "type": "webhook"
    },
    "created_by": {
      "type": "user",
      "id": "xxx",
      "name": "xxx",
      "login": "xxx@yyy.com"
    },
    "source": {
      "id": "11111",
      "type": "folder"
    },
    "additional_info": []
}
arjankowski commented 1 year ago

Hi @mingchun-zhao ,

Unfortunately, our API does not currently support this.

As you mentioned, the FOLDER.TRASHED webhook event only contains the folder id and type with no additional information.

Additionally, when the folder is in the Trash, you cannot view its contents as well.

If you have more questions about our API, please go to our forum, when you can ask for more information.

Regards, Artur

mingchun-zhao commented 1 year ago

Hi Artur,

Thank you for your reply and additional information. I got it.

Regards, zhao