Mycroft Community Forum

RESTful API for questions to answers?

Is there a RESTful API to test questions (utterances) and answers? For example, something like:

$ curl -k -s -H "content-Type: application/json" -d '{"utterance": "who made you", "lang": "en-us"}'

would return something like:

{"return-code": "0", "answer": "The wonderful Mycroft A.I. community and team."}
-Mike Mac

Not exactly, except you count websocket-based Mycroft message bus as a RESTful API

But with the help of Message bus client and a webserver (e.g. Tornado) it should be possible to build a “RESTful messagebus”

@Dominik thanks for the quick reply. If it could be possible to add such a RESTful API, I would be willing to try to help. I kept thinking about it, and in addition to the return JSON attributes of “return-code” and “answer”, it would be most helpful to also see a return attribute of the skill Mycroft decided to ask, and the question asked of the skill. Does this make sense?
-Mike Mac

1 Like