ユーザーのWebhookのリストを取得
ユーザーのWebhookのリストを取得
認証済みユーザーのすべてのWebhookを取得するには、すべてのWebhookのリストを取得エンドポイントを使用します。
cURL
curl -i -X GET "https://api.box.com/2.0/webhooks" \
-H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.webhooks.getWebhooks();
Python Gen
client.webhooks.get_webhooks()
.NET Gen
await client.Webhooks.GetWebhooksAsync();
Java
Iterable<BoxWebHook.Info> webhooks = BoxWebHook.all(api);
for (BoxWebHook.Info webhookInfo: webhooks) {
// Do something with the webhook.
}
Python
webhooks = client.get_webhooks()
for webhook in webhooks:
print(f'The webhook ID is {webhook.id} and the address is {webhook.address}')
.NET
BoxCollectionMarkerBased<BoxWebhook> webhooks = await client.WebhooksManager.GetWebhooksAsync();
Node
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 }
*/
});
このAPIコールは、認証済みユーザーのWebhookのみをリストし、会社内の他のユーザーのWebhookはリストしません。