Module crowdin_api.api_resources.webhooks.resource
Classes
class WebhooksResource (requester: APIRequester, project_id: Optional[int] = None, page_size=25)
-
Resource for Webhooks.
Webhooks allow you to collect information about events that happen in your Crowdin projects. 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.
You can configure webhooks for the following events: -project file is fully translated -project file is fully reviewed -all strings in project are translated -all strings in project are reviewed -final translation of string is updated (using Replace in suggestions feature) -source string is added -source string is updated -source string is deleted -source string is translated -translation for source string is updated (using Replace in suggestions feature) -one of translations is deleted -translation for string is approved -approval for previously added translation is removed
Use API to create, modify, and delete specific webhooks.
Link to documentation: https://developer.crowdin.com/api/v2/#tag/Webhooks
Ancestors
Methods
def add_webhook(self, name: str, url: str, events: Iterable[WebhookEvents], requestType: WebhookRequestType, projectId: Optional[int] = None, isActive: Optional[bool] = None, batchingEnabled: Optional[bool] = None, contentType: Optional[WebhookContentType] = None, headers: Optional[Dict[~KT, ~VT]] = None, payload: Optional[Dict[~KT, ~VT]] = None)
-
Add Webhook.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.projects.webhooks.post
def delete_webhook(self, webhookId: int, projectId: Optional[int] = None)
-
Delete Webhook.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.projects.webhooks.delete
def edit_webhook(self, webhookId: int, data: Iterable[WebhookPatchRequest], projectId: Optional[int] = None)
-
Edit Custom Language.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.projects.webhooks.patch
def get_webhook(self, webhookId: int, projectId: Optional[int] = None)
-
Get Webhook.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.projects.webhooks.get
def get_webhooks_path(self, projectId: int, webhookId: Optional[int] = None)
def list_webhooks(self, projectId: Optional[int] = None, page: Optional[int] = None, offset: Optional[int] = None, limit: Optional[int] = None)
-
List Webhooks.
Link to documentation: https://developer.crowdin.com/api/v2/#tag/Webhooks