WebhooksModule
public class WebhooksModule
Provides management of Webhooks
-
Get all webhooks in an enterprise.
Declaration
Swift
public func list( marker: String? = nil, limit: Int? = nil, fields: [String]? = nil ) -> PagingIterator<Webhook>
Parameters
fields
Comma-separated list of fields to include in the response.
-
Get information about a webhook.
Declaration
Parameters
webhookId
The ID of the webhook on which to retrieve information.
fields
String array of fields to include in the response.
completion
Returns a Webhook response object if successful otherwise a BoxSDKError.
-
Update a webhook
Declaration
Parameters
webhookId
The ID of webhook to update
targetType
The type of box item that is associated with the webhook (i.e. file or folder)
targetId
The ID of the file or folder that is the target
triggers
String array of [triggers]
address
The notification URL to which Box sends messages when monitored events occur
fields
completion
Returns a Webhook response object if successful otherwise a BoxSDKError.
-
Create a webhook
Declaration
Parameters
targetType
The type of box item associated with the webhook (i.e. file or folder)
targetId
The ID of the file or folder that is the target
triggers
String array of [triggers]
address
The notification URL to which Box sends messages when monitored events occur
fields
completion
Returns a Webhook response object if successful otherwise a BoxSDKError.
-
Deletes a webhook.
Declaration
Swift
public func delete( webhookId: String, completion: @escaping Callback<Void> )
Parameters
webhookId
The ID of the webhook to delete.
completion
Returns Void if the comment is deleted.