...
HTTP GET https://{brain-host}:{port}/brain/autojson/{brain-service}/RFAQ?hda_semantic_question={question}
Query string parameters:
Name | Description |
---|---|
hda_semantic_question | Text that will be passed to the bot to be interpreted |
To trace the session, the "cookie" header must be set with the value of the session cookie.
The first request will not present the session cookie, but its response will contain the "set-cookie" header with the value of the session cookie. This cookie must be used for all subsequent requests of the same session:
headers = {
cookie: <BRAINSID_SessionCookie>
};
...
Code Block | ||
---|---|---|
| ||
{ "node":{ "brain_id":"n_22369", "brain_version":"5.10.0-SNAPSHOT", "id":"n_22369_698945808", "key":"TEST_MENU", "serviceName":"enghouse-brain-bot", "serviceVersion":"1", "contents":{ "content":[ { "bargein":"true", "brain_id":"c_22369_1", "contentType":"VIDEO", "id":"c_22369_1_494762750", "usePreviousText":"false" }, { "bargein":"true", "brain_id":"c_22369_3", "contentType":"TEXT_CONTENT_RICH", "id":"c_22369_3_1619889357", "usePreviousText":"false", "text":"Choose an option" } ] }, "actions":{ "action":{ "brain_id":"a_34423", "command":"menu", "content":"", "id":"a_34423_1259541208", "order":"1", "runAt":"-1", "target":"", "actions":{ "action":[ { "brain_id":"a_34424", "command":"load-item", "content":"OPTION 1", "id":"a_34424_1211377995", "order":"1", "runAt":"-1", "target":"TEST_M_1", "node_ref":{ "key":"TEST_M_1", "targetUrl":"/enghouse-brain-bot/1/TEST_M_1?referrerActionId=34424" } }, { "brain_id":"a_34425", "command":"load-item", "content":"OPTION 2", "id":"a_34425_308197190", "order":"2", "runAt":"-1", "target":"TEST_MENU_2", "node_ref":{ "key":"TEST_MENU_2", "targetUrl":"/enghouse-brain-bot/1/TEST_MENU_2?referrerActionId=34425" } }, { "brain_id":"a_34426", "command":"open-url", "content":"PAT WEBSITE", "id":"a_34426_1665019718", "order":"3", "runAt":"-1", "target":"https://www.pat.eu", "params":{ "param":[ { "name":"method", "text":"GET" }, { "name":"where", "text":"_blank" } ] } } ] }, "params":{ "param":{ "name":"display", "text":"v" } } } } } } |
Calling a specific node
This service must be called whenever it is specified by a previous response. For example, in the case of a menu, one of the options can specify a node url to be called in the "targetUrl" parameter if the option is chosed by the user.
Syntax:
HTTP GET http://{brain-host}:{port}/brain/autojson/{brain-service}/{node}
...