WienBotKitura API

WienBotKitura is smart-proxy for wit.ai. It connects to both the WienBot and the Wave model in wit, and chooses the best answer from the available responses.

Servers

WienbotKitura is provided on dev.api.wienbot.wave-ai.com (development) and wienbotbackend.wien.gv.at (production). This documentation refers to what is available on development.

Request

GET - /message

Query WienBotKitura for interpretation of a string. The answer is sent in the json legacy wit format. If WienBotKitura chooses a WienBot answer, it automatically attaches the correct messages for the client as actions in the wienbot property.

CURL

curl -X GET "https://dev.api.wienbot.wave-ai.com/message\
?q=ich%20habe%20meinen%20schl%C3%BCssel%20verloren&nowave=false" \

Query Parameters

For a documentation of all available query parameters, see ServerRequest.

Response

WienBotKitura responds in the wit legacy format for backwards compatibilty - with an additional property named ‘wienbot’. The wit legacy format is described in WitResponse. An example response looks like this:

{
   "msg_id":"0oOPSuFHQE5ijBJhc",
   "wienbot":[
      {
         "snippetURL":null,
         "media":{
            "type":"image",
            "url":"https://www.wien.gv.at/documents/21178/0/2017-04-03-buergermeister-jpg/0c231d03-9a18-4855-83b2-a3a694dd4420?t=1491227528443"
         },
         "quickreplies":null,
         "template":"",
         "id":"template-![Bürgermeister Dr. Michael Häupl](https://www.wien.gv.at/documents/21178/0/2017-04-03-buergermeister-jpg/0c231d03-9a18-4855-83b2-a3a694dd4420?t=1491227528443)",
         "fallbackFor":null
      },
      {
         "snippetURL":null,
         "media":null,
         "quickreplies":null,
         "template":"Dr. Michael Häupl ist seit 1994 Oberhaupt der Stadt und damit der am längsten dienende gewählte Bürgermeister Wiens. \nwww.wien.gv.at/gogv/l9bgm",
         "id":"template-Dr. Michael Häupl ist seit 1994 Oberhaupt der Stadt und damit der am längsten dienende gewählte Bürgermeister Wiens. \nwww.wien.gv.at/gogv/l9bgm",
         "fallbackFor":null
      },
      {
         "snippetURL":null,
         "media":null,
         "quickreplies":[
            "Rathaus|Rathaus"
         ],
         "template":"Alle Wiener Bürgermeister seit 1282\nwww.wien.gv.at/gogv/l9bgmarchiv",
         "id":"template-Alle Wiener Bürgermeister seit 1282\nwww.wien.gv.at/gogv/l9bgmarchiv",
         "fallbackFor":null
      }
   ],
   "_text":"Wer ist der bürgermeister",
   "outcomes":[
      {
         "intent":"wienbot",
         "_text":"Wer ist der bürgermeister",
         "entities":{
            "Buergermeister":[
               {
                  "value":"Bürgermeister",
                  "_entity":"Buergermeister",
                  "confidence":1
               }
            ]
         }
      }
   ]
}

Errors

In case of errors, WienBotKitura responds with the appropriate http error code and, if possibile, tries to include an error message in the json format.

{
   "code": "msg-invalid",
   "error": "Message is either too short or too long (max is 256)"
}

Multi-Language Support

Wienbotkitura supports multiple languages if a deepl key is specified during boot up. q will be auto-translated to german, interpreted, and any wienbot actions will be translated back to the targetlanguage. See targetlanguage and sourcelanguage for more information.

curl "https://dev.api.wienbot.wave-ai.com/message?q=dog&sourcelanguage=EN&targetlanguage=EN" \
-H 'Content-Type: application/json'