When a sheet is deleted, are any webhooks associated with that sheet deleted or disabled?
Hello.
Imagine you have created a sheet, and used the webhook API to designate a webhook about that sheet, and enabled that webhook.
QUESTIONS:
- If you delete the sheet, are you guaranteed a webhook event for a deleted sheet? And if so, how would you know the event was about the sheet deletion?
- Is the webhook associated with that sheet disabled or deleted?
- Under the hood, we know that the deleted sheet goes into the Deleted Items folder. And could be later undeleted. If you undelete the sheet, is that webhook still there, and if so can it be used? Or is it gone and would need to be re-built from scratch?
Best Answers
-
Hi @sgolux
When a sheet is deleted, the webhook will become disabled with a status of
DISABLED_SCOPE_INACCESSIBLE
.A status change callback will occur to indicate that the webhook status has changed with a
scopeObjectId
containing the ID of the deleted sheet.The webhook is automatically re-enabled if access to the sheet is restored (so yes, if the deleted sheet is restored).
You can find this information under Webhook Status in the API Documentation, under the "Disabled_Scope_Inaccessible" status, here: https://smartsheet.redoc.ly/tag/webhooksDescription#section/Webhook-Status
As a note, I believe that this is the same behaviour if you lose sharing access to the sheet as well, since you will no longer have access to that data.
If it is important to know the difference between sheet being deleted and loss of sharing access, I would suggest looking at that via event reporting, if your plan has access to it. Here's more information:
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Hi @sgolux
You are correct: if you have the Publish URL active on a sheet, and then delete the sheet, when you recover that deleted sheet the Publish URLs will default to being turned off. You would need to go into that recovered sheet and turn Publishing back on again.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Answers
-
Hi @sgolux
When a sheet is deleted, the webhook will become disabled with a status of
DISABLED_SCOPE_INACCESSIBLE
.A status change callback will occur to indicate that the webhook status has changed with a
scopeObjectId
containing the ID of the deleted sheet.The webhook is automatically re-enabled if access to the sheet is restored (so yes, if the deleted sheet is restored).
You can find this information under Webhook Status in the API Documentation, under the "Disabled_Scope_Inaccessible" status, here: https://smartsheet.redoc.ly/tag/webhooksDescription#section/Webhook-Status
As a note, I believe that this is the same behaviour if you lose sharing access to the sheet as well, since you will no longer have access to that data.
If it is important to know the difference between sheet being deleted and loss of sharing access, I would suggest looking at that via event reporting, if your plan has access to it. Here's more information:
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Thanks @Genevieve P. that is useful. Also useful to note about sharing. I think from my experience that publication does NOT work the same way, so if you delete and then undelete a published sheet, I think it won't magically be re-published again. Do you think that is correct?
-
Hi @sgolux
You are correct: if you have the Publish URL active on a sheet, and then delete the sheet, when you recover that deleted sheet the Publish URLs will default to being turned off. You would need to go into that recovered sheet and turn Publishing back on again.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives