Feature request: Meshtastic Web API

I see there is already a working partial web API already that is very useful, but I’d love to see a fuller web API that would allow for easy integration with other IOT devices/services, allowing most basic functions to be conducted through a web API.

Ideally the ability to request such things as: getLastText, sendText, getNodes, getInfo

all expecting a JSON and returning a JSON.

Hi!

We had quite a bit of discussion about how to expose the api and we decided that the best approach would be to have a singular underlying api protocol that works the same everywhere regardless of the transport.

Alas, while we do have “some” json, that’s really just a cheat because we’re manually crafting the responses. I had originally started to build in a proper json api but then realized just how much maintenance it would be to keep up with and it wasn’t worth the effort.

If you’re looking for a way to interface with a web browser, take a look at the JavaScript API. The web interface is being built on top of that and it handles all the connection layer requirements, so it’s very slick.

A json Transformation of what we have now won’t be fuller than what we have now.

Here are our api docs:

JavaScript library:

I understand the complexity and administrative overhead, but the existing API is well above many of us hobbyist non-developers, when even you mentioning a “plug-in” is intimidating.

If you don’t go down the web API path, it would still be helpful to at least have a simple way to post a message and receive the last message via a web call. That way we can easily allow IOT systems to pass messages into and out of the mesh.

Check out the JavaScript library linked above. The examples have what you’re looking for.

2 Likes