Knowledge_bases
Knowledge base related APIs
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
左のナレッジベースID
正しいナレッジベースID
正常に取得しました。
POST /webapi/v2/knowledge_base_diff HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"leftId": "text",
"rightId": "text"
}
正常に取得しました。
{
"result": [
{
"left": {
"status": "text",
"page": 1,
"line": 1,
"text": "text",
"highlight": "text"
},
"right": {
"status": "text",
"page": 1,
"line": 1,
"text": "text",
"highlight": "text"
},
"row": 1,
"comment": "text"
}
]
}
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
ダウンロードするドキュメント名
ドキュメントファイルが正常にダウンロードされました。
複数のドキュメントが見つかりました。
無許可
禁止された
ドキュメントが見つかりませんでした。
内部サーバーエラー
GET /download_document_by_name/{project_id} HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"filename": "text"
}
binary
これは、単一のドキュメントの詳細を取得する方法です。
The id of the document.
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
ドキュメントの詳細を正常に取得しました。
GET /webapi/single_document HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
ドキュメントの詳細を正常に取得しました。
{
"result": {
"id": "text",
"documentName": "text",
"createdDate": "2025-08-16",
"hashtags": [
"text"
],
"agentFeedback": {
"positiveCount": 1,
"negativeCount": 1
},
"userFeedback": {
"positiveCount": 1,
"negativeCount": 1
}
}
}
このAPIメソッドは、Cognitive Search用にドキュメントをアップロードすることを可能にします。 アップロード可能なファイル形式は、下記になります。 ファイル形式:.txt, .docx, .csv, .xls, .xlsx, .xlsm, .jpg, .jpeg, .png, .hwp, .hwpx, .pdf, .ppt, .pptx, .doc 外部リンクが含まれるHTMLファイルをアップロードするには、アップロードする前に関連するリンク先のHTMLも含め、zipファイルに圧縮の上、アップロードください。
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
ローカルファイルの場所
アップロードファイルのためのハッシュタグ
アップロードされたファイルからの検索結果のフッターとして答えの情報源を入力できます。フッターテキストは検索結果の『From』の隣に表示されます。
リンクしたいURLをfooterTitleに入れることができます。
アップロードする対象フォルダID。最上位レベルに挿入するにはヌル。
このドキュメントを他のエージェントが閲覧できるようにするかどうか
他のユーザーがこのドキュメントを閲覧することを許可するかどうか
ファイルのアップロードが成功しました。
無効なリクエストまたはファイル形式
ファイルサイズが制限を超えています。
POST /webapi/upload_file HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 156
{
"file": "binary",
"hashtags": [
"text"
],
"footerTitle": "text",
"footerUrl": "text",
"parentFolderId": "text",
"allowOtherAgentsView": true,
"allowOtherUsersView": true
}
{
"result": {
"id": "text",
"file_name": "text",
"hashtags": [
"text"
],
"footer": "text"
}
}
このAPIを使用すると、S3に保存されているドキュメントをCognitive Searchに転送できます。それらはダッシュボードでナレッジベースのドキュメントとして表示されます。利用可能なファイル形式は、アップロードドキュメントセクションと同じです。
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
ファイルのS3パス。ファイル名で終わる必要があります。。バケット名を含めないでください。
あなたのS3シークレットキー。
あなたのS3アクセスキー。
ファイルを含むS3バケットの名前。
検索結果でのフッターテキストとして回答の出典を入力できます。フッターテキストは、検索結果の「出典」の横に表示されます。
リンクしたいURLをfooterTitleに入れることができます。
ドキュメントのハッシュタグ。
アップロード先のターゲットフォルダーID。最上位に挿入する場合は空にして下さい。。
S3からファイルが正常にアップロードされました。
無効なリクエストパラメーター
S3でファイルが見つかりません。
POST /webapi/upload_from_s3 HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 153
{
"path": "text",
"secretKey": "text",
"accessKey": "text",
"bucket": "text",
"footerTitle": "text",
"footerUrl": "text",
"hashtags": [
"text"
],
"parentFolderId": "text"
}
{
"result": {
"id": "text",
"file_name": "text",
"hashtags": [
"text"
],
"footer": "text"
}
}
APIを介してドキュメントをアップロードすると、変換、解析され、ベクトルとして埋め込まれます。このAPIは、アップロードされるドキュメントの処理状況を表示します。
The document id to check the status
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
ファイルのステータスを正常に取得しました。
無効なタスクIDまたはファイルが見つかりません
GET /webapi/check_file_status HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
{
"result": {
"id": "text",
"status": "text",
"errorName": "text"
}
}
このAPIを使用すると、ドキュメントメニューにアップロードされたドキュメントの名前を更新できます。
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
変更したいファイルのID。
指定したファイルの新しい名前を入力。
ファイルの名前が正常に更新されました。
無効なパラメータ
POST /webapi/update_kb_name HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 31
{
"id": "text",
"filename": "text"
}
{
"result": {
"id": "text",
"filename": "text"
}
}
このAPIでは、ドキュメント名でドキュメントを検索することができます。
The search term for document titles.
Comma-separated list of hashtags to filter documents by.
Complex hashtag filtering using semicolons to separate groups and commas to separate tags within a group (e.g., "a,b;c,d").
Comma-separated list of hashtags to exclude documents by.
Set to 'true' to use vector search for semantic matching, or 'false' for text-based search.
The property field to sort results by.
The direction to sort results in (ascending or descending).
Number of results to skip for pagination.
Maximum number of results to return.
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
検索に成功しました
GET /webapi/search_document_by_title HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
検索に成功しました
{
"result": [
{
"id": "text",
"file_name": "text",
"page_count": 1,
"download_url": "text",
"hashtags": [
"text"
],
"score": 1,
"folder": "text",
"agentEditor": [
"text"
],
"agentViewer": [
"text"
]
}
]
}
このAPIを使用すると、アップロードされたファイルを削除できます。
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
配列形式で削除したいドキュメントID
ファイルが正常に削除されました。
POST /webapi/delete_file HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"ids": [
"text"
]
}
ファイルが正常に削除されました。
{
"result": {
"ok": true
},
"errors": {}
}
This API lets you list out the uploaded documents.
Either AND or OR, logical operator used to match multiple hashtags. Defaults to OR.
OR
Possible values: The on/off status of the document to filter the list.
Keyword search query to filter the list. You can use operators to run advanced searches. "TERM1 TERM2" for AND, "TERM1 OR TERM2" for OR, and "TERM\ for exact match.
Hashtag information to filter the list.
The order type of the list. FILE_NAME_ASC/DESC for file name, TYPE_ASC/DESC for file type, STATUS_ASC/DESC for on/off status, CREATED_AT_ASC/DESC for upload date.
offset allows you to specify the ranking number of the first item on the page.
limit allows you to set the number of objects returned on one page. The maximum value is 100.
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
Successfully retrieved list of documents
GET /webapi/knowledge_bases HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
Successfully retrieved list of documents
{
"result": {
"items": [
{
"id": "text",
"fileName": "text",
"hashtags": [
"text"
],
"autoHashtags": [
{}
],
"folder": "text",
"agentEditor": [
"text"
],
"agentViewer": [
"text"
],
"userViewer": {
"variables": {}
},
"allowOtherAgentsView": true,
"allowOtherUsersView": true
}
]
},
"errors": {}
}
This API lets you preview the uploaded documents.
The document ID that you want to preview
Pages of the document you want to preview
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
Your API key can be found in your dashboard Settings menu, under the General tab.
Successfully retrieved document preview
GET /webapi/knowledge_base_preview HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: text
Accept: */*
Successfully retrieved document preview
{
"result": {
"totalPageCount": 1,
"pageNo": 1,
"css": "text",
"body": "text",
"highlightIndexes": [
1
],
"exactAnswer": "text",
"pdf": "text",
"draftjs": "text",
"highlights": {
"indexes": [
1
],
"pageIndexes": [
1
],
"__typename": "text"
},
"knowledgeBase": {
"id": "text",
"title": "text",
"__typename": "text"
},
"__typename": "text"
},
"errors": {}
}
This API lets you update hashtags, footer title, and footer title link for a document.
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
The id of the document you want to update
You can type in the source of the answer as a footer for search results from the uploaded file. The footer text will appear next to 'From' in search results.
You can put the URL you want to link to the footerTitle.
List of string hashtags you want to add to the document
Document updated successfully
POST /webapi/update_document HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 73
{
"id": "text",
"footerTitle": "text",
"footerUrl": "text",
"hashtags": [
"text"
]
}
Document updated successfully
{
"result": {
"knowledgeBase": {
"id": "text",
"hashtags": [
"text"
],
"footer": "text"
}
},
"errors": {}
}
This API lets you change the status of many documents (AKA knowledge bases) at once
Optional: Email of the agent to use for this request
Optional: Email address to associate with the user
Optional: User ID to identify or create a user
Whether to turn all the status of all the knowledge bases to on (True) or off (False)
This is a list of the ids of the knowledge bases that you want to toggle.
Knowledge base statuses toggled successfully
POST /webapi/toggle_documents HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"use": true,
"ids": [
"text"
]
}
Knowledge base statuses toggled successfully
{
"result": {
"knowledgeBases": [
{
"id": "text",
"status": true
}
]
},
"errors": {}
}
Was this helpful?