Assistants

Assistants provide a chat interface for asking questions and getting personalized, relevant answers for Qlik Answers.

Download specification

Endpoints

List assistants

Retrieves the list of assistants. The result can be filtered, sorted, and paginated.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories

Query Parameters

  • limitinteger

    The number of assistants to get.

  • nextstring

    Optional parameter to request the next page.

  • prevstring

    Optional parameter to request the previous page.

  • sortstring

    Optional resource field name to sort on, case insensitive, e.g. name. Can be prefixed with - to set descending order; defaults to ascending.

    Can be one of: "NAME""-NAME""DESCRIPTION""-DESCRIPTION""CREATED""-CREATED""UPDATED""-UPDATED"

  • countTotalbooleanDeprecated

    Optional parameter to request total count for query.

Responses

200

application/json

Successful operation.

  • application/jsonobject
    Show application/json properties
    • dataarray of objects
      Required
      Show data properties
      • idstring
        Required

        Unique identifier of the assistant.

      • namestring
        Required

        The name of the assistant.

      • tagsarray of strings
        Required

        The list of tags associated with the assistant.

      • titlestring

        The title of the assistant.

      • ownerIdstring
        Required

        Unique identifier of the assistant owner.

      • spaceIdstring
        Required

        Unique identifier of the space containing the assistant.

      • tenantIdstring
        Required

        Unique identifier of the assistant tenant.

      • createdAtstring
        Required

        Datetime when the assistant was created.

      • createdBystring
        Required

        Unique identifier of the user who created the assistant.

      • hasAvatarboolean

        Indicates if the assistant has an avatar.

      • updatedAtstring
        Required

        Datetime when the assistant was updated.

      • updatedBystring
        Required

        Unique identifier of the user who last updated the assistant.

      • descriptionstring
        Required

        The description of the assistant.

      • systemMessagestringDeprecated

        System prompt setting up conversation context.

      • knowledgeBasesarray of strings
        Required

        List of knowledgebases the assistant is using.

      • welcomeMessagestring
        Required

        Initial message in the chat conversation.

      • customPropertiesobject
        Required

        freeform JSON to allow custom customization options.

      • defaultPromptTypestring

        Default prompt type for the assistant.

        Can be one of: "thread""oneshot"

      • orderedStarterIdsarray of strings

        List of starter IDs in the order they will be sorted.

    • metaobject
      Show meta properties
      • countTotalinteger
    • linksobject
      Show links properties
      • nextobject
        Show next properties
        • hrefstring
      • prevobject
        Show prev properties
        • hrefstring
      • selfobject
        Show self properties
        • hrefstring

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The user does not have privileges to perform the requested action.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
GET /v1/assistants
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Response

{
  "data": [
    {
      "id": "507f191e810c19729de860ea",
      "name": "Organization-wide Assistant",
      "tags": [
        "Red",
        "Sales"
      ],
      "title": "Assistant for Sales activities",
      "ownerId": "507f191e810c19729de860ea",
      "spaceId": "507f191e810c19729de860ea",
      "tenantId": "507f191e810c19729de860ea",
      "createdAt": "2021-10-02T14:20:50.52Z",
      "createdBy": "507f191e810c19729de860ea",
      "hasAvatar": true,
      "updatedAt": "2021-10-02T14:20:50.52Z",
      "updatedBy": "507f191e810c19729de860ea",
      "description": "This assistant is used for...",
      "systemMessage": "You are helpful Sales assistant. Provide concise and actionable insights.",
      "knowledgeBases": [
        "507f191e810c19729de860ea"
      ],
      "welcomeMessage": "Welcome to Sales process support Assistant.",
      "customProperties": {
        "customErrors": {
          "outsideScopeError": "Outside of scope error",
          "complexQuestionError": "Complex question error",
          "promptInjectionError": "Prompt injection error"
        }
      },
      "defaultPromptType": "thread",
      "orderedStarterIds": [
        "507f191e810c19729de860ea",
        "787f191e810c19729de860er"
      ]
    }
  ],
  "meta": {
    "countTotal": 42
  },
  "links": {
    "next": {
      "href": "string"
    },
    "prev": {
      "href": "string"
    },
    "self": {
      "href": "string"
    }
  }
}

Create an assistant

Creates a new assistant.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • namestring
      Required

      The name of the assistant.

    • tagsarray of strings
      Required

      The list of tags for the assistant.

    • titlestring
      Required

      The title of the assistant.

    • spaceIdstring
      Required

      Unique identifier of the space to contain the assistant.

    • descriptionstring
      Required

      The description of the assistant.

    • systemMessagestringDeprecated

      System prompt setting up conversation context.

    • knowledgeBasesarray of strings
      Required

      List of knowledgebases the assistant is using.

    • welcomeMessagestring
      Required

      Initial message in the chat conversation.

    • customPropertiesobject
      Required

      freeform JSON to allow custom customization options.

    • defaultPromptTypestring

      Default prompt type for the assistant.

      Can be one of: "thread""oneshot"

    • orderedStarterIdsarray of strings

      List of starter IDs in the order they will be sorted.

multipart/form-data

  • multipart/form-dataobject
    Show multipart/form-data properties
    • namestring
      Required

      The name of the assistant.

    • tagsarray of strings
      Required

      The list of tags for the assistant.

    • titlestring
      Required

      The title of the assistant.

    • avatarstring

      user uploaded avatar, filetype must be png

    • spaceIdstring
      Required

      Unique identifier of the space to contain the assistant.

    • descriptionstring
      Required

      The description of the assistant.

    • systemMessagestringDeprecated

      System prompt setting up conversation context.

    • knowledgeBasesarray of strings
      Required

      List of knowledgebases the assistant is using.

    • welcomeMessagestring
      Required

      Initial message in the chat conversation.

    • customPropertiesobject
      Required

      freeform JSON to allow custom customization options.

    • defaultPromptTypestring

      Default prompt type for the assistant.

      Can be one of: "thread""oneshot"

Responses

201

application/json

Successfully created an assistant.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      Unique identifier of the assistant.

    • namestring
      Required

      The name of the assistant.

    • tagsarray of strings
      Required

      The list of tags associated with the assistant.

    • titlestring

      The title of the assistant.

    • ownerIdstring
      Required

      Unique identifier of the assistant owner.

    • spaceIdstring
      Required

      Unique identifier of the space containing the assistant.

    • tenantIdstring
      Required

      Unique identifier of the assistant tenant.

    • createdAtstring
      Required

      Datetime when the assistant was created.

    • createdBystring
      Required

      Unique identifier of the user who created the assistant.

    • hasAvatarboolean

      Indicates if the assistant has an avatar.

    • updatedAtstring
      Required

      Datetime when the assistant was updated.

    • updatedBystring
      Required

      Unique identifier of the user who last updated the assistant.

    • descriptionstring
      Required

      The description of the assistant.

    • systemMessagestringDeprecated

      System prompt setting up conversation context.

    • knowledgeBasesarray of strings
      Required

      List of knowledgebases the assistant is using.

    • welcomeMessagestring
      Required

      Initial message in the chat conversation.

    • customPropertiesobject
      Required

      freeform JSON to allow custom customization options.

    • defaultPromptTypestring

      Default prompt type for the assistant.

      Can be one of: "thread""oneshot"

    • orderedStarterIdsarray of strings

      List of starter IDs in the order they will be sorted.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The user does not have privileges to perform the requested action.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
POST /v1/assistants
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"name":"Organization-wide assistant","tags":["Red","Sales"],"title":"Assistant for Sales activities","spaceId":"507f191e810c19729de860ea","description":"This assistant is used for...","systemMessage":"You are helpful Sales assistant. Provide concise and actionable insights.","knowledgeBases":["507f191e810c19729de860ea"],"welcomeMessage":"Welcome to Sales process support Assistant.","customProperties":{"customErrors":{"outsideScopeError":"Outside of scope error","complexQuestionError":"Complex question error","promptInjectionError":"Prompt injection error"}},"defaultPromptType":"thread","orderedStarterIds":["507f191e810c19729de860ea","787f191e810c19729de860er"]}'
const https = require('https')
  const data = JSON.stringify({"name":"Organization-wide assistant","tags":["Red","Sales"],"title":"Assistant for Sales activities","spaceId":"507f191e810c19729de860ea","description":"This assistant is used for...","systemMessage":"You are helpful Sales assistant. Provide concise and actionable insights.","knowledgeBases":["507f191e810c19729de860ea"],"welcomeMessage":"Welcome to Sales process support Assistant.","customProperties":{"customErrors":{"outsideScopeError":"Outside of scope error","complexQuestionError":"Complex question error","promptInjectionError":"Prompt injection error"}},"defaultPromptType":"thread","orderedStarterIds":["507f191e810c19729de860ea","787f191e810c19729de860er"]})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "name": "Organization-wide assistant",
  "tags": [
    "Red",
    "Sales"
  ],
  "title": "Assistant for Sales activities",
  "spaceId": "507f191e810c19729de860ea",
  "description": "This assistant is used for...",
  "systemMessage": "You are helpful Sales assistant. Provide concise and actionable insights.",
  "knowledgeBases": [
    "507f191e810c19729de860ea"
  ],
  "welcomeMessage": "Welcome to Sales process support Assistant.",
  "customProperties": {
    "customErrors": {
      "outsideScopeError": "Outside of scope error",
      "complexQuestionError": "Complex question error",
      "promptInjectionError": "Prompt injection error"
    }
  },
  "defaultPromptType": "thread",
  "orderedStarterIds": [
    "507f191e810c19729de860ea",
    "787f191e810c19729de860er"
  ]
}

Response

