Receive HTTP Webhook

Inserts metadata from HTTP requests' JSON bodies or URL query parameters.

Overview

Receive HTTP Webhook node inserts metadata from received HTTP requests into frame metadata.

Inputs & Outputs

  • Inputs : 1, Media Format : Any
  • Outputs : 1, Media Format: Same as Input
  • Output Metadata : See below.

Properties

PropertyValue
path_keyThis key will determine the URL to which HTTP requests can be sent. It should not contain slashes. Use GET requests to insert metadata from URL query parameters, e.g. ?door_open=1&additional_arg=value, or POST requests to insert metadata from JSON bodies, e.g. { "door_open": 1, "additional_arg": "value" }. Note that URL query parameters are ignored in POST requests. The base URL template for your request is http://<gateway_ip>:3003/v1/webhooks/<path_key>, e.g. if your gateway's IP address is 192.168.1.123 and path_key is webhook-test, the URL is http://192.168.1.123:3003/v1/webhooks/webhook-test. Authentication is currently not required.

Metadata

Access this metadata using the Function Node or using the API, from the snapshot or clip saved downstream of this node.

Metadata PropertyDescription
<node_id>.node_typewebhook_receiver
<node_id>.meta_presentTrue if there is a metadata object present under <node_id>.meta, false otherwise.
<node_id>.metaMetadata received via the HTTP request. For POST requests, JSON body is inserted as is, while for GET requests, URL query parameters are converted into a JSON dictionary.
<node_id>.meta.timestampAdditional timestamp indicating when the request was received, in ISO 3339 format. Present only if meta_present is true.
"nodes": {
  "[node_id]": {
    "node_type": "webhook_receiver",
    "meta_present": true,
    "meta": {
      "door_open": 1,
      "additional_arg": "value",
      "timestamp": "2023-11-15T14:25:26.011620590+00:00"
    }
  }
}