Interface WebhookResources
-
public interface WebhookResources
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Webhook
createWebhook(Webhook webhook)
Creates a new Webhook.void
deleteWebhook(long webhookId)
Delete a webhook.Webhook
getWebhook(long webhookId)
Gets the Webhook specified in the URL.PagedResult<Webhook>
listWebhooks(PaginationParameters paging)
Gets the list of all Webhooks that the user owns (if a user generated token was used to make the request) or the list of all Webhooks associated with the third-party app (if a third-party app made the request).WebhookSharedSecret
resetSharedSecret(long webhookId)
Resets the shared secret for the specified Webhook.Webhook
updateWebhook(Webhook webhook)
Updates the webhooks specified in the URL.
-
-
-
Method Detail
-
listWebhooks
PagedResult<Webhook> listWebhooks(PaginationParameters paging) throws SmartsheetException
Gets the list of all Webhooks that the user owns (if a user generated token was used to make the request) or the list of all Webhooks associated with the third-party app (if a third-party app made the request). Items in the response are ordered by API Client name, then Webhook name, then creation date.
It mirrors to the following Smartsheet REST API method: GET /webhooks
- Parameters:
paging
- the object containing the pagination parameters- Returns:
- IndexResult object containing an array of Webhook objects.
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
getWebhook
Webhook getWebhook(long webhookId) throws SmartsheetException
Gets the Webhook specified in the URL.
It mirrors to the following Smartsheet REST API method: GET /webhooks/{webhookId}
- Parameters:
webhookId
- the Id of the webhook- Returns:
- the webhook resource.
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
createWebhook
Webhook createWebhook(Webhook webhook) throws SmartsheetException
Creates a new Webhook.
It mirrors to the following Smartsheet REST API method: POST /webhooks
- Parameters:
webhook
- the webhook to be created- Returns:
- the webhook resource.
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
updateWebhook
Webhook updateWebhook(Webhook webhook) throws SmartsheetException
Updates the webhooks specified in the URL.
It mirrors to the following Smartsheet REST API method: PUT /webhooks/{webhookId}
- Parameters:
webhook
- the webhook to update- Returns:
- the updated webhook resource.
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
deleteWebhook
void deleteWebhook(long webhookId) throws SmartsheetException
Delete a webhook.
It mirrors to the following Smartsheet REST API method: DELETE /webhooks/{webhookId}
- Parameters:
webhookId
- the webhook Id- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
resetSharedSecret
WebhookSharedSecret resetSharedSecret(long webhookId) throws SmartsheetException
Resets the shared secret for the specified Webhook. For more information about how a shared secret is used, see Authenticating Callbacks.
It mirrors to the following Smartsheet REST API method: POST /webhooks/{webhookId}/resetsharedsecret
- Parameters:
webhookId
- the webhook Id- Returns:
- the Webhook shared secret
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
-