Knowledgebases
Knowledgebases are collections of individual data sources, that are indexed for use in generating responses to user questions via Assistants for Qlik Answers.
Endpoints
Returns a list of all knowledgebases the user has access to.
Facts
| Rate limit | Tier 1 (1000 requests per minute) |
Query Parameters
- limit integer
The number of knowledgebases to get.
- next string
Optional parameter to request the next page.
- prev string
Optional parameter to request the previous page.
- sort string
Optional resource field name to sort on, case insensitive, eg. name. Can be prefixed with - to set descending order, defaults to ascending.
Can be one of: "NAME""-NAME""DESCRIPTION""-DESCRIPTION""CREATED""-CREATED""UPDATED""-UPDATED"
- countTotal boolean Deprecated
Optional parameter to request total count for query
Responses
200
Successful Operation.
- application/json object
application/json properties
- data array of objectsRequired
data properties
- id stringRequired
Unique identifier of the knowledgebase
- name stringRequired
Name of the knowledgebase
- tags array of stringsRequired
List of tags associated with the knowledgebase.
- ownerId stringRequired
The unique identifier of the knowledgebase owner
- spaceId stringRequired
The unique identifier of the space containing the knowledgebase
- tenantId string
Unique identifier of the tenant
- createdAt stringRequired
Datetime when the knowledgebase was created
- createdBy stringRequired
Unique identifier of the user who created the knowledgebase
- updatedAt stringRequired
Datetime when the knowledgebase was updated
- updatedBy stringRequired
The unique identifier of the user who last updated the knowledgebase
- description stringRequired
Description of the knowledgebase
- lastIndexedAt string
Datetime when the knowledgebase was last indexed
- contentSummary objectRequired
contentSummary properties
- fileSize integerRequired
- textSize integerRequired
- fileCount integerRequired
- effectivePages integerRequired
-
- advancedIndexing boolean
User opt in to advanced parsing and chunking pipeline. Default is false, which will run legacy parsing and chunking.
- selectedErrorsCount integer
Number of selected errors to store in the case of any failed datasources.
-
- links object
links properties
- next object
next properties
- href string
-
- prev object
prev properties
- href string
-
- self object
self properties
- href string
-
-
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.getKnowledgebases({})qlik knowledgebase lscurl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases" \-H "Authorization: Bearer <access_token>"Example Response
{ "data": [ { "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "name": "Organization wide knowledgebase", "tags": [ "Red", "Sales" ], "ownerId": "507f191e810c19729de860ea", "spaceId": "507f191e810c19729de860ea", "tenantId": "507f191e810c19729de860ea", "createdAt": "2021-10-02T14:20:50.52Z", "createdBy": "507f191e810c19729de860ea", "updatedAt": "2021-10-02T14:20:50.52Z", "updatedBy": "507f191e810c19729de860ea", "description": "This knowledgebase is used for...", "lastIndexedAt": "2021-10-02T14:20:50.52Z", "contentSummary": { "fileSize": 42, "textSize": 42, "fileCount": 42, "effectivePages": 42 }, "advancedIndexing": true, "selectedErrorsCount": 10 } ], "links": { "next": { "href": "string" }, "prev": { "href": "string" }, "self": { "href": "string" } }}Creates a new knowledgebase.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Request Body
- application/json object
application/json properties
- name stringRequired
Name of the knowledgebase
- tags array of strings
List of tags for knowledgebase
- spaceId stringRequired
Unique identifier of the space to contain the knowledgebase
- description string
Description of the knowledgebase
- advancedIndexing boolean
User opt in to advanced parsing and chunking pipeline. Default is false, which will run legacy parsing and chunking.
- selectedErrorsCount integer
Number of selected errors to store in the case of any failed datasources. Optional value with a default of 10.
-
Responses
201
Successfully created a new knowledgebase.
- application/json object
application/json properties
- id stringRequired
Unique identifier of the knowledgebase
- name stringRequired
Name of the knowledgebase
- tags array of stringsRequired
List of tags associated with the knowledgebase.
- ownerId stringRequired
The unique identifier of the knowledgebase owner
- spaceId stringRequired
The unique identifier of the space containing the knowledgebase
- tenantId string
Unique identifier of the tenant
- createdAt stringRequired
Datetime when the knowledgebase was created
- createdBy stringRequired
Unique identifier of the user who created the knowledgebase
- updatedAt stringRequired
Datetime when the knowledgebase was updated
- updatedBy stringRequired
The unique identifier of the user who last updated the knowledgebase
- description stringRequired
Description of the knowledgebase
- lastIndexedAt string
Datetime when the knowledgebase was last indexed
- contentSummary objectRequired
contentSummary properties
- fileSize integerRequired
- textSize integerRequired
- fileCount integerRequired
- effectivePages integerRequired
-
- advancedIndexing boolean
User opt in to advanced parsing and chunking pipeline. Default is false, which will run legacy parsing and chunking.
- selectedErrorsCount integer
Number of selected errors to store in the case of any failed datasources.
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.createKnowledgebase({ advancedIndexing: true, description: 'This knowledgebase is used for...', name: 'Organization wide knowledgebase', selectedErrorsCount: 10, spaceId: '507f191e810c19729de860ea', tags: ['Red', 'Sales'],})qlik knowledgebase create \ --name 'Organization wide knowledgebase' \ --spaceId '507f191e810c19729de860ea'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases" \-X POST \-H "Content-type: application/json" \-H "Authorization: Bearer <access_token>" \-d '{"name":"Organization wide knowledgebase","tags":["Red","Sales"],"spaceId":"507f191e810c19729de860ea","description":"This knowledgebase is used for...","advancedIndexing":true,"selectedErrorsCount":10}'Example Response
{ "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "name": "Organization wide knowledgebase", "tags": [ "Red", "Sales" ], "ownerId": "507f191e810c19729de860ea", "spaceId": "507f191e810c19729de860ea", "tenantId": "507f191e810c19729de860ea", "createdAt": "2021-10-02T14:20:50.52Z", "createdBy": "507f191e810c19729de860ea", "updatedAt": "2021-10-02T14:20:50.52Z", "updatedBy": "507f191e810c19729de860ea", "description": "This knowledgebase is used for...", "lastIndexedAt": "2021-10-02T14:20:50.52Z", "contentSummary": { "fileSize": 42, "textSize": 42, "fileCount": 42, "effectivePages": 42 }, "advancedIndexing": true, "selectedErrorsCount": 10}Retrieves a specific knowledgebase.
Facts
| Rate limit | Tier 1 (1000 requests per minute) |
Path Parameters
- id stringRequired
The id of the knowledgebase to retrieve.
Responses
200
Successfully retrieved the knowledgebase.
- application/json object
application/json properties
- id stringRequired
Unique identifier of the knowledgebase
- name stringRequired
Name of the knowledgebase
- tags array of stringsRequired
List of tags associated with the knowledgebase.
- ownerId stringRequired
The unique identifier of the knowledgebase owner
- spaceId stringRequired
The unique identifier of the space containing the knowledgebase
- tenantId string
Unique identifier of the tenant
- createdAt stringRequired
Datetime when the knowledgebase was created
- createdBy stringRequired
Unique identifier of the user who created the knowledgebase
- updatedAt stringRequired
Datetime when the knowledgebase was updated
- updatedBy stringRequired
The unique identifier of the user who last updated the knowledgebase
- description stringRequired
Description of the knowledgebase
- lastIndexedAt string
Datetime when the knowledgebase was last indexed
- contentSummary objectRequired
contentSummary properties
- fileSize integerRequired
- textSize integerRequired
- fileCount integerRequired
- effectivePages integerRequired
-
- advancedIndexing boolean
User opt in to advanced parsing and chunking pipeline. Default is false, which will run legacy parsing and chunking.
- selectedErrorsCount integer
Number of selected errors to store in the case of any failed datasources.
- datasources array of objects
Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
datasources properties
- id stringRequired
Unique identifier of the datasource
- name string
Name of the datasource
- type stringRequired
Can be one of: "file""web""database"
- spaceId string
The unique identifier of the space containing the datasource
- chunking object
chunking properties
- size integerRequired
Size of chunks
- type stringRequired
Chunking strategy
- overlap integerRequired
Chunk overlap, should be less than size
- separators array of stringsRequired
List of separators to chunk by
- keepSeparator booleanRequired
Allows to keep or remove separators used
-
- syncInfo object
syncInfo properties
- status stringRequired
Sync status
Can be one of: "neverIndexed""progress""completed""completedWithError""toAdd""toDelete"
- startedAt stringRequired
Datetime when the sync task was started
- lastSyncId string
sync Id
- completedAt stringRequired
Datetime when the sync task was completed
-
- fileConfig object
Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
fileConfig properties
- files array of strings
- scope object
Scope for the file crawler.
scope properties
- depth integerRequired
The number of levels of sub folders that should be considered
- maxSize integer
Optional parameter. Max size of downloaded files in bytes
- extensions array of strings
list of file extensions to be considered
- maxFilesTotal integer
Total number of files that should be considered
- modifiedAfter string
only files modified after this time should be indexed. If set older files will be removed from index.
- maxFilesPerFolder integer
Maximum number of files per folder that should be considered
-
- folder string
Root folder for traversing.
- userId stringRequired
userId of the owner of the datasource fileConfig
- connectionId stringRequired
connection id to be used to retrieve the raw data
- crawlPatterns array of objects
Pattern matching links to crawl
crawlPatterns properties
- type stringRequired
include or exclude
Can be one of: "include""exclude"
- pattern stringRequired
Regex patterna to filter links on
-
-
- sourceCount integer
The number of times that a datasource was referenced as a source in an answer
- contentSummary objectRequired
contentSummary properties
- fileSize integerRequired
- textSize integerRequired
- fileCount integerRequired
- effectivePages integerRequired
-
-
- indexingProgress object
Aggregate indexing progress for the knowledgebase across the current sync.
indexingProgress properties
- status string
Aggregate indexing status for the knowledgebase.
Can be one of: "notStarted""inProgress""completed""completedWithError""cancelled"
- syncId string
Identifier of the sync currently driving this progress.
- updatedAt string
When this progress snapshot was last updated.
- filesTotal integer
Total number of files to index in the current sync.
- filesFailed integer
Number of files that failed to index.
- filesProcessed integer
Number of files processed so far.
- overallPercent integer
Aggregate indexing progress across the knowledgebase, 0-100.
-
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The operation failed due to insufficient permissions.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The knowledgebase is not found
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.getKnowledgebase( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d',)qlik knowledgebase get 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}" \-H "Authorization: Bearer <access_token>"Example Response
{ "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "name": "Organization wide knowledgebase", "tags": [ "Red", "Sales" ], "ownerId": "507f191e810c19729de860ea", "spaceId": "507f191e810c19729de860ea", "tenantId": "507f191e810c19729de860ea", "createdAt": "2021-10-02T14:20:50.52Z", "createdBy": "507f191e810c19729de860ea", "updatedAt": "2021-10-02T14:20:50.52Z", "updatedBy": "507f191e810c19729de860ea", "description": "This knowledgebase is used for...", "lastIndexedAt": "2021-10-02T14:20:50.52Z", "contentSummary": { "fileSize": 42, "textSize": 42, "fileCount": 42, "effectivePages": 42 }, "advancedIndexing": true, "selectedErrorsCount": 10, "datasources": [ { "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "name": "string", "type": "file", "spaceId": "507f191e810c19729de860ea", "chunking": { "size": 1024, "type": "recursive", "overlap": 20, "separators": [ "\n", ".", " " ], "keepSeparator": false }, "syncInfo": { "status": "neverIndexed", "startedAt": "2021-10-02T14:20:50.52Z", "lastSyncId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "completedAt": "2021-10-02T14:20:50.52Z" }, "fileConfig": { "files": [ "string" ], "scope": { "depth": 1, "maxSize": 1000000, "extensions": [ "pdf" ], "maxFilesTotal": 50, "modifiedAfter": "2021-10-02T14:20:50.52Z", "maxFilesPerFolder": 100 }, "folder": "folderA/folderB", "userId": "507f191e810c19729de860ea", "connectionId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "crawlPatterns": [ { "type": "include", "pattern": "(.*)example(.*)" } ] }, "sourceCount": 10, "contentSummary": { "fileSize": 42, "textSize": 42, "fileCount": 42, "effectivePages": 42 } } ], "indexingProgress": { "status": "inProgress", "syncId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "updatedAt": "2021-10-02T14:20:50.52Z", "filesTotal": 100, "filesFailed": 2, "filesProcessed": 45, "overallPercent": 45 }}Updates properties of a specific knowledgebase.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Header Parameters
- if-match string
Optional header to do conditional updates. Using the Etag value that was returned the last time the knowledgebase was fetched.
Path Parameters
- id stringRequired
The knowledgebase id.
Request Body
Required- application/json array of objects
An array of JSON Patch documents
application/json properties
- op stringRequired
The operation to be performed.
Can be one of: "REPLACE"
- path stringRequired
A JSON Pointer.
- value string|number|booleanRequired
The value to be used for this operation.
One of:- string
- number
- boolean
-
-
Responses
204
Knowledgebase updated successfully.
400
Bad request. Payload could not be parsed to a JSON Patch or Patch operations are invalid.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
401
Not authorized.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The operation failed due to insufficient permissions.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The term to patch was not found.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
429
Request has been rate limited.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.patchKnowledgebase( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', [ { op: 'replace', path: '/name', value: 'new name', },
{ op: 'replace', path: '/description', value: 'new description', }, ],)qlik knowledgebase patch 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --op 'replace' \ --path '/name' \ --value new namecurl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{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"}]'Deletes a knowledgebase and all of its resources.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Path Parameters
- id stringRequired
The id of the knowledgebase to delete.
Responses
204
Successful Operation.
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The operation failed due to insufficient permissions.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The knowledgebase is not found
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.deleteKnowledgebase( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d',)qlik knowledgebase rm 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}" \-X DELETE \-H "Authorization: Bearer <access_token>"Execute search with either SIMPLE or FULL mode. SIMPLE does semantic search while FULL will also do reranking and include keyword based chunks. Use topN to control number of chunks in response, max limit is 50. Default to 5.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Path Parameters
- id stringRequired
The ID of the knowledgebase
Request Body
- application/json object
application/json properties
- topN integer
Number of chunks to return in results.
- prompt stringRequired
Query text or question to search.
- documentId string
Optional document ID to restrict search results to chunks from a single document.
- searchMode string
Search mode to use. Allowed values:
SIMPLEandFULL. Default:SIMPLE.Can be one of: "SIMPLE""FULL"
-
Responses
200
Chunks retrieved successfully.
- application/json object
application/json properties
- chunks array of objectsRequired
Retrieved document chunks
chunks properties
- text stringRequired
Text content of the chunk
- chunkMeta objectRequired
Metadata about the chunk
chunkMeta properties
- source stringRequired
source of chunk
- chunkId stringRequired
chunkId
- documentId stringRequired
documentId of chunk
- datasourceId stringRequired
datasourceId of chunk
- knowledgeBaseId stringRequired
knowledgeBaseId of chunk
-
- tfidfScore number
Score from keyword search
- searchSource string
search method for the chunk, e.g.
semantic search,keyword searchorsemantic and keyword search - semanticScore number
Similarity score from embedding match
-
-
400
The request is in incorrect format
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
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
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
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
- title string
- detail string
-
- traceId string
-
404
Knowledgebase is not found.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
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
- title string
- detail string
-
- traceId string
-
405
Method is not allowed.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
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
- title string
- detail string
-
- traceId string
-
500
Prompt processing error.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
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
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.searchKnowledgebase( '507f191e810c19729de860ea', { prompt: 'What is LLM?', searchMode: 'SIMPLE', topN: 20, },)qlik knowledgebase search '507f191e810c19729de860ea' \ --prompt 'What is LLM?'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/actions/search" \-X POST \-H "Content-type: application/json" \-H "Authorization: Bearer <access_token>" \-d '{"topN":20,"prompt":"What is LLM?","documentId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","searchMode":"SIMPLE"}'Example Response
{ "chunks": [ { "text": "LLM stands for Large Language Model", "chunkMeta": { "source": "string", "chunkId": "string", "documentId": "string", "datasourceId": "string", "knowledgeBaseId": "string" }, "tfidfScore": 0.9, "searchSource": "string", "semanticScore": 0.63 } ]}Adds a datasource to a knowledgebase.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Path Parameters
- id stringRequired
The id of the knowledgebase.
Request Body
- application/json object
Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
application/json properties
- name stringRequired
Name of the datasource
- type stringRequired
Can be one of: "file""web""database"
- fileConfig object
Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
fileConfig properties
- files array of strings
- scope object
Scope for the file crawler.
scope properties
- depth integerRequired
The number of levels of sub folders that should be considered
- maxSize integer
Optional parameter. Max size of downloaded files in bytes
- extensions array of strings
list of file extensions to be considered
- maxFilesTotal integer
Total number of files that should be considered
- modifiedAfter string
only files modified after this time should be indexed. If set older files will be removed from index.
- maxFilesPerFolder integer
Maximum number of files per folder that should be considered
-
- folder string
Root folder for traversing.
- userId stringRequired
userId of the owner of the datasource fileConfig
- connectionId stringRequired
connection id to be used to retrieve the raw data
- crawlPatterns array of objects
Pattern matching links to crawl
crawlPatterns properties
- type stringRequired
include or exclude
Can be one of: "include""exclude"
- pattern stringRequired
Regex patterna to filter links on
-
-
-
Responses
201
Successfully added a datasource to the knowledgebase.
- application/json object
Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
application/json properties
- id stringRequired
Unique identifier of the datasource
- name string
Name of the datasource
- type stringRequired
Can be one of: "file""web""database"
- spaceId string
The unique identifier of the space containing the datasource
- chunking object
chunking properties
- size integerRequired
Size of chunks
- type stringRequired
Chunking strategy
- overlap integerRequired
Chunk overlap, should be less than size
- separators array of stringsRequired
List of separators to chunk by
- keepSeparator booleanRequired
Allows to keep or remove separators used
-
- syncInfo object
syncInfo properties
- status stringRequired
Sync status
Can be one of: "neverIndexed""progress""completed""completedWithError""toAdd""toDelete"
- startedAt stringRequired
Datetime when the sync task was started
- lastSyncId string
sync Id
- completedAt stringRequired
Datetime when the sync task was completed
-
- fileConfig object
Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
fileConfig properties
- files array of strings
- scope object
Scope for the file crawler.
scope properties
- depth integerRequired
The number of levels of sub folders that should be considered
- maxSize integer
Optional parameter. Max size of downloaded files in bytes
- extensions array of strings
list of file extensions to be considered
- maxFilesTotal integer
Total number of files that should be considered
- modifiedAfter string
only files modified after this time should be indexed. If set older files will be removed from index.
- maxFilesPerFolder integer
Maximum number of files per folder that should be considered
-
- folder string
Root folder for traversing.
- userId stringRequired
userId of the owner of the datasource fileConfig
- connectionId stringRequired
connection id to be used to retrieve the raw data
- crawlPatterns array of objects
Pattern matching links to crawl
crawlPatterns properties
- type stringRequired
include or exclude
Can be one of: "include""exclude"
- pattern stringRequired
Regex patterna to filter links on
-
-
- sourceCount integer
The number of times that a datasource was referenced as a source in an answer
- contentSummary objectRequired
contentSummary properties
- fileSize integerRequired
- textSize integerRequired
- fileCount integerRequired
- effectivePages integerRequired
-
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The knowledgebase is not found.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.createKnowledgebaseDatasource( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', { fileConfig: { connectionId: 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', crawlPatterns: [ { pattern: '(.*)example(.*)', type: 'include', }, ], files: ['string'], folder: 'folderA/folderB', scope: { depth: 1, extensions: ['pdf'], maxFilesPerFolder: 100, maxFilesTotal: 50, maxSize: 1000000, modifiedAfter: '2021-10-02T14:20:50.52Z', }, userId: '507f191e810c19729de860ea', }, name: 'string', type: 'file', },)qlik knowledgebase datasource create \ --knowledgebaseId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --fileConfig-connectionId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --fileConfig-crawlPatterns-pattern '' \ --fileConfig-crawlPatterns-type '' \ --fileConfig-scope-depth 1 \ --fileConfig-userId '507f191e810c19729de860ea' \ --name 'string' \ --type 'file'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/datasources" \-X POST \-H "Content-type: application/json" \-H "Authorization: Bearer <access_token>" \-d '{"name":"string","type":"file","fileConfig":{"files":["string"],"scope":{"depth":1,"maxSize":1000000,"extensions":["pdf"],"maxFilesTotal":50,"modifiedAfter":"2021-10-02T14:20:50.52Z","maxFilesPerFolder":100},"folder":"folderA/folderB","userId":"507f191e810c19729de860ea","connectionId":"f256b3e4-03e0-4f74-ae46-a4d43882ee5d","crawlPatterns":[{"type":"include","pattern":"(.*)example(.*)"}]}}'Example Response
{ "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "name": "string", "type": "file", "spaceId": "507f191e810c19729de860ea", "chunking": { "size": 1024, "type": "recursive", "overlap": 20, "separators": [ "\n", ".", " " ], "keepSeparator": false }, "syncInfo": { "status": "neverIndexed", "startedAt": "2021-10-02T14:20:50.52Z", "lastSyncId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "completedAt": "2021-10-02T14:20:50.52Z" }, "fileConfig": { "files": [ "string" ], "scope": { "depth": 1, "maxSize": 1000000, "extensions": [ "pdf" ], "maxFilesTotal": 50, "modifiedAfter": "2021-10-02T14:20:50.52Z", "maxFilesPerFolder": 100 }, "folder": "folderA/folderB", "userId": "507f191e810c19729de860ea", "connectionId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "crawlPatterns": [ { "type": "include", "pattern": "(.*)example(.*)" } ] }, "sourceCount": 10, "contentSummary": { "fileSize": 42, "textSize": 42, "fileCount": 42, "effectivePages": 42 }}Updates a specified datasource.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Path Parameters
- datasourceId stringRequired
The id of the datasource to update.
- id stringRequired
The id of a knowledgebase.
Request Body
- application/json object
Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
application/json properties
- id stringRequired
Unique identifier of the datasource
- name string
Name of the datasource
- type stringRequired
Can be one of: "file""web""database"
- spaceId string
The unique identifier of the space containing the datasource
- chunking object
chunking properties
- size integerRequired
Size of chunks
- type stringRequired
Chunking strategy
- overlap integerRequired
Chunk overlap, should be less than size
- separators array of stringsRequired
List of separators to chunk by
- keepSeparator booleanRequired
Allows to keep or remove separators used
-
- syncInfo object
syncInfo properties
- lastSyncId string
sync Id
-
- fileConfig object
Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
fileConfig properties
- files array of strings
- scope object
Scope for the file crawler.
scope properties
- depth integerRequired
The number of levels of sub folders that should be considered
- maxSize integer
Optional parameter. Max size of downloaded files in bytes
- extensions array of strings
list of file extensions to be considered
- maxFilesTotal integer
Total number of files that should be considered
- modifiedAfter string
only files modified after this time should be indexed. If set older files will be removed from index.
- maxFilesPerFolder integer
Maximum number of files per folder that should be considered
-
- folder string
Root folder for traversing.
- userId stringRequired
userId of the owner of the datasource fileConfig
- connectionId stringRequired
connection id to be used to retrieve the raw data
- crawlPatterns array of objects
Pattern matching links to crawl
crawlPatterns properties
- type stringRequired
include or exclude
Can be one of: "include""exclude"
- pattern stringRequired
Regex patterna to filter links on
-
-
- sourceCount integer
The number of times that a datasource was referenced as a source in an answer
- contentSummary objectRequired
contentSummary properties
- fileSize integerRequired
- textSize integerRequired
- fileCount integerRequired
- effectivePages integerRequired
-
-
Responses
200
Successfully updated the datasource.
- application/json object
Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
application/json properties
- id stringRequired
Unique identifier of the datasource
- name string
Name of the datasource
- type stringRequired
Can be one of: "file""web""database"
- spaceId string
The unique identifier of the space containing the datasource
- chunking object
chunking properties
- size integerRequired
Size of chunks
- type stringRequired
Chunking strategy
- overlap integerRequired
Chunk overlap, should be less than size
- separators array of stringsRequired
List of separators to chunk by
- keepSeparator booleanRequired
Allows to keep or remove separators used
-
- syncInfo object
syncInfo properties
- status stringRequired
Sync status
Can be one of: "neverIndexed""progress""completed""completedWithError""toAdd""toDelete"
- startedAt stringRequired
Datetime when the sync task was started
- lastSyncId string
sync Id
- completedAt stringRequired
Datetime when the sync task was completed
-
- fileConfig object
Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
fileConfig properties
- files array of strings
- scope object
Scope for the file crawler.
scope properties
- depth integerRequired
The number of levels of sub folders that should be considered
- maxSize integer
Optional parameter. Max size of downloaded files in bytes
- extensions array of strings
list of file extensions to be considered
- maxFilesTotal integer
Total number of files that should be considered
- modifiedAfter string
only files modified after this time should be indexed. If set older files will be removed from index.
- maxFilesPerFolder integer
Maximum number of files per folder that should be considered
-
- folder string
Root folder for traversing.
- userId stringRequired
userId of the owner of the datasource fileConfig
- connectionId stringRequired
connection id to be used to retrieve the raw data
- crawlPatterns array of objects
Pattern matching links to crawl
crawlPatterns properties
- type stringRequired
include or exclude
Can be one of: "include""exclude"
- pattern stringRequired
Regex patterna to filter links on
-
-
- sourceCount integer
The number of times that a datasource was referenced as a source in an answer
- contentSummary objectRequired
contentSummary properties
- fileSize integerRequired
- textSize integerRequired
- fileCount integerRequired
- effectivePages integerRequired
-
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The operation failed due to insufficient permissions.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The record is not found
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
// qlik-api has not implemented support for `PUT /api/v1/knowledgebases/{id}/datasources/{datasourceId}` yet.// In the meantime, you can use fetch like this:
const response = await fetch( '/api/v1/knowledgebases/{id}/datasources/{datasourceId}', { method: 'PUT', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ id: 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', name: 'string', type: 'file', spaceId: '507f191e810c19729de860ea', chunking: { size: 1024, type: 'recursive', overlap: 20, separators: ['\n', '.', ' '], keepSeparator: false, }, syncInfo: { lastSyncId: 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', }, fileConfig: { files: ['string'], scope: { depth: 1, maxSize: 1000000, extensions: ['pdf'], maxFilesTotal: 50, modifiedAfter: '2021-10-02T14:20:50.52Z', maxFilesPerFolder: 100, }, folder: 'folderA/folderB', userId: '507f191e810c19729de860ea', connectionId: 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', crawlPatterns: [ { type: 'include', pattern: '(.*)example(.*)', }, ], }, sourceCount: 10, contentSummary: { fileSize: 42, textSize: 42, fileCount: 42, effectivePages: 42, }, }), },)qlik knowledgebase datasource update 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --knowledgebaseId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --chunking-keepSeparator false \ --chunking-overlap 20 \ --chunking-separators ',., ' \ --chunking-size 1024 \ --chunking-type 'recursive' \ --contentSummary-effectivePages 42 \ --contentSummary-fileCount 42 \ --contentSummary-fileSize 42 \ --contentSummary-textSize 42 \ --fileConfig-connectionId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --fileConfig-crawlPatterns-pattern '' \ --fileConfig-crawlPatterns-type '' \ --fileConfig-scope-depth 1 \ --fileConfig-userId '507f191e810c19729de860ea' \ --id-in-body 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --type 'file'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/datasources/{datasourceId}" \-X PUT \-H "Content-type: application/json" \-H "Authorization: Bearer <access_token>" \-d '{"id":"f256b3e4-03e0-4f74-ae46-a4d43882ee5d","name":"string","type":"file","spaceId":"507f191e810c19729de860ea","chunking":{"size":1024,"type":"recursive","overlap":20,"separators":["\n","."," "],"keepSeparator":false},"syncInfo":{"lastSyncId":"f256b3e4-03e0-4f74-ae46-a4d43882ee5d"},"fileConfig":{"files":["string"],"scope":{"depth":1,"maxSize":1000000,"extensions":["pdf"],"maxFilesTotal":50,"modifiedAfter":"2021-10-02T14:20:50.52Z","maxFilesPerFolder":100},"folder":"folderA/folderB","userId":"507f191e810c19729de860ea","connectionId":"f256b3e4-03e0-4f74-ae46-a4d43882ee5d","crawlPatterns":[{"type":"include","pattern":"(.*)example(.*)"}]},"sourceCount":10,"contentSummary":{"fileSize":42,"textSize":42,"fileCount":42,"effectivePages":42}}'Example Response
{ "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "name": "string", "type": "file", "spaceId": "507f191e810c19729de860ea", "chunking": { "size": 1024, "type": "recursive", "overlap": 20, "separators": [ "\n", ".", " " ], "keepSeparator": false }, "syncInfo": { "status": "neverIndexed", "startedAt": "2021-10-02T14:20:50.52Z", "lastSyncId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "completedAt": "2021-10-02T14:20:50.52Z" }, "fileConfig": { "files": [ "string" ], "scope": { "depth": 1, "maxSize": 1000000, "extensions": [ "pdf" ], "maxFilesTotal": 50, "modifiedAfter": "2021-10-02T14:20:50.52Z", "maxFilesPerFolder": 100 }, "folder": "folderA/folderB", "userId": "507f191e810c19729de860ea", "connectionId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "crawlPatterns": [ { "type": "include", "pattern": "(.*)example(.*)" } ] }, "sourceCount": 10, "contentSummary": { "fileSize": 42, "textSize": 42, "fileCount": 42, "effectivePages": 42 }}Deletes a specified datasource and all its resources.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Path Parameters
- datasourceId stringRequired
The id of the datasource to delete.
- id stringRequired
The id of the knowledgebase the datasource belongs to.
Responses
204
Successful Operation.
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The operation failed due to insufficient permissions.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The knowledgebase is not found
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.deleteKnowledgebaseDatasource( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d',)qlik knowledgebase datasource rm 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --knowledgebaseId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/datasources/{datasourceId}" \-X DELETE \-H "Authorization: Bearer <access_token>"Cancels ongoing sync for a specified datasource.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Path Parameters
- datasourceId stringRequired
The id of the datasource to cancel sync for.
- id stringRequired
The id of the knowledgebase the datasource belongs to.
Responses
200
Successfully cancelled sync.
- application/json object
Response when a datasource sync is started, contains the sync Id
application/json properties
- id stringRequired
Unique identifier of the sync
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.cancelKnowledgebaseDatasource( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d',)qlik knowledgebase datasource cancel \ --knowledgebaseId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --datasourceId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/datasources/{datasourceId}/actions/cancel" \-X POST \-H "Authorization: Bearer <access_token>"Example Response
{ "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d"}Downloads a specified reference.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Path Parameters
- datasourceId stringRequired
The id of the datasource to download from.
- id stringRequired
The id of the knowledgebase the datasource belongs to.
Request Body
- application/json object
application/json properties
- path stringRequired
file path to the file to downlaod.
-
Responses
200
Download a file from a datasource.
- application/json object
Download information for the file.
application/json properties
- url stringRequired
URL to download the file.
- name stringRequired
The requested file name.
- spaceId stringRequired
Space id the file belongs in.
- fileSize integerRequired
Size of downloaded file.
- mimeType stringRequired
The mimetype of the file.
- lastUpdatedAt stringRequired
Date for last time the file was modified.
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
409
The data connection credentials are missing, expired, or no longer valid and must be reauthenticated.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.downloadKnowledgebaseDatasource( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', { path: 'folder/file.pdf' },)qlik knowledgebase datasource download \ --knowledgebaseId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --datasourceId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --path 'folder/file.pdf'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/datasources/{datasourceId}/actions/download" \-X POST \-H "Content-type: application/json" \-H "Authorization: Bearer <access_token>" \-d '{"path":"folder/file.pdf"}'Example Response
{ "url": "/v1/temp-contents/65f4287d785c400fe6d1e861", "name": "stories/content/billy.txt", "spaceId": "507f191e810c19729de860ea", "fileSize": 542, "mimeType": "text/plain", "lastUpdatedAt": "2020-04-16T23:17:28Z"}Starts syncing a specified datasource to a specified knowledgebase index.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Query Parameters
- migrate boolean
Optional parameter to migrate indexed files to docdetails collection
Path Parameters
- datasourceId stringRequired
The id of the datasource to sync.
- id stringRequired
The id of the knowledgebase the datasource belongs to.
Responses
202
Successfully started sync.
- application/json object
Response when a datasource sync is started, contains the sync Id
application/json properties
- id stringRequired
Unique identifier of the sync
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.syncKnowledgebaseDatasource( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', {},)qlik knowledgebase datasource sync \ --knowledgebaseId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --datasourceId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/datasources/{datasourceId}/actions/sync" \-X POST \-H "Authorization: Bearer <access_token>"Example Response
{ "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d"}Retrieves sync history for a specified datasource in a knowledgebase. Returns a 404 if there is no sync history, or if the calling user doesn't have access to the datasource.
Facts
| Rate limit | Tier 1 (1000 requests per minute) |
Query Parameters
- limit integer
The number of knowledgebases to get.
- next string
Optional parameter to request the next page.
- prev string
Optional parameter to request the previous page.
- sort string
Optional resource field name to sort on, case insensitive, eg. name. Can be prefixed with - to set descending order, defaults to ascending.
Can be one of: "COMPLETED""-COMPLETED"
Path Parameters
- datasourceId stringRequired
The id of the datasource.
- id stringRequired
The id of the knowledgebase the datasource belongs to.
Responses
200
List of sync items ordered by the completed time.
- application/json object
application/json properties
- data array of objectsRequired
data properties
- id stringRequired
sync id
- status stringRequired
Sync status
Can be one of: "neverIndexed""progress""completed""completedWithError"
- docStats objectRequired
Summary of documents processed
docStats properties
- added integerRequired
- errors integerRequired
- deleted integerRequired
- updated integerRequired
- deltaBytes integerRequired
- deltaTextSize integerRequired
- largestFileSize integerRequired
- deltaEffectivePages integerRequired
- totalBytesProcessed integerRequired
-
- startedAt stringRequired
Datetime when the sync task was started
- completedAt string
Datetime when the sync task was completed
- triggerType stringRequired
Datasource trigger type, was it manually or automatically synced
- connectionId stringRequired
Connection id that the datasource used
- datasourceId stringRequired
datasource id
- errorSummary array of objects
Aggregated, deduplicated view of failures grouped by error code. Lets the UI surface a smart summary (e.g. "1000 files failed to parse") instead of a flat list of raw error strings.
errorSummary properties
- code stringRequired
Stable, machine-readable error category shared across services and the UI.
Can be one of: "unknown""file_size_exceeded""download_failed""parse_failed""parse_timeout""chunk_failed""chunk_timeout""guardrail_blocked""unsupported_file""index_verification_failed""file_not_found""document_has_macros""scan_failed""pages_limit_exceeded""pages_enforcement_failed""governance_budget_exceeded"
- count integerRequired
Number of files that failed with this error code.
- sample string
A representative (sanitized) error message for this category.
- sources array of strings
Up to selectedErrorsCount example sources that failed with this code.
-
- selectedErrors array of strings
populated with up to the first selectedErrorsCount errors if there were any during sync
-
- meta object
meta properties
- countTotal integer
-
- links object
links properties
- next object
next properties
- href string
-
- prev object
prev properties
- href string
-
- self object
self properties
- href string
-
-
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The datasource is not found, the datasource has no sync history (no syncs have been run), or the calling user doesn't have access to this datasource in the knowledgebase.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.getKnowledgebaseDatasourceHistories( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', {},)qlik knowledgebase datasource history ls \ --knowledgebaseId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --datasourceId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/datasources/{datasourceId}/histories" \-H "Authorization: Bearer <access_token>"Example Response
{ "data": [ { "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "status": [ "neverIndexed | progress | completed | completedWithError" ], "docStats": { "added": 1, "errors": 0, "deleted": 0, "updated": 0, "deltaBytes": 0, "deltaTextSize": 0, "largestFileSize": 123044444, "deltaEffectivePages": 0, "totalBytesProcessed": 123044444 }, "startedAt": "2021-10-02T14:20:50.52Z", "completedAt": "2021-10-02T14:20:50.52Z", "triggerType": [ "manual | schedule" ], "connectionId": "ee6a390c-5d33-11e8-9c2d-fa7ae01bbebc", "datasourceId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "errorSummary": [ { "code": "string", "count": 1000, "sample": "failed to parse document", "sources": [ "myfile.pdf" ] } ], "selectedErrors": [ "unsupported file extension" ] } ], "meta": { "countTotal": 42 }, "links": { "next": { "href": "string" }, "prev": { "href": "string" }, "self": { "href": "string" } }}Retrieves detailed sync history for a specified datasource.
Facts
Path Parameters
- datasourceId stringRequired
The id of the datasource.
- id stringRequired
The id of the knowledgebase the datasource belongs to.
- syncId stringRequired
The sync identifier.
Responses
200
List of sync items ordered by the start time.
- application/json object
application/json properties
- id stringRequired
document Id
- error string
error if one happened during sync
- action stringRequired
acion performed
Can be one of: "add""delete""update"
- chunks integer
number of chunks
- source stringRequired
Source of the document
- syncId stringRequired
sync Id
- duration object
duration properties
- chunk integerRequired
- embed integerRequired
- parse integerRequired
- store integerRequired
- download integerRequired
-
- fileSize integer
file size
- syncedAt stringRequired
Datetime when the sync task was executed
- chunkSize integer
chunk size
- errorCode string
Stable, machine-readable error category for the failure, allowing the UI to map it to a friendly message without brittle string matching. Only populated when the file failed to index.
Can be one of: "unknown""file_size_exceeded""download_failed""parse_failed""parse_timeout""chunk_failed""chunk_timeout""guardrail_blocked""unsupported_file""index_verification_failed""file_not_found""document_has_macros""scan_failed""pages_limit_exceeded""pages_enforcement_failed""governance_budget_exceeded"
- explicitPages integerRequired
page count
- fileStartedAt string
Datetime when the file processing started
- fileCompletedAt string
Datetime when the file processing finished
- fileLastModified string
Datetime when the file was last modified
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.getKnowledgebaseDatasourceHistory( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d',)# qlik-cli has not implemented support for GET /api/v1/knowledgebases/{id}/datasources/{datasourceId}/histories/{syncId} yet.curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/datasources/{datasourceId}/histories/{syncId}" \-H "Authorization: Bearer <access_token>"Example Response
{ "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "error": "unsupported file extension", "action": "add", "chunks": 10, "source": "myfile.pdf", "syncId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "duration": { "chunk": 0, "embed": 996, "parse": 0, "store": 3653363805, "download": 207 }, "fileSize": 123044444, "syncedAt": "2021-10-02T14:20:50.52Z", "chunkSize": 14721, "errorCode": "string", "explicitPages": 42, "fileStartedAt": "2021-10-02T14:20:50.52Z", "fileCompletedAt": "2021-10-02T14:21:50.52Z", "fileLastModified": "2024-02-16T20:06:02Z"}Returns a datasource schedule.
Facts
| Rate limit | Tier 1 (1000 requests per minute) |
Path Parameters
- datasourceId stringRequired
The id of the datasource the schedule belongs to.
- id stringRequired
The id of the knowledgebase the schedule belongs to.
Responses
200
Successfully created a schedule.
- application/json object
application/json properties
- ownerId stringRequired
- spaceId string
- tenantId stringRequired
- calendars array of objectsRequired
An event specification relative to the calendar, similar to a traditional cron specification.
calendars properties
- hour array of objectsRequired
Hour range to match (0-23). Default matches 0
hour properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- year array of objectsRequired
Year range to match. Default matches all years
year properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- month array of objectsRequired
Month range to match (1-12). Default matches all months
month properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- minute array of objectsRequired
Minute range to match (0-59). Default matches 0
minute properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- second array of objectsRequired
Second range to match (0-59). Default matches 0
second properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- comment stringRequired
Description of the intention of this schedule
- dayOfWeek array of objectsRequired
DayOfWeek range to match (0-6; 0 is Sunday). Default matches all days of the week
dayOfWeek properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- dayOfMonth array of objectsRequired
DayOfMonth range to match (1-31). Default matches all days
dayOfMonth properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
-
- intervals array of objects
For example, an
everyof 1 hour withoffsetof zero would match every hour, on the hour. The sameeverybut anoffsetof 19 minutes would match everyxx:19:00.intervals properties
- every stringRequired
The period to repeat the interval
- offset string
A fixed offset added to the intervals period. Optional, defaults to 0
-
- datasourceId string
- knowledgebaseId stringRequired
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.getKnowledgebaseDatasourceSchedule( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d',)qlik knowledgebase datasource schedule get \ --knowledgebaseId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --datasourceId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/datasources/{datasourceId}/schedules" \-H "Authorization: Bearer <access_token>"Example Response
{ "ownerId": "507f191e810c19729de860ed", "spaceId": "507f191e810c19729de860ec", "tenantId": "507f191e810c19729de860eb", "calendars": [ { "hour": [ { "end": 42, "step": 1, "start": 42 } ], "year": [ { "end": 42, "step": 1, "start": 42 } ], "month": [ { "end": 42, "step": 1, "start": 42 } ], "minute": [ { "end": 42, "step": 1, "start": 42 } ], "second": [ { "end": 42, "step": 1, "start": 42 } ], "comment": "string", "dayOfWeek": [ { "end": 42, "step": 1, "start": 42 } ], "dayOfMonth": [ { "end": 42, "step": 1, "start": 42 } ] } ], "intervals": [ { "every": "5h30m", "offset": "0s" } ], "datasourceId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "knowledgebaseId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d"}Creates or updates a specified datasource schedule.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Path Parameters
- datasourceId stringRequired
The id of the datasource the schedule belongs to.
- id stringRequired
The id of the knowledgebase the schedule belongs to.
Request Body
- application/json object
application/json properties
- calendars array of objects
An event specification relative to the calendar, similar to a traditional cron specification.
calendars properties
- hour array of objectsRequired
Hour range to match (0-23). Default matches 0
hour properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- year array of objectsRequired
Year range to match. Default matches all years
year properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- month array of objectsRequired
Month range to match (1-12). Default matches all months
month properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- minute array of objectsRequired
Minute range to match (0-59). Default matches 0
minute properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- second array of objectsRequired
Second range to match (0-59). Default matches 0
second properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- comment stringRequired
Description of the intention of this schedule
- dayOfWeek array of objectsRequired
DayOfWeek range to match (0-6; 0 is Sunday). Default matches all days of the week
dayOfWeek properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- dayOfMonth array of objectsRequired
DayOfMonth range to match (1-31). Default matches all days
dayOfMonth properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
-
- intervals array of objects
For example, an
everyof 1 hour withoffsetof zero would match every hour, on the hour. The sameeverybut anoffsetof 19 minutes would match everyxx:19:00.intervals properties
- every stringRequired
The period to repeat the interval
- offset string
A fixed offset added to the intervals period. Optional, defaults to 0
-
-
Responses
200
Successfully created a schedule.
- application/json object
application/json properties
- ownerId stringRequired
- spaceId string
- tenantId stringRequired
- calendars array of objectsRequired
An event specification relative to the calendar, similar to a traditional cron specification.
calendars properties
- hour array of objectsRequired
Hour range to match (0-23). Default matches 0
hour properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- year array of objectsRequired
Year range to match. Default matches all years
year properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- month array of objectsRequired
Month range to match (1-12). Default matches all months
month properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- minute array of objectsRequired
Minute range to match (0-59). Default matches 0
minute properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- second array of objectsRequired
Second range to match (0-59). Default matches 0
second properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- comment stringRequired
Description of the intention of this schedule
- dayOfWeek array of objectsRequired
DayOfWeek range to match (0-6; 0 is Sunday). Default matches all days of the week
dayOfWeek properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- dayOfMonth array of objectsRequired
DayOfMonth range to match (1-31). Default matches all days
dayOfMonth properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
-
- intervals array of objects
For example, an
everyof 1 hour withoffsetof zero would match every hour, on the hour. The sameeverybut anoffsetof 19 minutes would match everyxx:19:00.intervals properties
- every stringRequired
The period to repeat the interval
- offset string
A fixed offset added to the intervals period. Optional, defaults to 0
-
- datasourceId string
- knowledgebaseId stringRequired
-
201
Successfully created a schedule.
- application/json object
application/json properties
- ownerId stringRequired
- spaceId string
- tenantId stringRequired
- calendars array of objectsRequired
An event specification relative to the calendar, similar to a traditional cron specification.
calendars properties
- hour array of objectsRequired
Hour range to match (0-23). Default matches 0
hour properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- year array of objectsRequired
Year range to match. Default matches all years
year properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- month array of objectsRequired
Month range to match (1-12). Default matches all months
month properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- minute array of objectsRequired
Minute range to match (0-59). Default matches 0
minute properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- second array of objectsRequired
Second range to match (0-59). Default matches 0
second properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- comment stringRequired
Description of the intention of this schedule
- dayOfWeek array of objectsRequired
DayOfWeek range to match (0-6; 0 is Sunday). Default matches all days of the week
dayOfWeek properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
- dayOfMonth array of objectsRequired
DayOfMonth range to match (1-31). Default matches all days
dayOfMonth properties
- end integer
End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start
- step integer
Step to be take between each value. Optional, defaulted to 1
- start integerRequired
Start of the range (inclusive)
-
-
- intervals array of objects
For example, an
everyof 1 hour withoffsetof zero would match every hour, on the hour. The sameeverybut anoffsetof 19 minutes would match everyxx:19:00.intervals properties
- every stringRequired
The period to repeat the interval
- offset string
A fixed offset added to the intervals period. Optional, defaults to 0
-
- datasourceId string
- knowledgebaseId stringRequired
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.createKnowledgebaseDatasourceSchedule( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', { calendars: [ { comment: 'string', dayOfMonth: [ { end: 42, start: 42, step: 1 }, ], dayOfWeek: [ { end: 42, start: 42, step: 1 }, ], hour: [{ end: 42, start: 42, step: 1 }], minute: [{ end: 42, start: 42, step: 1 }], month: [{ end: 42, start: 42, step: 1 }], second: [{ end: 42, start: 42, step: 1 }], year: [{ end: 42, start: 42, step: 1 }], }, ], intervals: [{ every: '5h30m', offset: '0s' }], },)qlik knowledgebase datasource schedule create \ --knowledgebaseId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --datasourceId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --calendars-comment '' \ --calendars-dayOfMonth-end \ --calendars-dayOfMonth-start \ --calendars-dayOfMonth-step \ --calendars-dayOfWeek-end \ --calendars-dayOfWeek-start \ --calendars-dayOfWeek-step \ --calendars-hour-end \ --calendars-hour-start \ --calendars-hour-step \ --calendars-minute-end \ --calendars-minute-start \ --calendars-minute-step \ --calendars-month-end \ --calendars-month-start \ --calendars-month-step \ --calendars-second-end \ --calendars-second-start \ --calendars-second-step \ --calendars-year-end \ --calendars-year-start \ --calendars-year-step \ --intervals-every ''curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/datasources/{datasourceId}/schedules" \-X POST \-H "Content-type: application/json" \-H "Authorization: Bearer <access_token>" \-d '{"calendars":[{"hour":[{"end":42,"step":1,"start":42}],"year":[{"end":42,"step":1,"start":42}],"month":[{"end":42,"step":1,"start":42}],"minute":[{"end":42,"step":1,"start":42}],"second":[{"end":42,"step":1,"start":42}],"comment":"string","dayOfWeek":[{"end":42,"step":1,"start":42}],"dayOfMonth":[{"end":42,"step":1,"start":42}]}],"intervals":[{"every":"5h30m","offset":"0s"}]}'Example Response
{ "ownerId": "507f191e810c19729de860ed", "spaceId": "507f191e810c19729de860ec", "tenantId": "507f191e810c19729de860eb", "calendars": [ { "hour": [ { "end": 42, "step": 1, "start": 42 } ], "year": [ { "end": 42, "step": 1, "start": 42 } ], "month": [ { "end": 42, "step": 1, "start": 42 } ], "minute": [ { "end": 42, "step": 1, "start": 42 } ], "second": [ { "end": 42, "step": 1, "start": 42 } ], "comment": "string", "dayOfWeek": [ { "end": 42, "step": 1, "start": 42 } ], "dayOfMonth": [ { "end": 42, "step": 1, "start": 42 } ] } ], "intervals": [ { "every": "5h30m", "offset": "0s" } ], "datasourceId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "knowledgebaseId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d"}Deletes a datasource schedule.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Path Parameters
- datasourceId stringRequired
The id of the datasource the schedule belongs to.
- id stringRequired
The id of the knowledgebase the schedule belongs to.
Responses
204
Successfully deleted a schedule.
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The resource does not exist.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.deleteKnowledgebaseDatasourceSchedule( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d',)qlik knowledgebase datasource schedule rm \ --knowledgebaseId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d' \ --datasourceId 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/datasources/{datasourceId}/schedules" \-X DELETE \-H "Authorization: Bearer <access_token>"Retrieves sync history for the specified knowledgebase. Will return a 404 if no sync history exists, or if the calling user does not have access to synced datasources.
Facts
| Rate limit | Tier 1 (1000 requests per minute) |
Query Parameters
- limit integer
The number of sync histories to get.
- next string
Optional parameter to request the next page.
- prev string
Optional parameter to request the previous page.
- sort string
Optional resource field name to sort on, case insensitive, eg. name. Can be prefixed with - to set descending order, defaults to ascending.
Can be one of: "COMPLETED""-COMPLETED"
Path Parameters
- id stringRequired
The id of the knowledgebase.
Responses
200
List of sync items ordered by the completed time.
- application/json object
application/json properties
- data array of objectsRequired
data properties
- id stringRequired
sync id
- status stringRequired
Sync status
Can be one of: "neverIndexed""progress""completed""completedWithError"
- docStats objectRequired
Summary of documents processed
docStats properties
- added integerRequired
- errors integerRequired
- deleted integerRequired
- updated integerRequired
- deltaBytes integerRequired
- deltaTextSize integerRequired
- largestFileSize integerRequired
- deltaEffectivePages integerRequired
- totalBytesProcessed integerRequired
-
- startedAt stringRequired
Datetime when the sync task was started
- completedAt string
Datetime when the sync task was completed
- triggerType stringRequired
Datasource trigger type, was it manually or automatically synced
- connectionId stringRequired
Connection id that the datasource used
- datasourceId stringRequired
datasource id
- errorSummary array of objects
Aggregated, deduplicated view of failures grouped by error code. Lets the UI surface a smart summary (e.g. "1000 files failed to parse") instead of a flat list of raw error strings.
errorSummary properties
- code stringRequired
Stable, machine-readable error category shared across services and the UI.
Can be one of: "unknown""file_size_exceeded""download_failed""parse_failed""parse_timeout""chunk_failed""chunk_timeout""guardrail_blocked""unsupported_file""index_verification_failed""file_not_found""document_has_macros""scan_failed""pages_limit_exceeded""pages_enforcement_failed""governance_budget_exceeded"
- count integerRequired
Number of files that failed with this error code.
- sample string
A representative (sanitized) error message for this category.
- sources array of strings
Up to selectedErrorsCount example sources that failed with this code.
-
- selectedErrors array of strings
populated with up to the first selectedErrorsCount errors if there were any during sync
-
- meta object
meta properties
- countTotal integer
-
- links object
links properties
- next object
next properties
- href string
-
- prev object
prev properties
- href string
-
- self object
self properties
- href string
-
-
-
400
The request is in incorrect format.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
403
The user does not have privileges to perform the requested action.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
404
The knowledgebase is not found, the knowledgebase has no sync history, or the calling user doesn't have access to the datasources in the knowledgebase.
- application/json object
application/json properties
- errors array of objects
errors properties
- code string
- title string
- detail string
-
- traceId string
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.knowledgebases.getKnowledgebaseHistories( 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d', {},)qlik knowledgebase histories 'f256b3e4-03e0-4f74-ae46-a4d43882ee5d'curl "https://{tenant}.{region}.qlikcloud.com/api/v1/knowledgebases/{id}/histories" \-H "Authorization: Bearer <access_token>"Example Response
{ "data": [ { "id": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "status": [ "neverIndexed | progress | completed | completedWithError" ], "docStats": { "added": 1, "errors": 0, "deleted": 0, "updated": 0, "deltaBytes": 0, "deltaTextSize": 0, "largestFileSize": 123044444, "deltaEffectivePages": 0, "totalBytesProcessed": 123044444 }, "startedAt": "2021-10-02T14:20:50.52Z", "completedAt": "2021-10-02T14:20:50.52Z", "triggerType": [ "manual | schedule" ], "connectionId": "ee6a390c-5d33-11e8-9c2d-fa7ae01bbebc", "datasourceId": "f256b3e4-03e0-4f74-ae46-a4d43882ee5d", "errorSummary": [ { "code": "string", "count": 1000, "sample": "failed to parse document", "sources": [ "myfile.pdf" ] } ], "selectedErrors": [ "unsupported file extension" ] } ], "meta": { "countTotal": 42 }, "links": { "next": { "href": "string" }, "prev": { "href": "string" }, "self": { "href": "string" } }}