Evidence

Access the facts, information and the chain of reasoning that led to a decision

Evidence - Returns the evidence for a given fact

get

View the source of the fact, including how it was derived when inferred from a rule.

Authorizations
Path parameters
factIDstringRequired

The factID for which to retrieve evidence

sessionIDstringRequired

The sessionID where the fact was created

Responses
200
Fact detail
application/json
get
GET /analysis/evidence/{factID}/{sessionID} HTTP/1.1
Host: api.rainbird.ai
x-evidence-key: YOUR_API_KEY
Accept: */*
200

Fact detail

{
  "factID": "WA:RF:46270715221c02dca319bd10",
  "source": "rule",
  "fact": {
    "subject": {
      "type": "person",
      "value": "Bob",
      "dataType": "string"
    },
    "relationship": {
      "type": "speaks"
    },
    "object": {
      "type": "language",
      "dataType": "string",
      "value": "English"
    },
    "certainty": 75
  },
  "time": 1522060091106,
  "rule": {
    "bindings": {
      "S": "Bob",
      "O": "English",
      "COUNTRY": "England"
    },
    "conditions": [
      {
        "subject": "England",
        "relationship": "national language",
        "object": "English",
        "salience": 100,
        "certainty": 100,
        "impact": 37.5,
        "factID": "WA:KF:7ccf0415f3af204b5eb3",
        "objectType": "string",
        "alt": "alternative text",
        "factKey": "1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a1"
      },
      {
        "subject": "Bob",
        "relationship": "lives in",
        "object": "England",
        "salience": 100,
        "certainty": 100,
        "impact": 37.5,
        "factID": "WA:AF:8e5b2c204b5eb3b24ba1",
        "objectType": "string",
        "alt": "alternative text",
        "factKey": "1b1b1b1b-1b1b-1b1b-1b1b-1b1b1b1b1b1b1"
      }
    ],
    "ruleMaxCertainty": 75
  }
}

Interaction Log - Retrieves interaction events

get

View a log of interaction events within the session, including queries, injected facts, questions asked, answers given and results returned. Note: interaction log recording is switched off by default. It must be enabled in the Studio per version per knowledge map. Only sessions started after it is enabled will be recorded.

Authorizations
Path parameters
sessionIDstringRequired

The session id to access the interaction logs

Query parameters
formatstringOptional

Format of the retrieved data. CSV or JSON

Responses
200
Interaction log detail
application/json
get
GET /analysis/interactions/{sessionID} HTTP/1.1
Host: api.rainbird.ai
x-interaction-key: YOUR_API_KEY
Accept: */*
200

Interaction log detail

{
  "values": {
    "start": {
      "useDraft": true,
      "kmVersionID": "fb215245-4be2-4d23-a64c-97c50530684f",
      "sessionID": "b77cdb34-5904-4dac-9fe9-3697ed1d73e3"
    }
  },
  "event": "start",
  "created": "2022-03-04T10:13:04.224Z"
}

Session - Returns session information

get

Access session information, such as all of the facts available within a session, or version information for the knowledge map used in a session.

Authorizations
Path parameters
sessionIDstringRequired

The sessionID of the session

Query parameters
relationshipsstring[]Optional

A comma-separated list of relationships to filter the session data by.

Responses
200
Session detail
application/json
get
GET /analysis/session/{sessionID} HTTP/1.1
Host: api.rainbird.ai
X-API-Key: YOUR_API_KEY
Accept: */*
200

Session detail

{
  "km": {
    "id": "abcd:efgh-abcd-abcd-abcdefghijkl",
    "name": "speaks",
    "versionID": "abcdefgh-abcd-abcd-abcdefghijkl",
    "versionNumber": 1,
    "versionCreated": "2022-01-01T12:00:00.000Z",
    "versionStatus": "Draft"
  },
  "facts": {
    "global": [
      {
        "id": "WA:KF:abcdefgh-abcd-abcd-abcdefghijkl",
        "subject": {
          "concept": "Country",
          "value": "France",
          "dataType": "string"
        },
        "relationship": "has language",
        "object": {
          "concept": "Language",
          "value": "French",
          "dataType": "string"
        },
        "certainty": 100,
        "source": "knowledgemap"
      }
    ],
    "context": [],
    "local": [
      {
        "id": "WA:KF:abcdefgh-abcd-abcd-abcdefghijkl",
        "subject": {
          "concept": "Person",
          "value": "Mat",
          "dataType": "string"
        },
        "relationship": "lives in",
        "object": {
          "concept": "Country",
          "value": "France",
          "dataType": "string"
        },
        "certainty": 100,
        "source": "knowledgemap"
      }
    ]
  }
}

Explain (BETA) - Returns a natural language explanation of the evidence tree

post

Get a natural language explanation of the chain of reasoning for any given fact.

Authorizations
Header parameters
VersionstringRequired

Version of the natural language API

Default: v1
Body
languagestringRequired

The users preferred language setting i.e. "en", "za"

sessionIDstringRequired

The session ID needed to access that specific session

factIDstringRequired

The ID of a fact specific to that session to retrieve data from

Responses
200
Response to the language
application/json
post
POST /nl/explain HTTP/1.1
Host: api.rainbird.ai
X-API-Key: YOUR_API_KEY
Version: v1
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "language": "text",
  "sessionID": "text",
  "factID": "text"
}
200

Response to the language

{
  "explanation": "text",
  "error": {
    "code": 1,
    "message": "text",
    "suggestedChatResponse": "text",
    "statusCode": "text"
  },
  "metadata": {
    "querySubmittedAt": "2025-07-10T10:24:48.886Z",
    "languageEngineResponseTime": 1,
    "llmTokens": {
      "completionTokens": 1,
      "promptTokens": 1,
      "totalTokens": 1
    },
    "apiVersion": "text",
    "endpoint": "text",
    "sessionID": "text"
  }
}