API mode allows for sending data to the fleet-telemetry server through a REST API.
Example config.json
:
{
"mode": "api"
}
Returns OK when server is running.
Returns the CA to configure your fleet-telemetry server to use.
Get data for all vehicles.
Send a message to the fleet-telemetry server. Expects a message as JSON body.
Include key
and cert
in the JSON payload of first message for a vehicle. They are used when establishing an mTLS connection. The certificates should match the vin
specified in the request body. It is recommended to always include key/cert for simplicity.
Example Body
{
"txid": "2",
"topic": "V",
"vin": "device-1",
"device_type": "vehicle_device",
"createdAt": 2,
"messageId": "id2",
"data": [
{
"key": "Location",
"value": {
"locationValue": {
"latitude": -38.412374,
"longitude": 124.145867
}
}
}
]
}