{
  "id": "507f191e810c19729de860ea",
  "name": "Organization-wide Assistant",
  "tags": [
    "Red",
    "Sales"
  ],
  "title": "Assistant for Sales activities",
  "ownerId": "507f191e810c19729de860ea",
  "spaceId": "507f191e810c19729de860ea",
  "tenantId": "507f191e810c19729de860ea",
  "createdAt": "2021-10-02T14:20:50.52Z",
  "createdBy": "507f191e810c19729de860ea",
  "hasAvatar": true,
  "updatedAt": "2021-10-02T14:20:50.52Z",
  "updatedBy": "507f191e810c19729de860ea",
  "description": "This assistant is used for...",
  "systemMessage": "You are helpful Sales assistant. Provide concise and actionable insights.",
  "knowledgeBases": [
    "507f191e810c19729de860ea"
  ],
  "welcomeMessage": "Welcome to Sales process support Assistant.",
  "customProperties": {
    "customErrors": {
      "outsideScopeError": "Outside of scope error",
      "complexQuestionError": "Complex question error",
      "promptInjectionError": "Prompt injection error"
    }
  },
  "defaultPromptType": "thread",
  "orderedStarterIds": [
    "507f191e810c19729de860ea",
    "787f191e810c19729de860er"
  ]
}

Get feedback

Retrieves feedback summary for the assistant.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant from which to retrieve feedback summary.

Responses

200

application/json

Successfully retrieved the feedback summary for the assistant.

  • application/jsonobject
    Show application/json properties
    • likesinteger
      Required

      Amount of likes for a thread or an assistant.

    • otherinteger

      Count of answers which users disliked and gave "other" as reason.

    • reviewsinteger
      Required

      Amount of reviews for a thread or an assistant.

    • dislikesinteger
      Required

      Amount of dislikes for a thread or an assistant.

    • unhelpfulinteger

      Count of answers which users marked as "unhelpful".

    • inaccurateinteger

      Count of answers which users marked as "inaccurate".

    • irrelevantinteger

      Count of answers which users marked as "irrelevant".

    • repetitiveinteger

      Count of answers which users marked as "repetitive".

    • unansweredinteger

      Count of questions for which the assistant provided no answer.

    • interactionsinteger
      Required

      Amount of interactions for a thread or an assistant.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The assistant was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
GET /v1/assistants/{assistantId}/feedback
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/feedback" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/feedback',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Response

{
  "likes": 42,
  "other": 42,
  "reviews": 42,
  "dislikes": 42,
  "unhelpful": 42,
  "inaccurate": 42,
  "irrelevant": 42,
  "repetitive": 42,
  "unanswered": 42,
  "interactions": 42
}

Bulk search source chunks

Perform a bulk search for the plaintext of source chunks for the assistant.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant in which to search for source chunks.

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • chunkIdsarray of strings
      Required

      Unique identifier of the Chunk.

Responses

202

application/json

Successfully retrieved plaintext of the chunks.

  • application/jsonobject
    Show application/json properties
    • textByChunkIdobject

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The user does not have privileges to perform the requested action.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The resource was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
POST /v1/assistants/{assistantId}/sources/plaintexts
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/sources/plaintexts" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"chunkIds":["c2ef42d9-7164-4fb0-bdbb-6534ae37263e","486ada2c-f895-4961-8ba5-7995f1026d26"]}'
const https = require('https')
  const data = JSON.stringify({"chunkIds":["c2ef42d9-7164-4fb0-bdbb-6534ae37263e","486ada2c-f895-4961-8ba5-7995f1026d26"]})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/sources/plaintexts',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "chunkIds": [
    "c2ef42d9-7164-4fb0-bdbb-6534ae37263e",
    "486ada2c-f895-4961-8ba5-7995f1026d26"
  ]
}

Response

{
  "textByChunkId": {
    "chunk1_id": "chunk1_text",
    "chunk2_id": "chunk2_text"
  }
}

List starters

Retrieves the list of starters for the assistant.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories

Query Parameters

  • limitinteger

    The number of starters to get.

  • nextstring

    Optional parameter to request the next page.

  • prevstring

    Optional parameter to request the previous page.

  • sortstring

    Optional resource field name to sort on, case insensitive, e.g. name. Can be prefixed with - to set descending order; defaults to ascending.

    Can be one of: "QUESTION""-QUESTION""CREATED""-CREATED""UPDATED""-UPDATED"

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant from which to retrieve starters.

Responses

200

application/json

Successfully retrieved the assistant's starters.

  • application/jsonobject
    Show application/json properties
    • dataarray of objects
      Required
      Show data properties
      • idstring
        Required

        Unique identifier of the starter.

      • questionstring
        Required

        Starter sample question.

      • createdAtstring
        Required

        Datetime when the starter was created.

      • followupsarray of objects

        List of followups.

        Show followups properties
        • idstring
          Required

          Unique identifier of the Followup.

        • questionstring
          Required

          Starter sample question.

        • additionalContextstring
          Required

          Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

        • recommendedAnswerobject
          Required
          Show recommendedAnswer properties
          • contentstring
            Required

            Starter answer content.

          • contentTypestring
            Required

            Answer type of content.

      • updatedAtstring
        Required

        Datetime when the starter was updated.

      • additionalContextstring
        Required

        Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

      • recommendedAnswerobject
        Required
        Show recommendedAnswer properties
        • contentstring
          Required

          Starter answer content.

        • contentTypestring
          Required

          Answer type of content.

    • metaobject
      Show meta properties
      • countTotalinteger
    • linksobject
      Show links properties
      • nextobject
        Show next properties
        • hrefstring
      • prevobject
        Show prev properties
        • hrefstring
      • selfobject
        Show self properties
        • hrefstring

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The assistant was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
GET /v1/assistants/{assistantId}/starters
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/starters" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/starters',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Response

{
  "data": [
    {
      "id": "507f191e810c19729de860ea",
      "question": "Where was Genghis Khan buried?",
      "createdAt": "2021-10-02T14:20:50.52Z",
      "followups": [
        {
          "id": "507f191e810c19729de860ea",
          "question": "Where was Genghis Khan buried?",
          "additionalContext": "string",
          "recommendedAnswer": {
            "content": "string",
            "contentType": "text | markdown | html"
          }
        }
      ],
      "updatedAt": "2021-10-02T14:20:50.52Z",
      "additionalContext": "string",
      "recommendedAnswer": {
        "content": "string",
        "contentType": "text | markdown | html"
      }
    }
  ],
  "meta": {
    "countTotal": 42
  },
  "links": {
    "next": {
      "href": "string"
    },
    "prev": {
      "href": "string"
    },
    "self": {
      "href": "string"
    }
  }
}

Create a starter

Creates a new starter for the assistant.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant in which to create the starter.

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • questionstring
      Required

      Starter sample question.

    • followupsarray of objects

      List of followups.

      Show followups properties
      • idstring
        Required

        Unique identifier of the Followup.

      • questionstring
        Required

        Starter sample question.

      • additionalContextstring
        Required

        Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

      • recommendedAnswerobject
        Required
        Show recommendedAnswer properties
        • contentstring
          Required

          Starter answer content.

        • contentTypestring
          Required

          Answer type of content.

    • additionalContextstring
      Required

      Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

    • recommendedAnswerobject
      Required
      Show recommendedAnswer properties
      • contentstring
        Required

        Starter answer content.

      • contentTypestring
        Required

        Answer type of content.

Responses

201

application/json

Successfully created a new assistant starter.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      Unique identifier of the starter.

    • questionstring
      Required

      Starter sample question.

    • createdAtstring
      Required

      Datetime when the starter was created.

    • followupsarray of objects

      List of followups.

      Show followups properties
      • idstring
        Required

        Unique identifier of the Followup.

      • questionstring
        Required

        Starter sample question.

      • additionalContextstring
        Required

        Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

      • recommendedAnswerobject
        Required
        Show recommendedAnswer properties
        • contentstring
          Required

          Starter answer content.

        • contentTypestring
          Required

          Answer type of content.

    • updatedAtstring
      Required

      Datetime when the starter was updated.

    • additionalContextstring
      Required

      Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

    • recommendedAnswerobject
      Required
      Show recommendedAnswer properties
      • contentstring
        Required

        Starter answer content.

      • contentTypestring
        Required

        Answer type of content.

400

application/json

The request is in incorrect format or starter limit exceeded.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The user does not have privileges to perform the requested action.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The assistant was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
POST /v1/assistants/{assistantId}/starters
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/starters" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"question":"Where was Genghis Khan buried?","followups":[{"id":"507f191e810c19729de860ea","question":"Where was Genghis Khan buried?","additionalContext":"string","recommendedAnswer":{"content":"string","contentType":"text | markdown | html"}}],"additionalContext":"string","recommendedAnswer":{"content":"string","contentType":"text | markdown | html"}}'
const https = require('https')
  const data = JSON.stringify({"question":"Where was Genghis Khan buried?","followups":[{"id":"507f191e810c19729de860ea","question":"Where was Genghis Khan buried?","additionalContext":"string","recommendedAnswer":{"content":"string","contentType":"text | markdown | html"}}],"additionalContext":"string","recommendedAnswer":{"content":"string","contentType":"text | markdown | html"}})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/starters',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "question": "Where was Genghis Khan buried?",
  "followups": [
    {
      "id": "507f191e810c19729de860ea",
      "question": "Where was Genghis Khan buried?",
      "additionalContext": "string",
      "recommendedAnswer": {
        "content": "string",
        "contentType": "text | markdown | html"
      }
    }
  ],
  "additionalContext": "string",
  "recommendedAnswer": {
    "content": "string",
    "contentType": "text | markdown | html"
  }
}

Response

