Returns all defined webhooks for the requesting application.
This API only returns webhooks that are applied to files or folders that are owned by the authenticated user. This means that an admin can not see webhooks created by a service account unless the admin has access to those folders, and vice versa.
1000
1000
The maximum number of items to return per page.
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii
Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination.
This requires usemarker
to be set to true
.
Returns a list of webhooks.
Returns an error if the application does not have the permission to manage webhooks.
An unexpected client error.
curl -X GET https://api.box.com/2.0/webhooks \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxCollectionMarkerBased<BoxWebhook> webhooks = await client.WebhooksManager.GetWebhooksAsync();
Iterable<BoxWebHook.Info> webhooks = BoxWebHook.all(api);
for (BoxWebHook.Info webhookInfo: webhooks) {
// Do something with the webhook.
}
webhooks = client.get_webhooks()
for webhook in webhooks:
print('The webhook ID is {0} and the address is {1}'.format(webhook.id, webhook.address))
client.webhooks.getAll()
.then(webhooks => {
/* webhooks -> {
next_marker: 'ZmlQZS0xLTE%3D',
entries:
[ { id: '1234',
type: 'webhook',
target: { id: '22222', type: 'folder' } },
{ id: '5678',
type: 'webhook',
target: { id: '11111', type: 'file' } } ],
limit: 2 }
*/
});
client.webhooks.list() { results in
switch results {
case let .success(iterator):
for i in 1 ... 10 {
iterator.next { result in
switch result {
case let .success(webhook):
print("Webhook \(webhook.id) was created at \(webhook.createdAt)")
case let .failure(error):
print(error)
}
}
}
case let .failure(error):
print(error)
}
}