Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HTTP MethodPOST
API Endpoint

/bots/{environment}/{botId}/{conversationId}

{environment}

(Path parameter):String

deployment environment (e.g: restricted,unrestricted,test)

{botId}

(Path parameter):String

id of the bot as a path parameter.

{conversationId}

(Path parameter):String

id of the conversation as a path param

inputData a json

(Request body):JSON

a JSON object sent in the request body consists of the usual input text (message to the bot) only this time we are going to provide context information through a key value data structure (Map<String, Context>); the Context value must have one of the following :  string,object or expressions.

returnDetailed(Optional) (Query parameter):boolean
 default default is false - will return all sub results of the entire conversation steps, otherwise only public ones such as input, action, output & quickreplies.
returnCurrentStepOnly(Optional)(Query parameter):boolean 
default is true - will return only the latest conversation step that has just been processed, otherwise returns all conversation steps since the beginning of this conversation.


Here is Example of a json object of the input data : 

Code Block
languagejs
titleinputData json example
linenumberstrue
collapsetrue
{
  "input": "",
  "context": {
    "onboardingOfUser": {
      "type": "string",
      "value": "true"
    },
    "userInfo": {
      "type": "object",
      "value": {
        "username": "Barbara"
      }
    }
  }
}

Additional information:

We can also use http://localhost:7070/chat to test the context parameters by providing Context Type,Context Name, Context Value. see image below while chatting.

...