{
  "id": "507f191e810c19729de860ea",
  "question": "Where was Genghis Khan buried?",
  "createdAt": "2021-10-02T14:20:50.52Z",
  "followups": [
    {
      "id": "507f191e810c19729de860ea",
      "question": "Where was Genghis Khan buried?",
      "additionalContext": "string",
      "recommendedAnswer": {
        "content": "string",
        "contentType": "text | markdown | html"
      }
    }
  ],
  "updatedAt": "2021-10-02T14:20:50.52Z",
  "additionalContext": "string",
  "recommendedAnswer": {
    "content": "string",
    "contentType": "text | markdown | html"
  }
}

Get a starter

Retrieves the specified starter.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant containing the requested starter.

  • starterIdstring
    Required

    The ID of the starter to retrieve.

Responses

200

application/json

Successfully retrieved the starter.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      Unique identifier of the starter.

    • questionstring
      Required

      Starter sample question.

    • createdAtstring
      Required

      Datetime when the starter was created.

    • followupsarray of objects

      List of followups.

      Show followups properties
      • idstring
        Required

        Unique identifier of the Followup.

      • questionstring
        Required

        Starter sample question.

      • additionalContextstring
        Required

        Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

      • recommendedAnswerobject
        Required
        Show recommendedAnswer properties
        • contentstring
          Required

          Starter answer content.

        • contentTypestring
          Required

          Answer type of content.

    • updatedAtstring
      Required

      Datetime when the starter was updated.

    • additionalContextstring
      Required

      Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

    • recommendedAnswerobject
      Required
      Show recommendedAnswer properties
      • contentstring
        Required

        Starter answer content.

      • contentTypestring
        Required

        Answer type of content.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The starter was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
