API request flow

A common approach to using the Rainbird API is described in the diagram below.

  1. Start endpoint is called to start a new session.

  2. Query endpoint is called to perform a query. The response to query will contain either a question or a result.

  3. If a question has been returned, then the response endpoint should be called with an answer. This request may return another question.

  4. The response endpoint will return a result once the query has reached a conclusion.

In addition to the endpoints mentioned in the example flow, the inject endpoint can be used to inject facts into a Rainbird session. This can be used to inject data into Rainbird from other systems and/or to reduce the number of questions asked during an interaction before a result is returned. It is not recommended to inject more than 250 facts per request as this could lead to inconsistent responses.

Last updated