github.com/argoproj/argo-events@v1.9.1/docs/eventsources/setup/webhook.md (about) 1 # Webhook 2 3 Webhook event-source exposes a http server and allows external entities to trigger workloads via 4 http requests. 5 6 ## Event Structure 7 8 The structure of an event dispatched by the event-source to the sensor looks like following, 9 10 { 11 "context": { 12 "type": "type_of_event_source", 13 "specversion": "cloud_events_version", 14 "source": "name_of_the_event_source", 15 "id": "unique_event_id", 16 "time": "event_time", 17 "datacontenttype": "type_of_data", 18 "subject": "name_of_the_configuration_within_event_source" 19 }, 20 "data": { 21 "header": {/* the headers from the request received by the event-source from the external entity */}, 22 "body": { /* the payload of the request received by the event-source from the external entity */}, 23 } 24 } 25 26 ## Specification 27 28 Webhook event-source specification is available [here](https://github.com/argoproj/argo-events/blob/master/api/event-source.md#webhookcontext). 29 30 ## Setup 31 32 1. Install the event source in the `argo-events` namespace. 33 34 kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/webhook.yaml 35 36 1. The event-source pod is listening for HTTP requests on port `12000` and endpoint `/example`. 37 It's time to create the sensor. 38 39 kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/webhook.yaml 40 41 1. Once the sensor pod is in running state, test the setup by sending a POST request to event-source service. 42 43 ## Troubleshoot 44 45 Please read the [FAQ](https://argoproj.github.io/argo-events/FAQ/).