GET /v1/assistants/{assistantId}/starters/{starterId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/starters/{starterId}" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/starters/{starterId}',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Response

{
  "id": "507f191e810c19729de860ea",
  "question": "Where was Genghis Khan buried?",
  "createdAt": "2021-10-02T14:20:50.52Z",
  "followups": [
    {
      "id": "507f191e810c19729de860ea",
      "question": "Where was Genghis Khan buried?",
      "additionalContext": "string",
      "recommendedAnswer": {
        "content": "string",
        "contentType": "text | markdown | html"
      }
    }
  ],
  "updatedAt": "2021-10-02T14:20:50.52Z",
  "additionalContext": "string",
  "recommendedAnswer": {
    "content": "string",
    "contentType": "text | markdown | html"
  }
}

Update a starter

Updates the specified starter.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant containing the requested starter.

  • starterIdstring
    Required

    The ID of the starter to retrieve.

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      Unique identifier of the starter.

    • questionstring
      Required

      Starter sample question.

    • followupsarray of objects

      List of followups.

      Show followups properties
      • idstring
        Required

        Unique identifier of the Followup.

      • questionstring
        Required

        Starter sample question.

      • additionalContextstring
        Required

        Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

      • recommendedAnswerobject
        Required
        Show recommendedAnswer properties
        • contentstring
          Required

          Starter answer content.

        • contentTypestring
          Required

          Answer type of content.

    • additionalContextstring
      Required

      Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

    • recommendedAnswerobject
      Required
      Show recommendedAnswer properties
      • contentstring
        Required

        Starter answer content.

      • contentTypestring
        Required

        Answer type of content.

Responses

200

application/json

Successfully updated the starter.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      Unique identifier of the starter.

    • questionstring
      Required

      Starter sample question.

    • createdAtstring
      Required

      Datetime when the starter was created.

    • followupsarray of objects

      List of followups.

      Show followups properties
      • idstring
        Required

        Unique identifier of the Followup.

      • questionstring
        Required

        Starter sample question.

      • additionalContextstring
        Required

        Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

      • recommendedAnswerobject
        Required
        Show recommendedAnswer properties
        • contentstring
          Required

          Starter answer content.

        • contentTypestring
          Required

          Answer type of content.

    • updatedAtstring
      Required

      Datetime when the starter was updated.

    • additionalContextstring
      Required

      Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

    • recommendedAnswerobject
      Required
      Show recommendedAnswer properties
      • contentstring
        Required

        Starter answer content.

      • contentTypestring
        Required

        Answer type of content.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The record was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
PUT /v1/assistants/{assistantId}/starters/{starterId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/starters/{starterId}" \
-X PUT \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"id":"507f191e810c19729de860ea","question":"Where was Genghis Khan buried?","followups":[{"id":"507f191e810c19729de860ea","question":"Where was Genghis Khan buried?","additionalContext":"string","recommendedAnswer":{"content":"string","contentType":"text | markdown | html"}}],"additionalContext":"string","recommendedAnswer":{"content":"string","contentType":"text | markdown | html"}}'
const https = require('https')
  const data = JSON.stringify({"id":"507f191e810c19729de860ea","question":"Where was Genghis Khan buried?","followups":[{"id":"507f191e810c19729de860ea","question":"Where was Genghis Khan buried?","additionalContext":"string","recommendedAnswer":{"content":"string","contentType":"text | markdown | html"}}],"additionalContext":"string","recommendedAnswer":{"content":"string","contentType":"text | markdown | html"}})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/starters/{starterId}',
    'method': 'PUT',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "id": "507f191e810c19729de860ea",
  "question": "Where was Genghis Khan buried?",
  "followups": [
    {
      "id": "507f191e810c19729de860ea",
      "question": "Where was Genghis Khan buried?",
      "additionalContext": "string",
      "recommendedAnswer": {
        "content": "string",
        "contentType": "text | markdown | html"
      }
    }
  ],
  "additionalContext": "string",
  "recommendedAnswer": {
    "content": "string",
    "contentType": "text | markdown | html"
  }
}

Response

{
  "id": "507f191e810c19729de860ea",
  "question": "Where was Genghis Khan buried?",
  "createdAt": "2021-10-02T14:20:50.52Z",
  "followups": [
    {
      "id": "507f191e810c19729de860ea",
      "question": "Where was Genghis Khan buried?",
      "additionalContext": "string",
      "recommendedAnswer": {
        "content": "string",
        "contentType": "text | markdown | html"
      }
    }
  ],
  "updatedAt": "2021-10-02T14:20:50.52Z",
  "additionalContext": "string",
  "recommendedAnswer": {
    "content": "string",
    "contentType": "text | markdown | html"
  }
}

Delete a starter

Deletes the starter and all of its resources.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant containing the requested starter.

  • starterIdstring
    Required

    The ID of the starter to delete.

Responses

204

Successful operation.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The assistant was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
DELETE /v1/assistants/{assistantId}/starters/{starterId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/starters/{starterId}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/starters/{starterId}',
    'method': 'DELETE',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Update a Followup

Updates the specified Followup.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant containing the requested Followup.

  • followupIdstring
    Required

    The ID of the Followup to update.

  • starterIdstring
    Required

    The ID of the starter containing the requested Followup.

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      Unique identifier of the Followup.

    • questionstring
      Required

      Starter sample question.

    • additionalContextstring
      Required

      Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

    • recommendedAnswerobject
      Required
      Show recommendedAnswer properties
      • contentstring
        Required

        Starter answer content.

      • contentTypestring
        Required

        Answer type of content.

Responses

200

application/json

Successfully updated the Followup.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      Unique identifier of the starter.

    • questionstring
      Required

      Starter sample question.

    • createdAtstring
      Required

      Datetime when the starter was created.

    • followupsarray of objects

      List of followups.

      Show followups properties
      • idstring
        Required

        Unique identifier of the Followup.

      • questionstring
        Required

        Starter sample question.

      • additionalContextstring
        Required

        Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

      • recommendedAnswerobject
        Required
        Show recommendedAnswer properties
        • contentstring
          Required

          Starter answer content.

        • contentTypestring
          Required

          Answer type of content.

    • updatedAtstring
      Required

      Datetime when the starter was updated.

    • additionalContextstring
      Required

      Optional context collected from curated meant to be leveraged by LLM-based question recommendation system.

    • recommendedAnswerobject
      Required
      Show recommendedAnswer properties
      • contentstring
        Required

        Starter answer content.

      • contentTypestring
        Required

        Answer type of content.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The record was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
PUT /v1/assistants/{assistantId}/starters/{starterId}/followups/{followupId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/starters/{starterId}/followups/{followupId}" \
-X PUT \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"id":"507f191e810c19729de860ea","question":"Where was Genghis Khan buried?","additionalContext":"string","recommendedAnswer":{"content":"string","contentType":"text | markdown | html"}}'
const https = require('https')
  const data = JSON.stringify({"id":"507f191e810c19729de860ea","question":"Where was Genghis Khan buried?","additionalContext":"string","recommendedAnswer":{"content":"string","contentType":"text | markdown | html"}})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/starters/{starterId}/followups/{followupId}',
    'method': 'PUT',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "id": "507f191e810c19729de860ea",
  "question": "Where was Genghis Khan buried?",
  "additionalContext": "string",
  "recommendedAnswer": {
    "content": "string",
    "contentType": "text | markdown | html"
  }
}

Response

{
  "id": "507f191e810c19729de860ea",
  "question": "Where was Genghis Khan buried?",
  "createdAt": "2021-10-02T14:20:50.52Z",
  "followups": [
    {
      "id": "507f191e810c19729de860ea",
      "question": "Where was Genghis Khan buried?",
      "additionalContext": "string",
      "recommendedAnswer": {
        "content": "string",
        "contentType": "text | markdown | html"
      }
    }
  ],
  "updatedAt": "2021-10-02T14:20:50.52Z",
  "additionalContext": "string",
  "recommendedAnswer": {
    "content": "string",
    "contentType": "text | markdown | html"
  }
}

Delete a Followup

Deletes the specified Followup.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant containing the requested Followup.

  • followupIdstring
    Required

    The ID of the Followup to delete.

  • starterIdstring
    Required

    The ID of the starter containing the requested Followup.

Responses

204

Successful operation.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The Followup was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
DELETE /v1/assistants/{assistantId}/starters/{starterId}/followups/{followupId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/starters/{starterId}/followups/{followupId}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/starters/{starterId}/followups/{followupId}',
    'method': 'DELETE',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

List threads

Retrieves the list of threads for the assistant.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories

Query Parameters

  • filterstring

    Optional parameter to filter threads.

  • limitinteger

    The number of assistants to get.

  • nextstring

    Optional parameter to request the next page.

  • prevstring

    Optional parameter to request the previous page.

  • sortstring

    Optional resource field name to sort on, case insensitive, e.g. name. Can be prefixed with - to set descending order; defaults to ascending.

    Can be one of: "NAME""-NAME""CREATED""-CREATED""UPDATED""-UPDATED"

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant from which to retrieve threads.

Responses

200

application/json

Successfully retrieved the threads for the assistant.

  • application/jsonobject
    Show application/json properties
    • dataarray of objects
      Required
      Show data properties
      • idstring
        Required

        Unique identifier of the thread.

      • namestring
        Required

        The name of the thread.

      • ownerIdstring
        Required
      • favoriteboolean
        Required

        If thread is marked as favorite.

      • createdAtstring
        Required

        Datetime when the thread was created.

      • deletedAtstring

        Datetime when the thread was deleted.

      • updatedAtstring
        Required

        Datetime when the thread was updated.

      • hasFeedbackboolean
        Required

        If feedback was provided for a thread interaction.

      • summaryStatsobject
        Required
        Show summaryStats properties
        • likesinteger
          Required

          Amount of likes for a thread or an assistant.

        • otherinteger

          Count of answers which users disliked and gave "other" as reason.

        • reviewsinteger
          Required

          Amount of reviews for a thread or an assistant.

        • dislikesinteger
          Required

          Amount of dislikes for a thread or an assistant.

        • unhelpfulinteger

          Count of answers which users marked as "unhelpful".

        • inaccurateinteger

          Count of answers which users marked as "inaccurate".

        • irrelevantinteger

          Count of answers which users marked as "irrelevant".

        • repetitiveinteger

          Count of answers which users marked as "repetitive".

        • unansweredinteger

          Count of questions for which the assistant provided no answer.

        • interactionsinteger
          Required

          Amount of interactions for a thread or an assistant.

    • metaobject
      Show meta properties
      • countTotalinteger
    • linksobject
      Show links properties
      • nextobject
        Show next properties
        • hrefstring
      • prevobject
        Show prev properties
        • hrefstring
      • selfobject
        Show self properties
        • hrefstring

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The assistant was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
GET /v1/assistants/{assistantId}/threads
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/threads" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/threads',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Response

{
  "data": [
    {
      "id": "507f191e810c19729de860ea",
      "name": "Initial conversation",
      "ownerId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "favorite": false,
      "createdAt": "2021-10-02T14:20:50.52Z",
      "deletedAt": "2021-10-02T14:20:50.52Z",
      "updatedAt": "2021-10-02T14:20:50.52Z",
      "hasFeedback": false,
      "summaryStats": {
        "likes": 42,
        "other": 42,
        "reviews": 42,
        "dislikes": 42,
        "unhelpful": 42,
        "inaccurate": 42,
        "irrelevant": 42,
        "repetitive": 42,
        "unanswered": 42,
        "interactions": 42
      }
    }
  ],
  "meta": {
    "countTotal": 42
  },
  "links": {
    "next": {
      "href": "string"
    },
    "prev": {
      "href": "string"
    },
    "self": {
      "href": "string"
    }
  }
}

Create a thread

Creates a new thread for the assistant.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant in which to create the thread.

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • namestring
      Required

      The name of the thread.

Responses

201

application/json

Successfully created a new assistant thread.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      Unique identifier of the thread.

    • namestring
      Required

      The name of the thread.

    • ownerIdstring
      Required
    • favoriteboolean
      Required

      If thread is marked as favorite.

    • createdAtstring
      Required

      Datetime when the thread was created.

    • deletedAtstring

      Datetime when the thread was deleted.

    • updatedAtstring
      Required

      Datetime when the thread was updated.

    • hasFeedbackboolean
      Required

      If feedback was provided for a thread interaction.

    • summaryStatsobject
      Required
      Show summaryStats properties
      • likesinteger
        Required

        Amount of likes for a thread or an assistant.

      • otherinteger

        Count of answers which users disliked and gave "other" as reason.

      • reviewsinteger
        Required

        Amount of reviews for a thread or an assistant.

      • dislikesinteger
        Required

        Amount of dislikes for a thread or an assistant.

      • unhelpfulinteger

        Count of answers which users marked as "unhelpful".

      • inaccurateinteger

        Count of answers which users marked as "inaccurate".

      • irrelevantinteger

        Count of answers which users marked as "irrelevant".

      • repetitiveinteger

        Count of answers which users marked as "repetitive".

      • unansweredinteger

        Count of questions for which the assistant provided no answer.

      • interactionsinteger
        Required

        Amount of interactions for a thread or an assistant.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The user does not have privileges to perform the requested action.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The assistant was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
POST /v1/assistants/{assistantId}/threads
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/threads" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"name":"Initial conversation"}'
const https = require('https')
  const data = JSON.stringify({"name":"Initial conversation"})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/threads',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "name": "Initial conversation"
}

Response

{
  "id": "507f191e810c19729de860ea",
  "name": "Initial conversation",
  "ownerId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
  "favorite": false,
  "createdAt": "2021-10-02T14:20:50.52Z",
  "deletedAt": "2021-10-02T14:20:50.52Z",
  "updatedAt": "2021-10-02T14:20:50.52Z",
  "hasFeedback": false,
  "summaryStats": {
    "likes": 42,
    "other": 42,
    "reviews": 42,
    "dislikes": 42,
    "unhelpful": 42,
    "inaccurate": 42,
    "irrelevant": 42,
    "repetitive": 42,
    "unanswered": 42,
    "interactions": 42
  }
}

Get a thread

Retrieves a thread for the assistant.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories

Path Parameters

  • assistantidstring
    Required

    The ID of the assistant containing the requested thread.

  • threadidstring
    Required

    The ID of the thread to retrieve.

Responses

200

application/json

Successfully retrieved the thread.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      Unique identifier of the thread.

    • namestring
      Required

      The name of the thread.

    • ownerIdstring
      Required

      Unique identifier of the thread owner.

    • favoriteboolean
      Required

      If thread is marked as favorite.

    • messagesarray of objects
      Required
      Show messages properties
      • idstring
        Required
      • rolestring
        Required

        human or ai role.

      • contentstring
        Required

        Message content.

      • sourcesarray of objects
        Required

        List of sources used to generate AI messages (interactions).

        Show sources properties
        • chunksarray of objects
          Required

          List of Chunks used for "AI" generated messages.

          Show chunks properties
          • textstring

            Chunk text for "AI" generated message source.

          • chunkIdstring
            Required

            Chunk unique identifier for "AI" generated message source.

        • sourcestring
          Required

          Path to the document used.

        • documentIdstring
          Required

          Reference to Document used for "AI" generated messages.

        • datasourceIdstring
          Required

          Reference to DataSource used for "AI" generated messages.

        • lastIndexedAtstring

          Datetime when the knowledgebase was last indexed.

        • knowledgebaseIdstring
          Required

          Reference to KnowledgeBase used for "AI" generated messages.

      • createdAtstring
        Required

        Datetime when the interaction was created.

    • createdAtstring
      Required

      Datetime when the thread was created.

    • deletedAtstring

      Datetime when the thread was deleted.

    • updatedAtstring
      Required

      Datetime when the thread was updated.

    • hasFeedbackboolean
      Required

      If feedback was provided for a thread interaction.

    • summaryStatsobject
      Required
      Show summaryStats properties
      • likesinteger
        Required

        Amount of likes for a thread or an assistant.

      • otherinteger

        Count of answers which users disliked and gave "other" as reason.

      • reviewsinteger
        Required

        Amount of reviews for a thread or an assistant.

      • dislikesinteger
        Required

        Amount of dislikes for a thread or an assistant.

      • unhelpfulinteger

        Count of answers which users marked as "unhelpful".

      • inaccurateinteger

        Count of answers which users marked as "inaccurate".

      • irrelevantinteger

        Count of answers which users marked as "irrelevant".

      • repetitiveinteger

        Count of answers which users marked as "repetitive".

      • unansweredinteger

        Count of questions for which the assistant provided no answer.

      • interactionsinteger
        Required

        Amount of interactions for a thread or an assistant.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The thread was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
GET /v1/assistants/{assistantid}/threads/{threadid}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantid}/threads/{threadid}" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantid}/threads/{threadid}',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Response

{
  "id": "507f191e810c19729de860ea",
  "name": "Initial conversation",
  "ownerId": "507f191e810c19729de860ea",
  "favorite": false,
  "messages": [
    {
      "id": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "role": "ai",
      "content": "Somewhere in an unmarked grave",
      "sources": [
        {
          "chunks": [
            {
              "text": "string",
              "chunkId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
            }
          ],
          "source": "Reference.md",
          "documentId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
          "datasourceId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
          "lastIndexedAt": "2021-10-02T14:20:50.52Z",
          "knowledgebaseId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
        }
      ],
      "createdAt": "2021-10-02T14:20:50.52Z"
    }
  ],
  "createdAt": "2021-10-02T14:20:50.52Z",
  "deletedAt": "2021-10-02T14:20:50.52Z",
  "updatedAt": "2021-10-02T14:20:50.52Z",
  "hasFeedback": false,
  "summaryStats": {
    "likes": 42,
    "other": 42,
    "reviews": 42,
    "dislikes": 42,
    "unhelpful": 42,
    "inaccurate": 42,
    "irrelevant": 42,
    "repetitive": 42,
    "unanswered": 42,
    "interactions": 42
  }
}

Update thread properties

Updates the properties of an existing thread with JSON Patch-formatted data.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantidstring
    Required

    The ID of the assistant containing the requested thread.

  • threadidstring
    Required

    The ID of the thread to retrieve.

Request Body

Required

application/json

An array of JSON Patch documents.

  • application/jsonarray of objects

    An array of JSON Patch documents.

    Show application/json properties
    • opstring
      Required

      The operation to be performed.

      Can be one of: "replace"

    • pathstring
      Required

      A JSON Pointer.

    • valuestring|number|boolean
      Required

      The value to be used for this operation.

      One of:
      • string
      • number
      • boolean

Responses

204

Thread updated successfully.

400

application/json

Bad request. Payload could not be parsed to a JSON Patch or Patch operations are invalid.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

401

application/json

Not authorized.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The term to patch was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

429

application/json

The request has been rate-limited.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
PATCH /v1/assistants/{assistantid}/threads/{threadid}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantid}/threads/{threadid}" \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '[{"op":"replace","path":"/name","value":"new name"}]'
const https = require('https')
  const data = JSON.stringify([{"op":"replace","path":"/name","value":"new name"}])
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantid}/threads/{threadid}',
    'method': 'PATCH',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

