Rainbird Engine - v2.0 (1.2.0)

Download OpenAPI specification:Download

Welcome to the Rainbird API documentation for the v2.0 engine. It contains details of the API calls required to perform Rainbird queries against a Knowledge Map

Authentication

basicAuth

To authenticate with the Rainbird API, you should pass your apikey as the 'username' portion of the basic auth scheme. The 'password' portion is not used by Rainbird, it is however a required field in the interactive 'Try it' UI so please enter any character in that field.

Security Scheme Type HTTP
HTTP Authorization Scheme basic

evidenceKey

To access secured evidence, you should pass your evidence key

Security Scheme Type API Key
Header parameter name: x-evidence-key

Start - Start a new session

Authorizations:
path Parameters
kmID
required
string

The knowledge map ID to start a session against

Responses

Request samples

curl -i -X GET \
  -u <username>:<password> \
  https://api.rainbird.ai/start/:kmID

Response samples

Content type
application/json
{
  • "id": "12345678-1234-1234-1234567890ac",
  • "kmVersion": {
    }
}

Inject - Inject facts into a session

path Parameters
sessionID
required
string

The session to inject facts into

Request Body schema: application/json

Array of facts to inject

Array ()
subject
required
string
relationship
required
string
required
string or number or boolean (Object)

The object side concept instance or value

certainty
required
number (Certainty) [ 1 .. 100 ]

How certain this fact or answer is

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "result": "ok"
}

Query - Query a running session

path Parameters
sessionID
required
string

The session to query against

Request Body schema: application/json

Query for the engine to try to answer

subject
string

The subject-side concept instance

relationship
required
string

The relationship to query for

string or number or boolean (Object)

The object side concept instance or value

Responses

Request samples

Content type
application/json
{
  • "subject": "John",
  • "relationship": "speaks"
}

Response samples

Content type
application/json
Example
{
  • "result": [
    ],
  • "stats": { },
  • "sid": "string"
}

Response - Respond to an asked question

path Parameters
sessionID
required
string

The session to send responses to

Request Body schema: application/json

Items to send as a response

Array of objects

Responses

Request samples

Content type
application/json
{
  • "answers": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "result": [
    ],
  • "stats": { },
  • "sid": "string"
}

Undo - Undoes previous interaction with the engine

path Parameters
sessionID
required
string

The session to step back with an undo

Request Body schema: application/json

An empty object

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
Example
{
  • "result": [
    ],
  • "stats": { },
  • "sid": "string"
}

Evidence - Returns the evidence for a given fact

Authorizations:
path Parameters
factID
required
string

The factID for which to retrieve evidence

sessionID
required
string

The sessionID where the fact was created

Responses

Request samples

curl -i -X GET \
  https://api.rainbird.ai/analysis/evidence/:factID/:sessionID

Response samples

Content type
application/json
{
  • "factID": "WA:RF:46270715221c02dca319bd10",
  • "source": "rule",
  • "fact": {
    },
  • "time": 1522060091106,
  • "rule": {
    }
}

Version - Reports engine version

Responses

Request samples

curl -i -X GET \
  https://api.rainbird.ai/version