spo list webhook set¶
Updates the specified webhook
Usage¶
spo list webhook set [options]
Options¶
Option | Description |
---|---|
--help |
output usage information |
-u, --webUrl <webUrl> |
URL of the site where the list which contains the webhook is located |
-l, --listId [listId] |
ID of the list which contains the webhook which should be updated. Specify either listId or listTitle but not both |
-t, --listTitle [listTitle] |
Title of the list which contains the webhook which should be updated. Specify either listId or listTitle but not both |
-i, --id [id] |
ID of the webhook to update |
-n, --notificationUrl [notificationUrl] |
The new notification url |
-e, --expirationDateTime [expirationDateTime] |
The new expiration date |
-o, --output [output] |
Output type. json|text . Default text |
--verbose |
Runs command with verbose logging |
--debug |
Runs command with debug logging |
Important
Before using this command, log in to a SharePoint Online site, using the spo login command.
Remarks¶
To update a webhook, you have to first log in to a SharePoint Online site using the spo login command, eg. spo login https://contoso.sharepoint.com
.
If the specified id
doesn't refer to an existing webhook,
you will get a 404 - "404 FILE NOT FOUND"
error.
Examples¶
Update the notification url of a webhook with ID cc27a922-8224-4296-90a5-ebbc54da2e81 which belongs to a list with ID 0cd891ef-afce-4e55-b836-fce03286cccf located in site https://contoso.sharepoint.com/sites/ninja to https://contoso-functions.azurewebsites.net/webhook
spo list webhook set --webUrl https://contoso.sharepoint.com/sites/ninja --listId 0cd891ef-afce-4e55-b836-fce03286cccf --id cc27a922-8224-4296-90a5-ebbc54da2e81 --notificationUrl https://contoso-functions.azurewebsites.net/webhook
Update the expiration date of a webhook with ID cc27a922-8224-4296-90a5-ebbc54da2e81 which belongs to a list with title Documents located in site https://contoso.sharepoint.com/sites/ninja to October 9th, 2018 at 6:15 PM
spo list webhook set --webUrl https://contoso.sharepoint.com/sites/ninja --listTitle Documents --id cc27a922-8224-4296-90a5-ebbc54da2e81 --expirationDateTime 2018-10-09T18:15
From the webhook with ID cc27a922-8224-4296-90a5-ebbc54da2e81 which belongs to a list with title Documents located in site https://contoso.sharepoint.com/sites/ninja update the notification url to https://contoso-functions.azurewebsites.net/webhook and the expiration date to March 2nd, 2019
spo list webhook set --webUrl https://contoso.sharepoint.com/sites/ninja --listTitle Documents --id cc27a922-8224-4296-90a5-ebbc54da2e81 --notificationUrl https://contoso-functions.azurewebsites.net/webhook --expirationDateTime 2019-03-02