[
  {
    "op": "replace",
    "path": "/name",
    "value": "new name"
  }
]

Delete a thread

Deletes the specified thread and all of its resources.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantidstring
    Required

    The ID of the assistant containing the requested thread.

  • threadidstring
    Required

    The ID of the thread to retrieve.

Responses

204

Successful operation.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The assistant was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
DELETE /v1/assistants/{assistantid}/threads/{threadid}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantid}/threads/{threadid}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantid}/threads/{threadid}',
    'method': 'DELETE',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Execute synchronous prompt

Execute prompt in synchronous non-streaming mode.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The id of the Assistant containing requested Thread

  • threadIdstring
    Required

    The id of the Thread to retrieve

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • inputobject
      Show input properties
      • promptstring

        Input prompt string for the Assistant to respond to.

      • promptTypestring

        Sets the prompt type to thread.

        Can be one of: "thread"

      • includeTextboolean

        Returns text from chunks in sources output. Default value is false.

Responses

200

application/json

Prompt is successfully executed.

  • application/jsonobject
    Show application/json properties
    • outputstring

      Assistant's response to the prompt

    • sourcesarray of objects

      List of sources used to generate AI messages

      Show sources properties
      • chunksarray of objects

        List of Chunks used for "AI" generated messages

      • sourcestring

        path to the document used

      • documentIdstring

        reference to Document used for "AI" generated messages

      • datasourceIdstring

        reference to DataSource used for "AI" generated messages

      • knowledgebaseIdstring

        reference to KnowledgeBase used for "AI" generated messages

    • questionstring

      Question asked by the user for assistant to answer

400

application/json

The request is in incorrect format

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Custom error codes

        • AE-1 - Internal processing error
        • AE-2 - Incorrect request
        • AE-3 - Authentication issue
        • AE-4 - Prompt is rejected
        • AE-5 - Resource is not found
        • AE-6 - API usage rate limit is exceeded
        • AE-7 - Method is not allowed
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The user does not have privileges to perform the requested action.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Custom error codes

        • AE-1 - Internal processing error
        • AE-2 - Incorrect request
        • AE-3 - Authentication issue
        • AE-4 - Prompt is rejected
        • AE-5 - Resource is not found
        • AE-6 - API usage rate limit is exceeded
        • AE-7 - Method is not allowed
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

Assistant is not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Custom error codes

        • AE-1 - Internal processing error
        • AE-2 - Incorrect request
        • AE-3 - Authentication issue
        • AE-4 - Prompt is rejected
        • AE-5 - Resource is not found
        • AE-6 - API usage rate limit is exceeded
        • AE-7 - Method is not allowed
      • titlestring
      • detailstring
    • traceIdstring

500

application/json

Prompt processing error.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Custom error codes

        • AE-1 - Internal processing error
        • AE-2 - Incorrect request
        • AE-3 - Authentication issue
        • AE-4 - Prompt is rejected
        • AE-5 - Resource is not found
        • AE-6 - API usage rate limit is exceeded
        • AE-7 - Method is not allowed
      • titlestring
      • detailstring
    • traceIdstring
POST /v1/assistants/{assistantId}/threads/{threadId}/actions/invoke
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/threads/{threadId}/actions/invoke" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"input":{"prompt":"What is a LLM?","promptType":"thread","includeText":true}}'
const https = require('https')
  const data = JSON.stringify({"input":{"prompt":"What is a LLM?","promptType":"thread","includeText":true}})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/threads/{threadId}/actions/invoke',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "input": {
    "prompt": "What is a LLM?",
    "promptType": "thread",
    "includeText": true
  }
}

Response

{
  "output": "LLM stands for Large Language Model",
  "sources": [
    {
      "chunks": [
        {
          "text": "LLM stands for Large Language Model",
          "chunkId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
        }
      ],
      "source": "Reference.md",
      "documentId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "datasourceId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "knowledgebaseId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
    }
  ],
  "question": "What was the primary goal of the Apollo program?"
}

Execute asynchronous prompt

Execute prompt in asynchronous streaming mode.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The id of the Assistant containing requested Thread

  • threadIdstring
    Required

    The id of the Thread to retrieve

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • inputobject
      Show input properties
      • promptstring

        Input prompt string for the Assistant to respond to.

      • promptTypestring

        Sets the prompt type to thread.

        Can be one of: "thread"

      • includeTextboolean

        Returns text from chunks in sources output. Default value is false.

Responses

200

application/json

Prompt is successfully executed.

  • application/jsonobject
    Show application/json properties
    • outputstring

      Assistant's response to the prompt

    • sourcesarray of objects

      List of sources used to generate AI messages

      Show sources properties
      • chunksarray of objects

        List of Chunks used for "AI" generated messages

      • sourcestring

        path to the document used

      • documentIdstring

        reference to Document used for "AI" generated messages

      • datasourceIdstring

        reference to DataSource used for "AI" generated messages

      • knowledgebaseIdstring

        reference to KnowledgeBase used for "AI" generated messages

400

application/json

The request is in incorrect format

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Custom error codes

        • AE-1 - Internal processing error
        • AE-2 - Incorrect request
        • AE-3 - Authentication issue
        • AE-4 - Prompt is rejected
        • AE-5 - Resource is not found
        • AE-6 - API usage rate limit is exceeded
        • AE-7 - Method is not allowed
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The user does not have privileges to perform the requested action.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Custom error codes

        • AE-1 - Internal processing error
        • AE-2 - Incorrect request
        • AE-3 - Authentication issue
        • AE-4 - Prompt is rejected
        • AE-5 - Resource is not found
        • AE-6 - API usage rate limit is exceeded
        • AE-7 - Method is not allowed
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

Method is not allowed.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Custom error codes

        • AE-1 - Internal processing error
        • AE-2 - Incorrect request
        • AE-3 - Authentication issue
        • AE-4 - Prompt is rejected
        • AE-5 - Resource is not found
        • AE-6 - API usage rate limit is exceeded
        • AE-7 - Method is not allowed
      • titlestring
      • detailstring
    • traceIdstring

405

application/json

Assistant is not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Custom error codes

        • AE-1 - Internal processing error
        • AE-2 - Incorrect request
        • AE-3 - Authentication issue
        • AE-4 - Prompt is rejected
        • AE-5 - Resource is not found
        • AE-6 - API usage rate limit is exceeded
        • AE-7 - Method is not allowed
      • titlestring
      • detailstring
    • traceIdstring

500

application/json

Prompt processing error.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring

        Custom error codes

        • AE-1 - Internal processing error
        • AE-2 - Incorrect request
        • AE-3 - Authentication issue
        • AE-4 - Prompt is rejected
        • AE-5 - Resource is not found
        • AE-6 - API usage rate limit is exceeded
        • AE-7 - Method is not allowed
      • titlestring
      • detailstring
    • traceIdstring
POST /v1/assistants/{assistantId}/threads/{threadId}/actions/stream
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/threads/{threadId}/actions/stream" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"input":{"prompt":"What is a LLM?","promptType":"thread","includeText":true}}'
const https = require('https')
  const data = JSON.stringify({"input":{"prompt":"What is a LLM?","promptType":"thread","includeText":true}})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/threads/{threadId}/actions/stream',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "input": {
    "prompt": "What is a LLM?",
    "promptType": "thread",
    "includeText": true
  }
}

Response

{
  "output": "LLM stands for Large Language Model",
  "sources": [
    {
      "chunks": [
        {
          "text": "LLM stands for Large Language Model",
          "chunkId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
        }
      ],
      "source": "Reference.md",
      "documentId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "datasourceId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "knowledgebaseId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
    }
  ]
}

List interactions

Retrieves the list of interactions for the thread.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories

Query Parameters

  • limitinteger

    The number of feedback to get.

  • nextstring

    Optional parameter to request the next page.

  • prevstring

    Optional parameter to request the previous page.

  • sortstring

    Optional resource field name to sort on, case insensitive, e.g. created. Can be prefixed with - to set descending order; defaults to ascending.

    Can be one of: "CREATED""-CREATED""UPDATED""-UPDATED"

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant from which to retrieve the interactions.

  • threadIdstring
    Required

    The ID of the thread from which to retrieve the interactions.

