public class WebhooksManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WebhooksManager.Builder |
| Modifier and Type | Field and Description |
|---|---|
Authentication |
auth |
NetworkSession |
networkSession |
| Modifier | Constructor and Description |
|---|---|
|
WebhooksManager() |
protected |
WebhooksManager(WebhooksManager.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
Webhook |
createWebhook(CreateWebhookRequestBody requestBody)
Creates a webhook.
|
Webhook |
createWebhook(CreateWebhookRequestBody requestBody,
CreateWebhookHeaders headers)
Creates a webhook.
|
void |
deleteWebhookById(String webhookId)
Deletes a webhook.
|
void |
deleteWebhookById(String webhookId,
DeleteWebhookByIdHeaders headers)
Deletes a webhook.
|
Authentication |
getAuth() |
NetworkSession |
getNetworkSession() |
Webhook |
getWebhookById(String webhookId)
Retrieves a specific webhook.
|
Webhook |
getWebhookById(String webhookId,
GetWebhookByIdHeaders headers)
Retrieves a specific webhook.
|
Webhooks |
getWebhooks()
Returns all defined webhooks for the requesting application.
|
Webhooks |
getWebhooks(GetWebhooksHeaders headers)
Returns all defined webhooks for the requesting application.
|
Webhooks |
getWebhooks(GetWebhooksQueryParams queryParams)
Returns all defined webhooks for the requesting application.
|
Webhooks |
getWebhooks(GetWebhooksQueryParams queryParams,
GetWebhooksHeaders headers)
Returns all defined webhooks for the requesting application.
|
Webhook |
updateWebhookById(String webhookId)
Updates a webhook.
|
Webhook |
updateWebhookById(String webhookId,
UpdateWebhookByIdHeaders headers)
Updates a webhook.
|
Webhook |
updateWebhookById(String webhookId,
UpdateWebhookByIdRequestBody requestBody)
Updates a webhook.
|
Webhook |
updateWebhookById(String webhookId,
UpdateWebhookByIdRequestBody requestBody,
UpdateWebhookByIdHeaders headers)
Updates a webhook.
|
static boolean |
validateMessage(String body,
Map<String,String> headers,
String primaryKey)
Validate a webhook message by verifying the signature and the delivery timestamp
|
static boolean |
validateMessage(String body,
Map<String,String> headers,
String primaryKey,
Integer maxAge)
Validate a webhook message by verifying the signature and the delivery timestamp
|
static boolean |
validateMessage(String body,
Map<String,String> headers,
String primaryKey,
String secondaryKey)
Validate a webhook message by verifying the signature and the delivery timestamp
|
static boolean |
validateMessage(String body,
Map<String,String> headers,
String primaryKey,
String secondaryKey,
Integer maxAge)
Validate a webhook message by verifying the signature and the delivery timestamp
|
public Authentication auth
public NetworkSession networkSession
public WebhooksManager()
protected WebhooksManager(WebhooksManager.Builder builder)
public Webhooks getWebhooks()
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.
public Webhooks getWebhooks(GetWebhooksQueryParams queryParams)
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.
queryParams - Query parameters of getWebhooks methodpublic Webhooks getWebhooks(GetWebhooksHeaders headers)
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.
headers - Headers of getWebhooks methodpublic Webhooks getWebhooks(GetWebhooksQueryParams queryParams, GetWebhooksHeaders headers)
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.
queryParams - Query parameters of getWebhooks methodheaders - Headers of getWebhooks methodpublic Webhook createWebhook(CreateWebhookRequestBody requestBody)
requestBody - Request body of createWebhook methodpublic Webhook createWebhook(CreateWebhookRequestBody requestBody, CreateWebhookHeaders headers)
requestBody - Request body of createWebhook methodheaders - Headers of createWebhook methodpublic Webhook getWebhookById(String webhookId)
webhookId - The ID of the webhook. Example: "3321123"public Webhook getWebhookById(String webhookId, GetWebhookByIdHeaders headers)
webhookId - The ID of the webhook. Example: "3321123"headers - Headers of getWebhookById methodpublic Webhook updateWebhookById(String webhookId)
webhookId - The ID of the webhook. Example: "3321123"public Webhook updateWebhookById(String webhookId, UpdateWebhookByIdRequestBody requestBody)
webhookId - The ID of the webhook. Example: "3321123"requestBody - Request body of updateWebhookById methodpublic Webhook updateWebhookById(String webhookId, UpdateWebhookByIdHeaders headers)
webhookId - The ID of the webhook. Example: "3321123"headers - Headers of updateWebhookById methodpublic Webhook updateWebhookById(String webhookId, UpdateWebhookByIdRequestBody requestBody, UpdateWebhookByIdHeaders headers)
webhookId - The ID of the webhook. Example: "3321123"requestBody - Request body of updateWebhookById methodheaders - Headers of updateWebhookById methodpublic void deleteWebhookById(String webhookId)
webhookId - The ID of the webhook. Example: "3321123"public void deleteWebhookById(String webhookId, DeleteWebhookByIdHeaders headers)
webhookId - The ID of the webhook. Example: "3321123"headers - Headers of deleteWebhookById methodpublic static boolean validateMessage(String body, Map<String,String> headers, String primaryKey)
body - The request body of the webhook messageheaders - The headers of the webhook messageprimaryKey - The primary signature to verify the message withpublic static boolean validateMessage(String body, Map<String,String> headers, String primaryKey, String secondaryKey)
body - The request body of the webhook messageheaders - The headers of the webhook messageprimaryKey - The primary signature to verify the message withsecondaryKey - The secondary signature to verify the message withpublic static boolean validateMessage(String body, Map<String,String> headers, String primaryKey, Integer maxAge)
body - The request body of the webhook messageheaders - The headers of the webhook messageprimaryKey - The primary signature to verify the message withmaxAge - The maximum age of the message in seconds, defaults to 10 minutespublic static boolean validateMessage(String body, Map<String,String> headers, String primaryKey, String secondaryKey, Integer maxAge)
body - The request body of the webhook messageheaders - The headers of the webhook messageprimaryKey - The primary signature to verify the message withsecondaryKey - The secondary signature to verify the message withmaxAge - The maximum age of the message in seconds, defaults to 10 minutespublic Authentication getAuth()
public NetworkSession getNetworkSession()