When a sheet is deleted, are any webhooks associated with that sheet deleted or disabled?

Options

Hello.

Imagine you have created a sheet, and used the webhook API to designate a webhook about that sheet, and enabled that webhook.

QUESTIONS:

  1. 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?
  2. Is the webhook associated with that sheet disabled or deleted?
  3. 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

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    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 itHere's more information:

    Cheers,

    Genevieve

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    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

Answers

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    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 itHere's more information:

    Cheers,

    Genevieve

  • sgolux
    sgolux ✭✭
    Options

    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?

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    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