Responses

200

application/json

Successfully retrieved the thread interactions.

  • application/jsonobject
    Show application/json properties
    • dataarray of objects
      Required
      Show data properties
      • idstring
        Required
      • ownerIdstring
        Required

        Unique identifier of user which created the interaction.

      • requeststring
        Required

        Interaction request content.

      • sourcesarray of objects
        Required

        List of sources used to generate AI messages (interactions).

        Show sources properties
        • chunksarray of objects
          Required

          List of Chunks used for "AI" generated messages.

          Show chunks properties
          • textstring

            Chunk text for "AI" generated message source.

          • chunkIdstring
            Required

            Chunk unique identifier for "AI" generated message source.

        • sourcestring
          Required

          Path to the document used.

        • documentIdstring
          Required

          Reference to Document used for "AI" generated messages.

        • datasourceIdstring
          Required

          Reference to DataSource used for "AI" generated messages.

        • lastIndexedAtstring

          Datetime when the knowledgebase was last indexed.

        • knowledgebaseIdstring
          Required

          Reference to KnowledgeBase used for "AI" generated messages.

      • feedbackobject
        Show feedback properties
        • idstring
          Required

          Unique feedback identifier.

        • voteinteger
          Required

          Integer representation of feedback given (-1 = negative, 1 = positive).

        • reasonstring
          Required

          Reason for feedback.

        • commentstring
          Required

          Optional comment for feedback.

        • reviewedAtstring

          Datetime when the feedback was reviewed.

        • reviewerIdstring
          Required

          Unique feedback reviewer identifier.

        • reviewStatusstring
          Required

          Feedback review status.

      • rejectedboolean

        Indicator the system marked request as suspicious.

      • responsestring
        Required

        Interaction response content.

      • threadIdstring
        Required

        ID of the thread to which the interaction belongs.

      • createdAtstring
        Required

        Datetime when the interaction was created.

      • updatedAtstring
        Required

        Datetime when the interaction was updated.

    • metaobject
      Show meta properties
      • countTotalinteger
    • linksobject
      Show links properties
      • nextobject
        Show next properties
        • hrefstring
      • prevobject
        Show prev properties
        • hrefstring
      • selfobject
        Show self properties
        • hrefstring

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The feedback was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
GET /v1/assistants/{assistantId}/threads/{threadId}/interactions
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/threads/{threadId}/interactions" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/threads/{threadId}/interactions',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Response

{
  "data": [
    {
      "id": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "ownerId": "65e310c43fb1cf46654e0878",
      "request": "Where was Genghis Khan buried?",
      "sources": [
        {
          "chunks": [
            {
              "text": "string",
              "chunkId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
            }
          ],
          "source": "Reference.md",
          "documentId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
          "datasourceId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
          "lastIndexedAt": "2021-10-02T14:20:50.52Z",
          "knowledgebaseId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
        }
      ],
      "feedback": {
        "id": "507f191e810c19729de860ea",
        "vote": 1,
        "reason": "inaccurate | irrelevant | repetitive | unhelpful | other",
        "comment": "string",
        "reviewedAt": "2021-10-02T14:20:50.52Z",
        "reviewerId": "507f191e810c19729de860ea",
        "reviewStatus": "reviewed | unreviewed"
      },
      "rejected": true,
      "response": "Somewhere in an unmarked grave",
      "threadId": "125c24c4-668c-4c97-bef8-30d910169913",
      "createdAt": "2021-10-02T14:20:50.52Z",
      "updatedAt": "2021-10-02T14:20:55.52Z"
    }
  ],
  "meta": {
    "countTotal": 42
  },
  "links": {
    "next": {
      "href": "string"
    },
    "prev": {
      "href": "string"
    },
    "self": {
      "href": "string"
    }
  }
}

Create an interaction

Creates a new interaction for the thread.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant in which to create the interaction.

  • threadIdstring
    Required

    The ID of the thread in which to create the interaction.

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • requeststring
      Required

      Interaction request content.

    • sourcesarray of objects
      Required

      List of sources used to generate AI messages (interactions).

      Show sources properties
      • chunksarray of objects
        Required

        List of Chunks used for "AI" generated messages.

        Show chunks properties
        • textstring

          Chunk text for "AI" generated message source.

        • chunkIdstring
          Required

          Chunk unique identifier for "AI" generated message source.

      • sourcestring
        Required

        Path to the document used.

      • documentIdstring
        Required

        Reference to Document used for "AI" generated messages.

      • datasourceIdstring
        Required

        Reference to DataSource used for "AI" generated messages.

      • lastIndexedAtstring

        Datetime when the knowledgebase was last indexed.

      • knowledgebaseIdstring
        Required

        Reference to KnowledgeBase used for "AI" generated messages.

    • rejectedboolean

      Indicator the system marked request as suspicious.

    • responsestring
      Required

      Interaction response content.

    • rejectionReasoninteger

      Rejection reason for a question:

      • 1 - PROMPT_INJECTION
      • 2 - OUT_OF_CONTEXT
      • 3 - TOO_COMPLEX

      Can be one of: 123

Responses

201

application/json

Successfully created a new thread interaction.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required
    • ownerIdstring
      Required

      Unique identifier of user which created the interaction.

    • requeststring
      Required

      Interaction request content.

    • sourcesarray of objects
      Required

      List of sources used to generate AI messages (interactions).

      Show sources properties
      • chunksarray of objects
        Required

        List of Chunks used for "AI" generated messages.

        Show chunks properties
        • textstring

          Chunk text for "AI" generated message source.

        • chunkIdstring
          Required

          Chunk unique identifier for "AI" generated message source.

      • sourcestring
        Required

        Path to the document used.

      • documentIdstring
        Required

        Reference to Document used for "AI" generated messages.

      • datasourceIdstring
        Required

        Reference to DataSource used for "AI" generated messages.

      • lastIndexedAtstring

        Datetime when the knowledgebase was last indexed.

      • knowledgebaseIdstring
        Required

        Reference to KnowledgeBase used for "AI" generated messages.

    • feedbackobject
      Show feedback properties
      • idstring
        Required

        Unique feedback identifier.

      • voteinteger
        Required

        Integer representation of feedback given (-1 = negative, 1 = positive).

      • reasonstring
        Required

        Reason for feedback.

      • commentstring
        Required

        Optional comment for feedback.

      • reviewedAtstring

        Datetime when the feedback was reviewed.

      • reviewerIdstring
        Required

        Unique feedback reviewer identifier.

      • reviewStatusstring
        Required

        Feedback review status.

    • rejectedboolean

      Indicator the system marked request as suspicious.

    • responsestring
      Required

      Interaction response content.

    • threadIdstring
      Required

      ID of the thread to which the interaction belongs.

    • createdAtstring
      Required

      Datetime when the interaction was created.

    • updatedAtstring
      Required

      Datetime when the interaction was updated.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The user does not have privileges to perform the requested action.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The assistant or the thread was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
POST /v1/assistants/{assistantId}/threads/{threadId}/interactions
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/threads/{threadId}/interactions" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"request":"Where was Genghis Khan buried?","sources":[{"chunks":[{"text":"string","chunkId":"10d347c4-f28a-4faf-93f0-48e781aaf303"}],"source":"Reference.md","documentId":"10d347c4-f28a-4faf-93f0-48e781aaf303","datasourceId":"10d347c4-f28a-4faf-93f0-48e781aaf303","lastIndexedAt":"2021-10-02T14:20:50.52Z","knowledgebaseId":"10d347c4-f28a-4faf-93f0-48e781aaf303"}],"rejected":true,"response":"Somewhere in an unmarked grave","rejectionReason":1}'
const https = require('https')
  const data = JSON.stringify({"request":"Where was Genghis Khan buried?","sources":[{"chunks":[{"text":"string","chunkId":"10d347c4-f28a-4faf-93f0-48e781aaf303"}],"source":"Reference.md","documentId":"10d347c4-f28a-4faf-93f0-48e781aaf303","datasourceId":"10d347c4-f28a-4faf-93f0-48e781aaf303","lastIndexedAt":"2021-10-02T14:20:50.52Z","knowledgebaseId":"10d347c4-f28a-4faf-93f0-48e781aaf303"}],"rejected":true,"response":"Somewhere in an unmarked grave","rejectionReason":1})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/threads/{threadId}/interactions',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "request": "Where was Genghis Khan buried?",
  "sources": [
    {
      "chunks": [
        {
          "text": "string",
          "chunkId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
        }
      ],
      "source": "Reference.md",
      "documentId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "datasourceId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "lastIndexedAt": "2021-10-02T14:20:50.52Z",
      "knowledgebaseId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
    }
  ],
  "rejected": true,
  "response": "Somewhere in an unmarked grave",
  "rejectionReason": 1
}

Response

{
  "id": "10d347c4-f28a-4faf-93f0-48e781aaf303",
  "ownerId": "65e310c43fb1cf46654e0878",
  "request": "Where was Genghis Khan buried?",
  "sources": [
    {
      "chunks": [
        {
          "text": "string",
          "chunkId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
        }
      ],
      "source": "Reference.md",
      "documentId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "datasourceId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "lastIndexedAt": "2021-10-02T14:20:50.52Z",
      "knowledgebaseId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
    }
  ],
  "feedback": {
    "id": "507f191e810c19729de860ea",
    "vote": 1,
    "reason": "inaccurate | irrelevant | repetitive | unhelpful | other",
    "comment": "string",
    "reviewedAt": "2021-10-02T14:20:50.52Z",
    "reviewerId": "507f191e810c19729de860ea",
    "reviewStatus": "reviewed | unreviewed"
  },
  "rejected": true,
  "response": "Somewhere in an unmarked grave",
  "threadId": "125c24c4-668c-4c97-bef8-30d910169913",
  "createdAt": "2021-10-02T14:20:50.52Z",
  "updatedAt": "2021-10-02T14:20:55.52Z"
}

