Search Results for

    Show / Hide Table of Contents
    View Source

    Class WebhookRequestService

    Provides functionality for managing webhook requests.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public class WebhookRequestService : IWebhookRequestService
    Remarks

    Webhook requests are queued when events occur and are processed asynchronously to send HTTP callbacks to configured webhook endpoints.

    Constructors

    View Source

    WebhookRequestService(ICoreScopeProvider, IWebhookRequestRepository, IWebhookJsonSerializer)

    Initializes a new instance of the WebhookRequestService class.

    Declaration
    public WebhookRequestService(ICoreScopeProvider coreScopeProvider, IWebhookRequestRepository webhookRequestRepository, IWebhookJsonSerializer webhookJsonSerializer)
    Parameters
    Type Name Description
    ICoreScopeProvider coreScopeProvider

    The scope provider for unit of work operations.

    IWebhookRequestRepository webhookRequestRepository

    The repository for webhook request data access.

    IWebhookJsonSerializer webhookJsonSerializer

    The serializer for converting payloads to JSON.

    Methods

    View Source

    CreateAsync(Guid, string, object?)

    Creates a webhook request.

    Declaration
    public Task<WebhookRequest> CreateAsync(Guid webhookKey, string eventAlias, object? payload)
    Parameters
    Type Name Description
    Guid webhookKey

    The key of the webhook.

    string eventAlias

    The alias of the event that is creating the request.

    object payload

    The payload you want to send with your request.

    Returns
    Type Description
    Task<WebhookRequest>

    The created WebhookRequest webhook

    View Source

    DeleteAsync(WebhookRequest)

    Deletes a webhook request

    Declaration
    public Task DeleteAsync(WebhookRequest webhookRequest)
    Parameters
    Type Name Description
    WebhookRequest webhookRequest

    The webhook request to be deleted.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    View Source

    GetAllAsync()

    Gets all of the webhook requests in the current database.

    Declaration
    public Task<IEnumerable<WebhookRequest>> GetAllAsync()
    Returns
    Type Description
    Task<IEnumerable<WebhookRequest>>

    An enumerable of WebhookRequest objects.

    View Source

    UpdateAsync(WebhookRequest)

    Update a webhook request.

    Declaration
    public Task<WebhookRequest> UpdateAsync(WebhookRequest webhookRequest)
    Parameters
    Type Name Description
    WebhookRequest webhookRequest

    The webhook request you want to update.

    Returns
    Type Description
    Task<WebhookRequest>

    The updated WebhookRequest webhook

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX