API design.
HTTP RESTful API.
Requests pass data via JSON encoded bodies except for in GET requests where data will be passed via URL and query parameters.
Responses will always return JSON.
contexts
collection.
Schema:
user_id
(String)context
(JSON)
The endpoints do not require authentication.
Endpoints which specify a response of None
will return the
JSON: {"ok": true}
.
POST /messages
Send Messages to chatbot
If no text is provided , it sends Empty Message error
Request:
user
(String): Unique user idtext
(String): Message sent by the user
Response:
message_resp
(Json)
POST /newapp
Stores meta data of new app to send it to watson for training
Request:
-
apps
([App Model]) New app submitted to the hub -
Headers:
-
X-Bot-API-Secret
: Required token to authenticate request coming from registry api
Response:
success Message
(JsonString)
GET /session
Unique session id for users.
Request:
- None
Response:
session_id
(Json)
GET /health
Used to determine if server is operating fully.
Request: None
Response: None