Get an interaction

Retrieves an interaction for the thread.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant in which to retrieve the interaction.

  • interactionIdstring
    Required

    The ID of the interaction to retrieve.

  • threadIdstring
    Required

    The ID of the thread in which to retrieve the interaction.

Responses

200

application/json

Successfully retrieved the interaction.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required
    • ownerIdstring
      Required

      Unique identifier of user which created the interaction.

    • requeststring
      Required

      Interaction request content.

    • sourcesarray of objects
      Required

      List of sources used to generate AI messages (interactions).

      Show sources properties
      • chunksarray of objects
        Required

        List of Chunks used for "AI" generated messages.

        Show chunks properties
        • textstring

          Chunk text for "AI" generated message source.

        • chunkIdstring
          Required

          Chunk unique identifier for "AI" generated message source.

      • sourcestring
        Required

        Path to the document used.

      • documentIdstring
        Required

        Reference to Document used for "AI" generated messages.

      • datasourceIdstring
        Required

        Reference to DataSource used for "AI" generated messages.

      • lastIndexedAtstring

        Datetime when the knowledgebase was last indexed.

      • knowledgebaseIdstring
        Required

        Reference to KnowledgeBase used for "AI" generated messages.

    • feedbackobject
      Show feedback properties
      • idstring
        Required

        Unique feedback identifier.

      • voteinteger
        Required

        Integer representation of feedback given (-1 = negative, 1 = positive).

      • reasonstring
        Required

        Reason for feedback.

      • commentstring
        Required

        Optional comment for feedback.

      • reviewedAtstring

        Datetime when the feedback was reviewed.

      • reviewerIdstring
        Required

        Unique feedback reviewer identifier.

      • reviewStatusstring
        Required

        Feedback review status.

    • rejectedboolean

      Indicator the system marked request as suspicious.

    • responsestring
      Required

      Interaction response content.

    • threadIdstring
      Required

      ID of the thread to which the interaction belongs.

    • createdAtstring
      Required

      Datetime when the interaction was created.

    • updatedAtstring
      Required

      Datetime when the interaction was updated.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The interaction was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
GET /v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Response

{
  "id": "10d347c4-f28a-4faf-93f0-48e781aaf303",
  "ownerId": "65e310c43fb1cf46654e0878",
  "request": "Where was Genghis Khan buried?",
  "sources": [
    {
      "chunks": [
        {
          "text": "string",
          "chunkId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
        }
      ],
      "source": "Reference.md",
      "documentId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "datasourceId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "lastIndexedAt": "2021-10-02T14:20:50.52Z",
      "knowledgebaseId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
    }
  ],
  "feedback": {
    "id": "507f191e810c19729de860ea",
    "vote": 1,
    "reason": "inaccurate | irrelevant | repetitive | unhelpful | other",
    "comment": "string",
    "reviewedAt": "2021-10-02T14:20:50.52Z",
    "reviewerId": "507f191e810c19729de860ea",
    "reviewStatus": "reviewed | unreviewed"
  },
  "rejected": true,
  "response": "Somewhere in an unmarked grave",
  "threadId": "125c24c4-668c-4c97-bef8-30d910169913",
  "createdAt": "2021-10-02T14:20:50.52Z",
  "updatedAt": "2021-10-02T14:20:55.52Z"
}

Delete an interaction

Deletes the specified interaction and all of its resources.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant in which to delete the interaction.

  • interactionIdstring
    Required

    The ID of the interaction to delete.

  • threadIdstring
    Required

    The ID of the thread in which to delete the interaction.

Responses

204

Successful operation.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The resource was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
DELETE /v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}',
    'method': 'DELETE',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Create feedback

Creates feedback for the thread.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant in which to create the feedback.

  • interactionIdstring
    Required

    The ID of the interaction in which to create the feedback.

  • threadIdstring
    Required

    The ID of the thread in which to create the feedback.

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • voteinteger
      Required

      Integer representation of feedback given (-1 = negative, 1 = positive).

    • reasonstring
      Required

      Reason for feedback.

    • commentstring

      Optional comment for feedback.

Responses

201

application/json

Successfully created a new thread feedback.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required
    • ownerIdstring
      Required

      Unique identifier of user which created the interaction.

    • requeststring
      Required

      Interaction request content.

    • sourcesarray of objects
      Required

      List of sources used to generate AI messages (interactions).

      Show sources properties
      • chunksarray of objects
        Required

        List of Chunks used for "AI" generated messages.

        Show chunks properties
        • textstring

          Chunk text for "AI" generated message source.

        • chunkIdstring
          Required

          Chunk unique identifier for "AI" generated message source.

      • sourcestring
        Required

        Path to the document used.

      • documentIdstring
        Required

        Reference to Document used for "AI" generated messages.

      • datasourceIdstring
        Required

        Reference to DataSource used for "AI" generated messages.

      • lastIndexedAtstring

        Datetime when the knowledgebase was last indexed.

      • knowledgebaseIdstring
        Required

        Reference to KnowledgeBase used for "AI" generated messages.

    • feedbackobject
      Show feedback properties
      • idstring
        Required

        Unique feedback identifier.

      • voteinteger
        Required

        Integer representation of feedback given (-1 = negative, 1 = positive).

      • reasonstring
        Required

        Reason for feedback.

      • commentstring
        Required

        Optional comment for feedback.

      • reviewedAtstring

        Datetime when the feedback was reviewed.

      • reviewerIdstring
        Required

        Unique feedback reviewer identifier.

      • reviewStatusstring
        Required

        Feedback review status.

    • rejectedboolean

      Indicator the system marked request as suspicious.

    • responsestring
      Required

      Interaction response content.

    • threadIdstring
      Required

      ID of the thread to which the interaction belongs.

    • createdAtstring
      Required

      Datetime when the interaction was created.

    • updatedAtstring
      Required

      Datetime when the interaction was updated.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The user does not have privileges to perform the requested action.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The resource was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
POST /v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/feedback
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/feedback" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"vote":1,"reason":"inaccurate | irrelevant | repetitive | unhelpful | other","comment":"string"}'
const https = require('https')
  const data = JSON.stringify({"vote":1,"reason":"inaccurate | irrelevant | repetitive | unhelpful | other","comment":"string"})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/feedback',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "vote": 1,
  "reason": "inaccurate | irrelevant | repetitive | unhelpful | other",
  "comment": "string"
}

Response

{
  "id": "10d347c4-f28a-4faf-93f0-48e781aaf303",
  "ownerId": "65e310c43fb1cf46654e0878",
  "request": "Where was Genghis Khan buried?",
  "sources": [
    {
      "chunks": [
        {
          "text": "string",
          "chunkId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
        }
      ],
      "source": "Reference.md",
      "documentId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "datasourceId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "lastIndexedAt": "2021-10-02T14:20:50.52Z",
      "knowledgebaseId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
    }
  ],
  "feedback": {
    "id": "507f191e810c19729de860ea",
    "vote": 1,
    "reason": "inaccurate | irrelevant | repetitive | unhelpful | other",
    "comment": "string",
    "reviewedAt": "2021-10-02T14:20:50.52Z",
    "reviewerId": "507f191e810c19729de860ea",
    "reviewStatus": "reviewed | unreviewed"
  },
  "rejected": true,
  "response": "Somewhere in an unmarked grave",
  "threadId": "125c24c4-668c-4c97-bef8-30d910169913",
  "createdAt": "2021-10-02T14:20:50.52Z",
  "updatedAt": "2021-10-02T14:20:55.52Z"
}

Update feedback

Updates feedback for the thread.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant containing the requested feedback.

  • feedbackIdstring
    Required

    The ID of the feedback to update.

  • interactionIdstring
    Required

    The ID of the interaction containing the requested Feedback.

  • threadIdstring
    Required

    The ID of the thread containing the requested feedback.

Request Body

application/json

An array of JSON Patch documents.

  • application/jsonarray of objects

    An array of JSON Patch documents.

    Show application/json properties
    • opstring
      Required

      The operation to be performed.

      Can be one of: "replace"

    • pathstring
      Required

      A JSON Pointer.

    • valuestring|number|boolean
      Required

      The value to be used for this operation.

      One of:
      • string
      • number
      • boolean

Responses

204

