|
1
|
import { Note, InlineIcon } from "docs-ui" |
|
2
|
import { ArrowPathMini, SquareTwoStack } from "@medusajs/icons" |
|
3
|
|
|
4
|
export const metadata = { |
|
5
|
title: `Manage Webhook Events in Cloud`, |
|
6
|
} |
|
7
|
|
|
8
|
# {metadata.title} |
|
9
|
|
|
10
|
In this guide, you'll learn how to view webhook event deliveries and retry failed ones. |
|
11
|
|
|
12
|
<Note> |
|
13
|
|
|
14
|
Webhook events are available on the Launch, Scale, and Enterprise plans. Learn more about the different plans in the [Pricing](../../pricing/page.mdx) page. |
|
15
|
|
|
16
|
</Note> |
|
17
|
|
|
18
|
## What are Webhook Events? |
|
19
|
|
|
20
|
Webhook events are delivery attempts made by Medusa to your configured [webhook endpoint](../endpoints/page.mdx). Each event corresponds to an action in your organization, such as a deployment completing or an environment being created. |
|
21
|
|
|
22
|
<Note> |
|
23
|
|
|
24
|
See the [Webhook Reference](../reference/page.mdx) for a complete list of events that Medusa sends to your endpoint. |
|
25
|
|
|
26
|
</Note> |
|
27
|
|
|
28
|
--- |
|
29
|
|
|
30
|
## View Webhook Events |
|
31
|
|
|
32
|
To view the webhook event log: |
|
33
|
|
|
34
|
1. Make sure you're viewing the [correct organization's dashboard in Cloud](../../organizations/page.mdx#switch-organization). |
|
35
|
2. Click on a project from the dashboard. |
|
36
|
3. Click **Webhooks** > **Events** in the sidebar. |
|
37
|
|
|
38
|
The page shows a table of event deliveries with columns for timestamp, event type, and delivery status. Status badges indicate the state of each delivery: |
|
39
|
|
|
40
|
- **Pending / Back-off** (orange): The event has not been delivered yet and is awaiting delivery or a retry. |
|
41
|
- **Delivered** (green): The event was successfully delivered to the endpoint. |
|
42
|
- **Failed** (red): All delivery attempts failed. |
|
43
|
|
|
44
|
--- |
|
45
|
|
|
46
|
## Filter Events |
|
47
|
|
|
48
|
You can narrow the event list using the filter controls at the top of the page: |
|
49
|
|
|
50
|
- **Project**: Filter by a specific project, or view events for all projects. |
|
51
|
- **Environment**: Filter by a specific environment within the selected project. Preview environments are excluded from this filter. |
|
52
|
- **Time range**: Filter by a preset time window. You can select from specific options like last hour or last day, or select a custom time range. The default time range is the last 24 hours. |
|
53
|
|
|
54
|
When you apply a filter, the table updates to show only events that match the selected criteria. You can combine multiple filters to narrow down the results further. |
|
55
|
|
|
56
|
--- |
|
57
|
|
|
58
|
## View Event Details |
|
59
|
|
|
60
|
Click on any row to expand it and see additional information about that delivery attempt: |
|
61
|
|
|
62
|
- **URL**: The endpoint URL the event was sent to. |
|
63
|
- **Last attempt**: Timestamp of the most recent delivery attempt (for events that have not been delivered). |
|
64
|
- **Delivered at**: Timestamp of successful delivery (for events that have been delivered). |
|
65
|
- **Failure reason**: The cause of delivery failure, such as an HTTP error with its status code, a timeout, or a network error. |
|
66
|
- **Next auto retry**: The scheduled time for the next automatic retry attempt. |
|
67
|
- **Project**: The name of the project associated with the event, with a quick-filter button to filter the list by that project. |
|
68
|
- **Environment**: The name of the environment associated with the event, with a quick-filter button to filter the list by that environment. |
|
69
|
- **Payload**: The full JSON body sent with the event, including the event's `id`, `type`, `created_at`, and `data` fields. Click the <InlineIcon Icon={SquareTwoStack} alt="copy" /> icon in the top-right corner of the payload panel to copy the full event body to the clipboard. |
|
70
|
|
|
71
|
--- |
|
72
|
|
|
73
|
## Retry a Failed Event |
|
74
|
|
|
75
|
You can manually retry any event that has not been successfully delivered. |
|
76
|
|
|
77
|
To retry an event: |
|
78
|
|
|
79
|
1. Find the event in the [Webhook Events](#view-webhook-events) table. |
|
80
|
2. Click the <InlineIcon Icon={ArrowPathMini} alt="retry" /> icon at the end of the row. |
|
81
|
|
|
82
|
Medusa immediately re-attempts delivery to the configured endpoint. |
|
83
|
|
|
84
|
<Note> |
|
85
|
|
|
86
|
The retry button is only available for events that have not been delivered (pending, retrying, or failed status). |
|
87
|
|
|
88
|
</Note> |