Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Meet Qlik's New CEO. The Future Is Bright — Here's What to Expect
cancel
Showing results for 
Search instead for 
Did you mean: 
Francisco_Perez
Contributor
Contributor

Qlik Answers REST invoke only uses the knowledge base

Summary

Basically I'm building a mashup web app using qlik, and I'm trying to build an assistant using Qlik Answers but with a custom layout using the REST API.

The problem is when using the same assistant, asked the same question by the same user, gives two different
answers depending on how it is reached:

- Via <qlik-embed ui="ai/agentic-assistant"> — the assistant answers correctly
from the Qlik App configured as its data source.
- Via the REST API (`POST /api/v1/assistants/{assistantId}/threads/{threadId}/actions/invoke`)
— the assistant answers only from the knowledge base documents. Questions
that require the app data come back as "I'm sorry, I don't have any information to answer that question, but I could help with something else.".
I would like to know if I can reach the app knowledge over REST at all, and if so, how.

 

Environment
Qlik Answers assistant(not legacy) configured with:
- a knowledge base;
- a Qlik app;
 
- Frontend: Angular, `@qlik/embed-web-components`
- Backend: .NET, calling the Qlik REST API server-to-server
 
 
Auth:
- OAuth2 machine-to-machine client using the 
oauth user-impersonation grant.
- Scopes: 
user_default, apps, assistants, knowledgebases;
 

What I have already ruled out:
Not permissions. The token is the end user's own via impersonation, and the same token is what the working embed uses. The assistant is listed by GET /api/v1/assistants with that token.
Not the wrong assistant. Identical assistantId in both paths.
Not a malformed request. The invoke returns 200 and a coherent answer — it just never consults the app.
Not thread context. Reproduces on a brand new thread, first question.
Not the app itself. The embed answers the same question from the same app.


Questions
- Is POST /api/v1/assistants/{id}/threads/{id}/actions/invoke limited to knowledge base sources by design, with app data sources available only through the agentic experience?

Does ai/agentic-assistant component call a different (unpublished/internal) endpoint, or the same one with additional parameters? 
- Is there a promptType value, or any other body field, that enables the app-data path over REST?
- If there is no REST equivalent today, is one planned? Metering and auditing per user is not possible with a browser-to-Qlik embed, so a server-side path matters for anyone building a multi-tenant product on Qlik Answers.

 

 
Labels (4)
1 Solution

Accepted Solutions
Levi_Turner
Employee
Employee

In short, yes the path being called by REST here (/api/v1/assistants/...) is the path which routes to Qlik Answers prior to the integration of structured data so it will only return information from Knowledge Bases. Qlik Answers against structured and unstructured uses the path /api/v1/cloud-assistants/.... which is not published. It is on the roadmap to have these API published.

View solution in original post

1 Reply
Levi_Turner
Employee
Employee

In short, yes the path being called by REST here (/api/v1/assistants/...) is the path which routes to Qlik Answers prior to the integration of structured data so it will only return information from Knowledge Bases. Qlik Answers against structured and unstructured uses the path /api/v1/cloud-assistants/.... which is not published. It is on the roadmap to have these API published.