sift/webhooks/v1/webhooks.proto
BatchCreateWebhookLogsRequest
The request for a call toWebhookService_BatchCreateWebhookLogs to create a batch of webhook logs.
| Field | Type | Label | Description |
|---|---|---|---|
| requests | CreateWebhookLogRequest | repeated |
BatchCreateWebhookLogsResponse
The response of a call toWebhookService_BatchCreateWebhookResponse.
CreateWebhookLogRequest
Request to create a single webhook log entry.| Field | Type | Label | Description |
|---|---|---|---|
| webhook_id | string | ||
| event_id | string | ||
| retry_attempt_number | uint32 | ||
| status | WebhookLogStatus | ||
| payload | string | optional | |
| error_reason | string | optional | |
| sent_date | google.protobuf.Timestamp |
CreateWebhookRequest
The request for a call toWebhookService_CreateWebhook to create a webhook.
| Field | Type | Label | Description |
|---|---|---|---|
| name | string | ||
| target_url | string | ||
| event_type | WebhookEventType | ||
| payload | string | optional | |
| http_headers | WebhookHttpHeader | repeated |
CreateWebhookResponse
The response of a call toWebhookService_CreateWebhook.
| Field | Type | Label | Description |
|---|---|---|---|
| webhook | Webhook |
CreateWebhookSignatureKeyRequest
The request for a call toWebhookService_CreateWebhookSignatureKey to create a webhook signature key.
CreateWebhookSignatureKeyResponse
The response for a call toWebhookService_CreateWebhookSignatureKey. The active field indicates whether
or not whether the key is currently active.
| Field | Type | Label | Description |
|---|---|---|---|
| signature_key | WebhookSignatureKey |
GetWebhookRequest
The request for a call toWebhookService_GetWebhook to retrieve a webhook.
| Field | Type | Label | Description |
|---|---|---|---|
| webhook_id | string |
GetWebhookResponse
The response of a call toWebhookService_GetWebhook.
| Field | Type | Label | Description |
|---|---|---|---|
| webhook | Webhook |
GetWebhookSignatureKeyRequest
The request for a call toWebhookService_GetWebhookSignatureKey to retrieve the current webhook signature key.
| Field | Type | Label | Description |
|---|---|---|---|
| organization_id | string | Optional organization ID. |
GetWebhookSignatureKeyResponse
The response for a call toWebhookService_GetWebhookSignatureKey. The active field indicates whether
or not whether the key is currently active.
| Field | Type | Label | Description |
|---|---|---|---|
| signature_key | WebhookSignatureKey |
ListWebhookLogsRequest
The request for a call toWebhookService_ListWebhookLogs to retrieve and filter webhook logs.
| Field | Type | Label | Description |
|---|---|---|---|
| page_size | uint32 | The maximum number of webhook logs to return. The service may return fewer than this value. If unspecified, at most 50 runs will be returned. The maximum value is 1000. | |
| page_token | string | A page token, received from a previous ListWebhookLogs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListWebhookLogs must match the call that provided the page token. | |
| filter | string | A Common Expression Language (CEL) filter string. The available fields to filter by are webhook_id, status. | |
| order_by | string | How to order the retrieved webhook logs. Formatted as a comma-separated string i.e. “FIELD_NAME[ desc],…”. Available field to order_by is created_date. If left empty, items are ordered by created_date in ascending order (oldest-first). For more information about the format of this field, read this Example: “created_date desc” |
ListWebhookLogsResponse
The response of a call toWebhookService_ListWebhookLogsResponse.
| Field | Type | Label | Description |
|---|---|---|---|
| logs | WebhookLog | repeated | |
| next_page_token | string |
ListWebhooksRequest
The request for a call toWebhookService_ListWebhooks to retrieve and filter webhooks.
| Field | Type | Label | Description |
|---|---|---|---|
| page_size | uint32 | The maximum number of webhooks to return. The service may return fewer than this value. If unspecified, at most 50 runs will be returned. The maximum value is 1000. | |
| page_token | string | A page token, received from a previous ListWebhooks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListWebhooks must match the call that provided the page token. | |
| filter | string | A Common Expression Language (CEL) filter string. Available fields to filter by are webhook_id, name, and event_type. | |
| order_by | string | How to order the retrieved webhooks. Formatted as a comma-separated string i.e. “FIELD_NAME[ desc],…”. Available field to order_by is created_date. If left empty, items are ordered by created_date in ascending order (oldest-first). For more information about the format of this field, read this Example: “created_date desc” |
ListWebhooksResponse
The response of a call toWebhookService_ListWebhooks.
| Field | Type | Label | Description |
|---|---|---|---|
| webhooks | Webhook | repeated | |
| next_page_token | string |
RotateWebhookSignatureKeyRequest
The request for a call toWebhookService_RotateWebhookSignatureKey replace the current webhook signature key
with a new one. The activation state of the new signature key will be inherited from the previous key. If no key
exists then this will return an error - see WebhookService_CreateWebhookSignatureKey.
RotateWebhookSignatureKeyResponse
The response for a call toWebhookService_RotateWebhookSignatureKey. The active field indicates whether
or not whether the key is currently active.
| Field | Type | Label | Description |
|---|---|---|---|
| signature_key | WebhookSignatureKey |
TestWebhookRequest
The request for a call toWebhookService_TestWebhook to test an existing webhook
or a webhook create request.
| Field | Type | Label | Description |
|---|---|---|---|
| oneof form.webhook_id | string | ||
| oneof form.webhook | Webhook | ||
| oneof form.create_request | CreateWebhookRequest |
TestWebhookResponse
The response of a call toWebhookService_TestWebhook. The response code and body will come from the HTTP response
from the target URL.
| Field | Type | Label | Description |
|---|---|---|---|
| http_response_code | uint32 | ||
| http_response_body | bytes |
ToggleWebhookSignatureKeyActivationRequest
The request for a call toWebhookService_ToggleWebhookSignatureKeyActivation to enable or disable the current
webhook signature key. Set enable to true to activate the signature key, and false to deactivate.
| Field | Type | Label | Description |
|---|---|---|---|
| enable | bool |
ToggleWebhookSignatureKeyActivationResponse
The response for a call toWebhookService_ToggleWebhookSignatureKeyActivation.
| Field | Type | Label | Description |
|---|---|---|---|
| signature_key | WebhookSignatureKey |
UpdateWebhookRequest
The request for a call toWebhookService_UpdateWebhook to update a webhook.
| Field | Type | Label | Description |
|---|---|---|---|
| webhook | Webhook | The webhook to update. The webhook’s webhook_id field is used to identify the webhook to update and is required. | |
| update_mask | google.protobuf.FieldMask | The list of fields to be updated. The fields available to be updated are ‘target_url’, ‘name’, ‘event_type’, ‘payload’, ‘http_headers’, ‘archived_date’. |
UpdateWebhookResponse
The response of a call toWebhookService_UpdateWebhook. To archive a webhook, specify archived_date
in the update mask as well as a non-null value for archived_date in the webhook object.
To unarchive a webhook, specify archived_date in the update mask and a null value for
archived_date in the webhook object.
| Field | Type | Label | Description |
|---|---|---|---|
| webhook | Webhook |
Webhook
| Field | Type | Label | Description |
|---|---|---|---|
| webhook_id | string | ||
| organization_id | string | ||
| target_url | string | ||
| name | string | ||
| event_type | WebhookEventType | ||
| payload | string | optional | |
| created_date | google.protobuf.Timestamp | ||
| modified_date | google.protobuf.Timestamp | ||
| archived_date | google.protobuf.Timestamp | optional | |
| created_by_user_id | string | ||
| modified_by_user_id | string | ||
| http_headers | WebhookHttpHeader | repeated |
WebhookHttpHeader
| Field | Type | Label | Description |
|---|---|---|---|
| name | string | ||
| value | string |
WebhookLog
| Field | Type | Label | Description |
|---|---|---|---|
| webhook_log_id | string | ||
| webhook_id | string | ||
| event_id | string | ||
| organization_id | string | ||
| status | WebhookLogStatus | ||
| payload | string | optional | |
| retry_attempt_number | uint32 | ||
| error_reason | string | optional | |
| sent_date | google.protobuf.Timestamp | ||
| created_date | google.protobuf.Timestamp | ||
| modified_date | google.protobuf.Timestamp | ||
| created_by_user_id | string | ||
| modified_by_user_id | string |
WebhookSignatureKey
| Field | Type | Label | Description |
|---|---|---|---|
| signature_key | string | ||
| active | bool | ||
| created_date | google.protobuf.Timestamp | ||
| modified_date | google.protobuf.Timestamp | ||
| created_by_user_id | string | ||
| modified_by_user_id | string |
WebhookEventType
| Name | Number | Description |
|---|---|---|
| WEBHOOK_EVENT_TYPE_UNSPECIFIED | 0 | |
| WEBHOOK_EVENT_TYPE_RULE_VIOLATION | 1 |
WebhookLogStatus
| Name | Number | Description |
|---|---|---|
| WEBHOOK_LOG_STATUS_UNSPECIFIED | 0 | |
| WEBHOOK_LOG_STATUS_SENT | 1 | |
| WEBHOOK_LOG_STATUS_FAILED | 2 | |
| WEBHOOK_LOG_STATUS_RETRYING | 3 |
WebhookService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetWebhook | GetWebhookRequest | GetWebhookResponse | Retrieve a webhook by ID. |
| CreateWebhook | CreateWebhookRequest | CreateWebhookResponse | Create a webhook. |
| UpdateWebhook | UpdateWebhookRequest | UpdateWebhookResponse | Update select fields of an existing webhook. |
| ListWebhooks | ListWebhooksRequest | ListWebhooksResponse | Retrieve and optionally filter a list of webhooks. |
| TestWebhook | TestWebhookRequest | TestWebhookResponse | Test an existing webhook or a webhook create request. This RPC will attempt to send an actual webhook with the provided parameters and forward back the response from the target. |
| CreateWebhookSignatureKey | CreateWebhookSignatureKeyRequest | CreateWebhookSignatureKeyResponse | Create an webhook signature key. If a webhook signature key is active, the bodies of all webhooks will be signed using the signature key with HMAC-SHA-256. The signature generated will then included in the X-Sift-Signature HTTP header. Only one key can be held per organization. If an existing key exists, then this will simply return it. See WebhookService_RotateWebhookSignatureKey to rotate the key. |
| GetWebhookSignatureKey | GetWebhookSignatureKeyRequest | GetWebhookSignatureKeyResponse | Retrieve the current webhook signature key. Will return a not found error if one doesn’t yet exist. |
| ToggleWebhookSignatureKeyActivation | ToggleWebhookSignatureKeyActivationRequest | ToggleWebhookSignatureKeyActivationResponse | Set the activation state of the organization’s current webhook signature key. Will return a not found error if one doesn’t yet exist. |
| RotateWebhookSignatureKey | RotateWebhookSignatureKeyRequest | RotateWebhookSignatureKeyResponse | Generate a new webhook signature key and replace the previous one. The activation state of the new key will match the activation state of the previous. |
| BatchCreateWebhookLogs | BatchCreateWebhookLogsRequest | BatchCreateWebhookLogsResponse | Create a batch of webhook logs. Users should not have to call this directly. |
| ListWebhookLogs | ListWebhookLogsRequest | ListWebhookLogsResponse | Retrieve and optionally filter a list of webhook logs. |