Successfully updated the feedback.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The resource was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
PATCH /v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/feedback/{feedbackId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/feedback/{feedbackId}" \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '[{"op":"replace","path":"/reason","value":"irrelevant"}]'
const https = require('https')
  const data = JSON.stringify([{"op":"replace","path":"/reason","value":"irrelevant"}])
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/feedback/{feedbackId}',
    'method': 'PATCH',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

[
  {
    "op": "replace",
    "path": "/reason",
    "value": "irrelevant"
  }
]

Create feedback review

Creates feedback review for the thread.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • assistantIdstring
    Required

    The ID of the assistant in which to create the feedback review.

  • interactionIdstring
    Required

    The ID of the interaction in which to create the feedback review.

  • threadIdstring
    Required

    The ID of the thread in which to create the feedback review.

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • reviewStatusstring
      Required

      Review status.

Responses

201

application/json

Successfully created a new thread feedback.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required
    • ownerIdstring
      Required

      Unique identifier of user which created the interaction.

    • requeststring
      Required

      Interaction request content.

    • sourcesarray of objects
      Required

      List of sources used to generate AI messages (interactions).

      Show sources properties
      • chunksarray of objects
        Required

        List of Chunks used for "AI" generated messages.

        Show chunks properties
        • textstring

          Chunk text for "AI" generated message source.

        • chunkIdstring
          Required

          Chunk unique identifier for "AI" generated message source.

      • sourcestring
        Required

        Path to the document used.

      • documentIdstring
        Required

        Reference to Document used for "AI" generated messages.

      • datasourceIdstring
        Required

        Reference to DataSource used for "AI" generated messages.

      • lastIndexedAtstring

        Datetime when the knowledgebase was last indexed.

      • knowledgebaseIdstring
        Required

        Reference to KnowledgeBase used for "AI" generated messages.

    • feedbackobject
      Show feedback properties
      • idstring
        Required

        Unique feedback identifier.

      • voteinteger
        Required

        Integer representation of feedback given (-1 = negative, 1 = positive).

      • reasonstring
        Required

        Reason for feedback.

      • commentstring
        Required

        Optional comment for feedback.

      • reviewedAtstring

        Datetime when the feedback was reviewed.

      • reviewerIdstring
        Required

        Unique feedback reviewer identifier.

      • reviewStatusstring
        Required

        Feedback review status.

    • rejectedboolean

      Indicator the system marked request as suspicious.

    • responsestring
      Required

      Interaction response content.

    • threadIdstring
      Required

      ID of the thread to which the interaction belongs.

    • createdAtstring
      Required

      Datetime when the interaction was created.

    • updatedAtstring
      Required

      Datetime when the interaction was updated.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The user does not have privileges to perform the requested action.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

A resource was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
POST /v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/reviews
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/reviews" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"reviewStatus":"reviewed | unreviewed"}'
const https = require('https')
  const data = JSON.stringify({"reviewStatus":"reviewed | unreviewed"})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{assistantId}/threads/{threadId}/interactions/{interactionId}/reviews',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "reviewStatus": "reviewed | unreviewed"
}

Response

{
  "id": "10d347c4-f28a-4faf-93f0-48e781aaf303",
  "ownerId": "65e310c43fb1cf46654e0878",
  "request": "Where was Genghis Khan buried?",
  "sources": [
    {
      "chunks": [
        {
          "text": "string",
          "chunkId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
        }
      ],
      "source": "Reference.md",
      "documentId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "datasourceId": "10d347c4-f28a-4faf-93f0-48e781aaf303",
      "lastIndexedAt": "2021-10-02T14:20:50.52Z",
      "knowledgebaseId": "10d347c4-f28a-4faf-93f0-48e781aaf303"
    }
  ],
  "feedback": {
    "id": "507f191e810c19729de860ea",
    "vote": 1,
    "reason": "inaccurate | irrelevant | repetitive | unhelpful | other",
    "comment": "string",
    "reviewedAt": "2021-10-02T14:20:50.52Z",
    "reviewerId": "507f191e810c19729de860ea",
    "reviewStatus": "reviewed | unreviewed"
  },
  "rejected": true,
  "response": "Somewhere in an unmarked grave",
  "threadId": "125c24c4-668c-4c97-bef8-30d910169913",
  "createdAt": "2021-10-02T14:20:50.52Z",
  "updatedAt": "2021-10-02T14:20:55.52Z"
}

Get an assistant

Retrieves the specified assistant.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories

Path Parameters

  • idstring
    Required

    The ID of the assistant to retrieve.

Responses

200

application/json

Successfully retrieved the assistant.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      Unique identifier of the assistant.

    • namestring
      Required

      The name of the assistant.

    • tagsarray of strings
      Required

      The list of tags associated with the assistant.

    • titlestring

      The title of the assistant.

    • ownerIdstring
      Required

      Unique identifier of the assistant owner.

    • spaceIdstring
      Required

      Unique identifier of the space containing the assistant.

    • tenantIdstring
      Required

      Unique identifier of the assistant tenant.

    • createdAtstring
      Required

      Datetime when the assistant was created.

    • createdBystring
      Required

      Unique identifier of the user who created the assistant.

    • hasAvatarboolean

      Indicates if the assistant has an avatar.

    • updatedAtstring
      Required

      Datetime when the assistant was updated.

    • updatedBystring
      Required

      Unique identifier of the user who last updated the assistant.

    • descriptionstring
      Required

      The description of the assistant.

    • systemMessagestringDeprecated

      System prompt setting up conversation context.

    • knowledgeBasesarray of strings
      Required

      List of knowledgebases the assistant is using.

    • welcomeMessagestring
      Required

      Initial message in the chat conversation.

    • customPropertiesobject
      Required

      freeform JSON to allow custom customization options.

    • defaultPromptTypestring

      Default prompt type for the assistant.

      Can be one of: "thread""oneshot"

    • orderedStarterIdsarray of strings

      List of starter IDs in the order they will be sorted.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The assistant was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
GET /v1/assistants/{id}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{id}" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{id}',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli

Response

{
  "id": "507f191e810c19729de860ea",
  "name": "Organization-wide Assistant",
  "tags": [
    "Red",
    "Sales"
  ],
  "title": "Assistant for Sales activities",
  "ownerId": "507f191e810c19729de860ea",
  "spaceId": "507f191e810c19729de860ea",
  "tenantId": "507f191e810c19729de860ea",
  "createdAt": "2021-10-02T14:20:50.52Z",
  "createdBy": "507f191e810c19729de860ea",
  "hasAvatar": true,
  "updatedAt": "2021-10-02T14:20:50.52Z",
  "updatedBy": "507f191e810c19729de860ea",
  "description": "This assistant is used for...",
  "systemMessage": "You are helpful Sales assistant. Provide concise and actionable insights.",
  "knowledgeBases": [
    "507f191e810c19729de860ea"
  ],
  "welcomeMessage": "Welcome to Sales process support Assistant.",
  "customProperties": {
    "customErrors": {
      "outsideScopeError": "Outside of scope error",
      "complexQuestionError": "Complex question error",
      "promptInjectionError": "Prompt injection error"
    }
  },
  "defaultPromptType": "thread",
  "orderedStarterIds": [
    "507f191e810c19729de860ea",
    "787f191e810c19729de860er"
  ]
}

Update assistant properties

Updates the properties of an existing assistant with JSON Patch-formatted data.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Header Parameters

  • if-matchstring

    Optional header to do conditional updates. Using the Etag value that was returned the last time the assistant was fetched.

Path Parameters

  • idstring
    Required

    The assistant ID.

Request Body

Required

application/json

An array of JSON Patch documents.

  • application/jsonarray of objects

    An array of JSON Patch documents.

    Show application/json properties
    • opstring
      Required

      The operation to be performed.

      Can be one of: "replace"

    • pathstring
      Required

      A JSON Pointer.

    • valuestring|number|boolean
      Required

      The value to be used for this operation.

      One of:
      • string
      • number
      • boolean

Responses

204

Assistant updated successfully.

400

application/json

Bad request. Payload could not be parsed to a JSON Patch or Patch operations are invalid.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

401

application/json

Not authorized.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The term to patch was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

429

application/json

The request has been rate-limited.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
PATCH /v1/assistants/{id}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{id}" \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '[{"op":"replace","path":"/name","value":"new name"},{"op":"replace","path":"/description","value":"new description"},{"op":"add","path":"/defaultPromptType","value":"thread"},{"op":"remove","path":"/avatar"},{"op":"add","path":"/avatar","value":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAlAQAAAAAsYlcCAAAACklEQVR4AWMYBQABAwABRUEDtQAAAABJRU5ErkJggg=="},{"op":"replace","path":"/avatar","value":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAlAQAAAAAsYlcCAAAACklEQVR4AWMYBQABAwABRUEDtQAAAABJRU5ErkJggg=="}]'
const https = require('https')
  const data = JSON.stringify([{"op":"replace","path":"/name","value":"new name"},{"op":"replace","path":"/description","value":"new description"},{"op":"add","path":"/defaultPromptType","value":"thread"},{"op":"remove","path":"/avatar"},{"op":"add","path":"/avatar","value":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAlAQAAAAAsYlcCAAAACklEQVR4AWMYBQABAwABRUEDtQAAAABJRU5ErkJggg=="},{"op":"replace","path":"/avatar","value":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAlAQAAAAAsYlcCAAAACklEQVR4AWMYBQABAwABRUEDtQAAAABJRU5ErkJggg=="}])
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{id}',
    'method': 'PATCH',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

[
  {
    "op": "replace",
    "path": "/name",
    "value": "new name"
  },
  {
    "op": "replace",
    "path": "/description",
    "value": "new description"
  },
  {
    "op": "add",
    "path": "/defaultPromptType",
    "value": "thread"
  },
  {
    "op": "remove",
    "path": "/avatar"
  },
  {
    "op": "add",
    "path": "/avatar",
    "value": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAlAQAAAAAsYlcCAAAACklEQVR4AWMYBQABAwABRUEDtQAAAABJRU5ErkJggg=="
  },
  {
    "op": "replace",
    "path": "/avatar",
    "value": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAlAQAAAAAsYlcCAAAACklEQVR4AWMYBQABAwABRUEDtQAAAABJRU5ErkJggg=="
  }
]

Delete an assistant

Deletes the assistant and all of its resources.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories

Path Parameters

  • idstring
    Required

    The ID of the assistant to delete.

Responses

204

Successful operation.

400

application/json

The request is in incorrect format.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

403

application/json

The operation failed due to insufficient permissions.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring

404

application/json

The assistant was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
      • titlestring
      • detailstring
    • traceIdstring
DELETE /v1/assistants/{id}
curl "https://your-tenant.us.qlikcloud.com/api/v1/assistants/{id}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/assistants/{id}',
    'method': 'DELETE',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
This API is not included yet in qlik-cli