Http protocol

The easiest protocol for pushing telematics data to flespi. The HTTP channel can receive messages via POST HTTP requests.
flespi parses the Http protocol messages into a JSON object with the fields listed below in the Parameters tab.

flespi HTTP channel protocol by Gurtam is used to receive messages in a POST HTTP request in the same format as a flespi stream with protocol HTTP. It can help you inject data into the flespi pipeline (like devices and streams) to handle your data from any telematics and IoT projects.

The body of the POST HTTP request should contain a JSON array with message objects. You may set JSON-path (dot-separated path to JSON-array of messages) if the HTTP body is a JSON object. Each message object should contain an ident string property plus any additional properties. You may set another field to use as an ident in the channel configuration. The value of timestamp property (if present) should be a number with Unix time, or UTC time string in full ISO 8601 format (YYYY-MM-DDThh:mm:ss).

It is now possible to apply a custom naming scheme to messages, accepted by the HTTP channel.

It can be used for:

  • message parameter renaming
  • excluding unnecessary parameters
  • validating messages before storing
  • picking direct parameters from complex JSON


You can find more examples in our GitHub repository

Bash example:

curl -X POST -H 'Content-Type: application/json' -d '[
{
"ident": "device-ident",
"timestamp": 1702366832.965264,
"message.type": "example",
"driver.message": "Hello, flespi!"
}
]' http://gw.flespi.io:<your_channel_port_here>
channel.id
number
ID of channel that received a message
custom
number
Any custom parameter
device.id
number
ID of device that received a message
device.name
string
Name of device that received a message
device.type.id
number
ID of device type of device that received a message
ident
string
Device unique identifier like serial number, IMEI, etc
peer
string
IP:port from which device connecting to the channel
protocol.id
number
ID of protocol
server.timestamp
number
seconds
Timestamp when server received a message
timestamp
number
seconds
Message timestamp