InfluxDB Docs

http.endpoint() function

The http.endpoint() function sends output data to an HTTP URL using the POST request method.

Function type: Output

import "http"

  url: "http://localhost:1234/"



The URL to POST to.

Data type: String


A function that builds the object used to generate the POST request.

You should rarely need to override the default mapFn parameter. To see the default mapFn value or for insight into possible overrides, view the http.endpoint() source code.

Data type: Function

The returned object must include the following fields:

  • headers
  • data

For more information, see


Send critical statuses to an HTTP endpoint
import "monitor"
import "http"

endpoint = http.endpoint(url: "")

from(bucket: "example-bucket")
  |> range(start: -1m)
  |> filter(fn: (r) => r._measurement == "statuses" and status == "crit")
  |> map(fn: (r) => { return {status: r._status} })
  |> monitor.notify(endpoint: endpoint)