Natural Language

Ask natural languages questions and context aware partial questions against applications enabled for conversational analytics or a specific app to receive Insight Advisor generated responses and suggestions

Endpoints

Skip to section
POST/questions/actions/ask

Returns the generated response for parsed chat queries, if no app was specified nor present in conversation context, suggests matching apps.

Header Parameters POST /questions/actions/ask

qlik-web-integration-id
optional
string

This header is only required for external clients or mashups for QCS, this value of this property should be the id of the web integration set up for the external client/mashup

Request Body POST /questions/actions/ask

application/json

No description

Responses POST /questions/actions/ask

200
application/json

The sentence is not created as an app was not specified, but matching apps are suggested

201
application/json

The sentence created

400
application/json

Bad request. The payload is not formed correctly.

401
application/json

User is not authorized

422
application/json

Unprocessable entity. The payload contains fields that are invalid, such as too long of a query.

default
application/json

Unexpected error.

POST/questions/actions/ask

curl "https://your-tenant.us.qlikcloud.com/api/v1/questions/actions/ask" \
 -X POST \
 -H "Authorization: Bearer <API-key>" \
 -H "Content-type: application/json" \
 -d '{"text":"string","lang":"string","app":{"id":"string","name":"string"},"disableNarrative":true,"disableConversationContext":true,"disableFollowups":true,"clearEntityContext":true,"recommendationId":"string"}'

Request POST /questions/actions/ask

{
  "text": "string",
  "lang": "string",
  "app": {
    "id": "string",
    "name": "string"
  },
  "disableNarrative": true,
  "disableConversationContext": true,
  "disableFollowups": true,
  "clearEntityContext": true,
  "recommendationId": "string"
}

Response POST /questions/actions/ask

{
  "conversationalResponse": [
    {
      "responses": [
        {
          "type": "string",
          "sentence": {
            "text": "string"
          },
          "imageUrl": "string",
          "narrative": {
            "text": "string"
          },
          "infoType": "string",
          "infoValues": [],
          "followupSentence": "string"
        }
      ],
      "drillDownURI": "string",
      "contextInfo": "string",
      "apps": [
        {
          "id": "string",
          "name": "string"
        }
      ],
      "sentenceWithMatches": "string"
    }
  ],
  "apps": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "nluInfo": {
    "elements": [
      {
        "entity": true,
        "errorText": "string",
        "filterFieldName": "string",
        "filterText": "string",
        "isFilter": true,
        "text": "string",
        "type": "string",
        "typeName": "string",
        "typeTranslated": "string"
      }
    ]
  }
}

QueryCreate

object

Properties

text
string

The sentence that will be parsed.

lang
optional
string

The language to assume when parsing, specified as an ISO-639-1 code. Defaults to 'en' (English).

app
optional

No description

disableNarrative
optional, default=false
boolean

Flag that specifies whether the narratives should be generated for the user query or not.

disableConversationContext
optional, default=false
boolean

Flag that specifies either to enable converastion context.

disableFollowups
optional, default=false
boolean

The flag specifies whether to disable follow-up recommendations.

clearEntityContext
optional, default=false
boolean

Flag that clears the entity context.

recommendationId
optional
string

property that contains the Id of the recommendation for which the response should be generated.

Errors

object

Properties

errors

No description

Error

object

An error object.

Properties

code
string

The error code.

title
string

Summary of the problem.

detail
optional
string

A human-readable explanation specific to this occurrence of the problem.

meta
optional
object

Additional properties relating to the error.

source
optional

References to the source of the error.

QueryCreated

object

The attributes of sentences.

Properties

conversationalResponse

A list of conversational responses.

apps

No description

nluInfo

No description

QueryNotCreated

object

Properties

conversationalResponse

No description

nluInfo

No description

apps

No description

QlikApp

Properties

id
string

No description

name
string

No description

QueryResponse

object

Properties

responses

No description

drillDownURI
string

The URL with the query injected to insight advisor of the app to which the query belongs.

contextInfo
string

For contextual responses, this string contains a list of entities that are used to produce the response.

apps

No description

sentenceWithMatches
string

No description

ConversationalResponsePart

Properties

type
string

No description

sentence

No description

imageUrl
string

No description

narrative

No description

infoType
string

No description

infoValues
Array<>

No description

followupSentence
string

No description

NarrativeResponse

Properties

text
string

No description

NluInfo

Properties

elements

No description

NluInfoElements

Properties

entity
boolean

No description

errorText
string

No description

filterFieldName
string

No description

filterText
string

No description

isFilter
boolean

No description

text
string

No description

type
string

No description

typeName
string

No description

typeTranslated
string

No description

v1.18.0
Was this page helpful?