Decisions

Query - Query a running session

A query is the method to get decisions from your knowledge map. You query a relationship in the knowledge map and provide either the subject, the object or both. More information can be found here.

post/{sessionID}/query

Request

Path parameters

sessionIDstring required

The session to query against

Request body

subjectstring

The subject side concept instance or value

relationshipstring required

The relationship between subject and object

Example request

{
  "subject": "Ben",
  "relationship": "can claim"
}

Response

An answer if one is reached, or a question

OR

Example response

{
  "question": {
    "subject": "Ben",
    "dataType": "string",
    "relationship": "suffered",
    "type": "Second Form Object",
    "plural": true,
    "allowCF": true,
    "allowUnknown": false,
    "canAdd": true,
    "prompt": "What type of loss has Ben suffered?",
    "knownAnswers": [],
    "concepts": [
      {
        "conceptType": "loss",
        "name": "cosmetic damage",
        "type": "string",
        "value": "cosmetic damage"
      },
      {
        "conceptType": "loss",
        "name": "water damage",
        "type": "string",
        "value": "water damage"
      },
      {
        "conceptType": "loss",
        "name": "loss",
        "type": "string",
        "value": "loss"
      },
      {
        "conceptType": "loss",
        "name": "theft",
        "type": "string",
        "value": "theft"
      }
    ]
  },
  "sid": "c1bf18d7-d1f0-44bc-a639-8cd4ded56dce"
}

Changes

No recorded changes to this operation across all 4 revisions of this API.