<% @page_title = @webhook.name %> <% content_for :header do %> <%= render "filters/menu" %>
<%= link_to collection_webhooks_path, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %> Webhooks <% end %>
<%= link_to edit_collection_webhook_path(@webhook.collection_id, @webhook), class: "btn" do %> <%= icon_tag "pencil" %> Edit <% end %>
<% end %>

<%= @webhook.name %>

<%= @webhook.url %>
<% unless @webhook.active? %>
<%= button_to "Reactivate", collection_webhook_activation_path(@webhook), method: :post %>
<% end %>

Secret

<%= @webhook.signing_secret %>

We'll send a X-Webhook-Signature header with each request. You can generate a HMAC using SHA256 of the request body with this secret to verify that the request came from us.

Subscribed to

<% if @webhook.subscribed_actions.empty? %>

This Webhook isn't subscribed to any events. It will never trigger.

<% else %>

    <% @webhook.subscribed_actions.each do |action| %>
  • <%= webhook_action_label(action) %>
  • <% end %>
<% end %>

Deliveries

<% if @webhook.deliveries.empty? %>

This Webhook hasn't been triggered yet

<% else %>

    <%= render partial: "webhooks/delivery", collection: @webhook.deliveries.ordered.limit(20), as: :delivery %>
<% end %>