{% extends "madga/studio/base.html" %} {% load i18n humanize madga_studio_tags %} {% block breadcrumbs %}{% trans "Webhooks" %}{% endblock %} {% block content %}

{% trans "Webhooks" %}

{% trans "Notify external systems when things happen in MADGA. Every payload is signed with the endpoint's secret (X-Madga-Signature header) so receivers can verify it came from you." %}

{% for ep in endpoints %} {% empty %} {% endfor %}
{% trans "Label" %} {% trans "URL" %} {% trans "Events" %} {% trans "Last delivery" %} {% trans "Status" %}
{{ ep.label|default:"โ€”" }} {{ ep.url|truncatechars:50 }} {% if ep.events %}{{ ep.events|length }} {% trans "selected" %}{% else %}{% trans "all events" %}{% endif %} {% if ep.last_fired_at %} {{ ep.last_fired_at|naturaltime }} {% if ep.last_response_status %}
HTTP {{ ep.last_response_status }}{% endif %} {% else %}โ€”{% endif %}
{% if ep.is_active %} {% if ep.fail_count %}{% studio_badge "draft" _("Failing") %}{% else %}{% studio_badge "published" _("Active") %}{% endif %} {% else %}{% studio_badge "archived" _("Paused") %}{% endif %}
{% csrf_token %}
{% trans "Edit" %}
{% csrf_token %}
{% csrf_token %}
{% studio_empty title=_("No webhook endpoints") message=_("Add one to start receiving event POSTs in your external system.") action_label=_("New endpoint") action_href="/studio/webhooks/new/" %}
{% if recent_deliveries %}

{% trans "Recent deliveries" %}

{% for d in recent_deliveries %} {% endfor %}
{% trans "When" %} {% trans "Event" %} {% trans "Endpoint" %} {% trans "Status" %} {% trans "Response" %}
{{ d.created_at|naturaltime }} {{ d.event }} {{ d.endpoint.url|truncatechars:40 }} {% studio_badge d.status d.get_status_display %} {% if d.response_status %}HTTP {{ d.response_status }}{% else %}โ€”{% endif %} {% if d.retry_count %} ยท retry {{ d.retry_count }}{% endif %}
{% endif %}
{% endblock %}