Here we present the endpoints available to call for running C-Phrase NLIs. Let us assume that you are running a C-Phrase NLI on port 9000 of the host with IP www.yourdomain.com. Then the end point to give you a session id from the running C-Phrase NLI would be:

More endpoints are defined below:

Method Endpoint Usage Return Type
GET /api/session Gets a new session id. session
GET /api/request?session={int}&text={text} Asks the C-Phrase NLI to answer the given question under the specified session. answer-result or choice-result
GET /api/choose?session={int}&choice={int} Chooses the n-th options returned in previous choice-result under given session. answer-result
GET /api/completions Gets a list of completions which are intended to help the user type questions. completions
GET /api/corpus/questions Gets the question values in the current .corpus file. example-questions