OrganizationWebhookApi
extends AbstractApi
in package
Webhooks allow you to collect information about events that happen in your Crowdin Enterprise organization.
You can select the request type, content type, and add a custom payload, which allows you to create integrations with other systems on your own.
Table of Contents
Methods
- create() : OrganizationWebhook|null
- Add Organization Webhook
- delete() : mixed
- Delete Organization Webhook
- get() : OrganizationWebhook
- Get Organization Webhook
- getDelivery() : WebhookDelivery|null
- Get Webhook Delivery
- list() : ModelCollection
- List Organization Webhooks
- listAllDeliveries() : ModelCollection
- List All Webhook Deliveries
- listDeliveries() : ModelCollection
- List Webhook Deliveries
- resendDelivery() : WebhookDelivery|null
- Resend Webhook Delivery
- test() : WebhookTestResult|null
- Test Webhook
- update() : OrganizationWebhook|null
- Update Organization Webhook
Methods
create()
Add Organization Webhook
public
create(array<string|int, mixed> $data) : OrganizationWebhook|null
Parameters
- $data : array<string|int, mixed>
-
string $data[name] required
string $data[url] required
string[] $data[events] required Enum: "project.created" "project.deleted" Enterprise onyl enum: "project.created" "project.deleted" "group.created" "group.deleted"
string $data[requestType] required Enum: "POST" "GET"
boolean $data[isActive]
boolean $data[batchingEnabled]
string $data[contentType] Default: "application/json" Enum: "multipart/form-data" "application/json" "application/x-www-form-urlencoded"
array $data[headers]
array $data[payload]
Tags
Return values
OrganizationWebhook|nulldelete()
Delete Organization Webhook
public
delete(int $organizationWebhookId) : mixed
Parameters
- $organizationWebhookId : int
Tags
get()
Get Organization Webhook
public
get(int $organizationWebhookId) : OrganizationWebhook
Parameters
- $organizationWebhookId : int
Tags
Return values
OrganizationWebhookgetDelivery()
Get Webhook Delivery
public
getDelivery(int $organizationWebhookId, int $deliveryId) : WebhookDelivery|null
Parameters
- $organizationWebhookId : int
- $deliveryId : int
Tags
Return values
WebhookDelivery|nulllist()
List Organization Webhooks
public
list([array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $params : array<string|int, mixed> = []
Tags
Return values
ModelCollectionlistAllDeliveries()
List All Webhook Deliveries
public
listAllDeliveries([array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $params : array<string|int, mixed> = []
-
string $params[webhookIds] One ID or comma-separated list, deleted webhooks included
string $params[status] success or failed
string $params[events] One event or comma-separated list
string $params[createdAfter] ISO 8601 date
string $params[createdBefore] ISO 8601 date
integer $params[limit]
integer $params[offset]
Tags
Return values
ModelCollectionlistDeliveries()
List Webhook Deliveries
public
listDeliveries(int $organizationWebhookId[, array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $organizationWebhookId : int
- $params : array<string|int, mixed> = []
-
string $params[status] success or failed
string $params[events] One event or comma-separated list
string $params[createdAfter] ISO 8601 date
string $params[createdBefore] ISO 8601 date
integer $params[limit]
integer $params[offset]
Tags
Return values
ModelCollectionresendDelivery()
Resend Webhook Delivery
public
resendDelivery(int $organizationWebhookId, int $deliveryId) : WebhookDelivery|null
Parameters
- $organizationWebhookId : int
- $deliveryId : int
Tags
Return values
WebhookDelivery|null —The new delivery
test()
Test Webhook
public
test(int $organizationWebhookId[, array<string|int, mixed> $data = [] ]) : WebhookTestResult|null
Parameters
- $organizationWebhookId : int
- $data : array<string|int, mixed> = []
-
string $data[event] One of the webhook events. Default is the first event of the webhook
Tags
Return values
WebhookTestResult|nullupdate()
Update Organization Webhook
public
update(OrganizationWebhook $organizationWebhook) : OrganizationWebhook|null
Parameters
- $organizationWebhook : OrganizationWebhook