Knowledge Sources - Get
擷取知識來源定義。
GET {endpoint}/knowledgesources('{sourceName}')?api-version=2025-08-01-preview
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
搜尋服務的端點 URL。 |
|
source
|
path | True |
string |
要擷取的知識來源名稱。 |
|
api-version
|
query | True |
string |
用戶端 API 版本。 |
要求標頭
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| x-ms-client-request-id |
string (uuid) |
隨請求一起傳送的追蹤 ID,以協助偵錯。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK | KnowledgeSource: | |
| Other Status Codes |
錯誤回應。 |
範例
|
Search |
|
Search |
SearchServiceGetKnowledgeSource
範例要求
GET https://previewexampleservice.search.windows.net/knowledgesources('ks-preview-test')?api-version=2025-08-01-preview
範例回覆
{
"@odata.etag": "0x1234568AE7E58A1",
"name": "ks-preview-test",
"kind": "searchIndex",
"description": "Description of the knowledge source.",
"encryptionKey": {
"keyVaultKeyName": "myUserManagedEncryptionKey-createdinAzureKeyVault",
"keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString",
"keyVaultUri": "https://myKeyVault.vault.azure.net",
"accessCredentials": {
"applicationId": "00000000-0000-0000-0000-000000000000",
"applicationSecret": "<applicationSecret>"
}
},
"searchIndexParameters": {
"searchIndexName": "preview-test",
"sourceDataSelect": "description,category"
}
}
SearchServiceGetKnowledgeSourceAzureBlob
範例要求
GET https://previewexampleservice.search.windows.net/knowledgesources('ks-preview-test')?api-version=2025-08-01-preview
範例回覆
{
"@odata.etag": "0x1234568AE7E58A1",
"name": "ks-preview-test",
"kind": "azureBlob",
"description": "Description of the knowledge source.",
"encryptionKey": {
"keyVaultKeyName": "myUserManagedEncryptionKey-createdinAzureKeyVault",
"keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString",
"keyVaultUri": "https://myKeyVault.vault.azure.net",
"accessCredentials": {
"applicationId": "00000000-0000-0000-0000-000000000000",
"applicationSecret": "<applicationSecret>"
}
},
"azureBlobParameters": {
"connectionString": "DefaultEndpointsProtocol=https;AccountName=myAccountName;AccountKey=myAccountKey;EndpointSuffix=core.windows.net ",
"containerName": "test-container",
"folderPath": "test-path",
"identity": {
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
"userAssignedIdentity": "/my/userassigned/id"
},
"embeddingModel": {
"name": "openai",
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com",
"deploymentId": "model",
"apiKey": "<redacted>",
"modelName": "text-embedding-3-large"
}
},
"chatCompletionModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com",
"deploymentId": "myDeployment",
"apiKey": "<redacted>",
"modelName": "gpt-4o-mini"
}
},
"ingestionSchedule": {
"interval": "P1D",
"startTime": "2024-06-06T00:01:50.265Z"
}
}
}
定義
| 名稱 | Description |
|---|---|
|
AIFoundry |
將呼叫的 Azure AI Foundry 目錄中內嵌模型的名稱。 |
|
AIServices |
指定向量化查詢影像或文字的 AI 服務視覺參數。 |
|
AIServices |
指定向量化查詢影像或文字的 AI 服務視覺參數。 |
| AMLParameters |
指定連線至 AML 向量化程式的屬性。 |
| AMLVectorizer |
指定透過 Azure AI Foundry 模型目錄部署的 Azure Machine Learning 端點,以產生查詢字串的向量內嵌。 |
|
Azure |
針對搜尋服務建立之已註冊應用程式認證,用於對儲存在 Azure 金鑰保存庫中的加密金鑰進行驗證存取。 |
|
Azure |
Azure Blob 儲存體知識來源的設定。 |
|
Azure |
Azure Blob 儲存體知識來源的參數。 |
|
Azure |
可讓您使用 Azure OpenAI 資源為指定的文字輸入產生向量內嵌。 |
|
Azure |
將呼叫的 Azure Open AI 模型名稱。 |
|
Azure |
指定連線到 Azure OpenAI 資源的參數。 |
|
Azure |
指定用來向量化查詢字串的 Azure OpenAI 資源。 |
|
Error |
資源管理錯誤其他資訊。 |
|
Error |
錯誤詳細數據。 |
|
Error |
錯誤回應 |
|
Indexing |
代表索引子執行的排程。 |
|
Input |
技能的輸入欄位對應。 |
|
Knowledge |
指定用來執行查詢規劃的 Azure OpenAI 資源。 |
|
Knowledge |
要用於查詢規劃的 AI 模型。 |
|
Knowledge |
知識來源的那種。 |
|
Output |
技能的輸出欄位對應。 |
|
Search |
清除資料來源的身分識別屬性。 |
|
Search |
指定要使用的資料來源身分識別。 |
|
Search |
以搜尋索引為目標的知識來源。 |
|
Search |
搜尋索引知識來源的參數。 |
|
Search |
Azure Key Vault 中的客戶管理加密金鑰。 您建立和管理的金鑰可用來加密或解密靜態資料,例如索引和同義字對映。 |
|
Vector |
查詢期間要使用的向量化方法。 |
|
Web |
指定連接至使用者定義向量化程式的屬性。 |
|
Web |
指定使用者定義的向量化器,以產生查詢字串的向量內嵌。 外部向量化器的整合是使用技能組的自訂 Web API 介面來達成。 |
AIFoundryModelCatalogName
將呼叫的 Azure AI Foundry 目錄中內嵌模型的名稱。
| 值 | Description |
|---|---|
| OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32 | |
| OpenAI-CLIP-Image-Text-Embeddings-ViT-Large-Patch14-336 | |
| Facebook-DinoV2-Image-Embeddings-ViT-Base | |
| Facebook-DinoV2-Image-Embeddings-ViT-Giant | |
| Cohere-embed-v3-english | |
| Cohere-embed-v3-multilingual | |
| Cohere-embed-v4 |
Cohere embed v4 模型,用於從文本和圖像生成嵌入。 |
AIServicesVisionParameters
指定向量化查詢影像或文字的 AI 服務視覺參數。
| 名稱 | 類型 | Description |
|---|---|---|
| apiKey |
string |
指定 AI 服務資源的 API 金鑰。 |
| authIdentity | SearchIndexerDataIdentity: |
用於輸出連線的使用者指派受控識別。 如果提供 authResourceId 且未指定,則會使用系統指派的受控識別。 在索引更新時,如果未指定身分識別,則值會保持不變。 如果設定為 “none”,則會清除此屬性的值。 |
| modelVersion |
string |
呼叫 AI 服務視覺服務時要使用的模型版本。 未指定時,它將預設為最新的可用。 |
| resourceUri |
string (uri) |
AI 服務資源的資源 URI。 |
AIServicesVisionVectorizer
指定向量化查詢影像或文字的 AI 服務視覺參數。
| 名稱 | 類型 | Description |
|---|---|---|
| aiServicesVisionParameters |
包含 AI 服務視覺內嵌向量化的特定參數。 |
|
| kind |
string:
ai |
要設定為與向量搜尋搭配使用的向量化方法類型的名稱。 |
| name |
string |
要與此特定向量化方法相關聯的名稱。 |
AMLParameters
指定連線至 AML 向量化程式的屬性。
| 名稱 | 類型 | Description |
|---|---|---|
| key |
string |
(密鑰認證所需)反洗錢服務的關鍵。 |
| modelName |
部署在所提供端點的 Azure AI Foundry 目錄中的內嵌模型名稱。 |
|
| region |
string |
(權杖驗證的選用項目)。 部署 AML 服務的區域。 |
| resourceId |
string |
(權杖驗證所需)。 AML 服務的 Azure Resource Manager 資源識別碼。 其格式應該為 subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}。 |
| timeout |
string (duration) |
(選用)指定時,指出進行 API 呼叫的 http 用戶端逾時。 |
| uri |
string (uri) |
(無需身份驗證或密鑰身份驗證時需要)將傳送 JSON 承載之 AML 服務的評分 URI。 只允許 https URI 配置。 |
AMLVectorizer
指定透過 Azure AI Foundry 模型目錄部署的 Azure Machine Learning 端點,以產生查詢字串的向量內嵌。
| 名稱 | 類型 | Description |
|---|---|---|
| amlParameters |
指定 AML 向量化程式的屬性。 |
|
| kind |
string:
aml |
要設定為與向量搜尋搭配使用的向量化方法類型的名稱。 |
| name |
string |
要與此特定向量化方法相關聯的名稱。 |
AzureActiveDirectoryApplicationCredentials
針對搜尋服務建立之已註冊應用程式認證,用於對儲存在 Azure 金鑰保存庫中的加密金鑰進行驗證存取。
| 名稱 | 類型 | Description |
|---|---|---|
| applicationId |
string |
已授與 Azure 金鑰保存庫所需存取權限的 AAD 應用程式識別碼,可在加密待用資料時使用。 應用程式識別碼不應與 AAD 應用程式的物件識別碼混淆。 |
| applicationSecret |
string |
指定 AAD 應用程式的驗證金鑰。 |
AzureBlobKnowledgeSource
Azure Blob 儲存體知識來源的設定。
| 名稱 | 類型 | Description |
|---|---|---|
| @odata.etag |
string |
代理程式的 ETag。 |
| azureBlobParameters |
知識來源的類型。 |
|
| description |
string |
選用的使用者定義描述。 |
| encryptionKey |
您在 Azure 金鑰保存庫中建立的加密金鑰描述。 當您想要完全保證沒有人 (甚至 Microsoft) 無法解密它們時,此金鑰可用來為您的代理程式定義提供額外的待用加密層級。 加密代理程式定義後,它將始終保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果您想要輪替加密金鑰,您可以視需要變更此屬性;您的代理定義將不受影響。 使用客戶管理的金鑰進行加密不適用於免費搜尋服務,且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
|
| kind |
string:
azure |
知識來源的類型。 |
| name |
string |
知識來源的名稱。 |
AzureBlobKnowledgeSourceParameters
Azure Blob 儲存體知識來源的參數。
| 名稱 | 類型 | Description |
|---|---|---|
| chatCompletionModel | KnowledgeAgentModel: |
可選的聊天完成模型,用於圖像語言化或上下文提取。 |
| connectionString |
string |
金鑰型連接字串或 ResourceId 格式 (如果使用受控識別)。 |
| containerName |
string |
Blob 儲存體容器的名稱。 |
| createdResources |
object |
由知識來源建立的資源。 |
| disableImageVerbalization |
boolean |
指出是否應該停用影像語言化。 |
| embeddingModel | VectorSearchVectorizer: |
用於向量化內容的可選向量化器配置。 |
| folderPath |
string |
容器內的選用資料夾路徑。 |
| identity | SearchIndexerDataIdentity: |
用於此知識來源的明確身分識別。 |
| ingestionSchedule |
資料擷取的選用排程。 |
AzureOpenAIEmbeddingSkill
可讓您使用 Azure OpenAI 資源為指定的文字輸入產生向量內嵌。
| 名稱 | 類型 | Description |
|---|---|---|
| @odata.type |
string:
#Microsoft. |
指定技能類型的 URI 片段。 |
| apiKey |
string |
指定 Azure OpenAI 資源的 API 金鑰。 |
| authIdentity | SearchIndexerDataIdentity: |
用於輸出連線的使用者指派受控識別。 |
| context |
string |
代表作業發生的層級,例如文件根目錄或文件內容 (例如,/document 或 /document/content)。 預設值為 /document。 |
| deploymentId |
string |
指定資源上 Azure OpenAI 模型部署的識別碼。 |
| description |
string |
技能的描述,描述技能的輸入、輸出和使用方式。 |
| dimensions |
integer (int32) |
產生的輸出內嵌應具有的維度數目。 僅在 text-embedding-3 和更新版本中支援。 |
| inputs |
技能的輸入可以是來源資料集中的資料行,也可以是上游技能的輸出。 |
|
| modelName |
部署在提供的 deploymentId 路徑上的內嵌模型名稱。 |
|
| name |
string |
在技能集中唯一識別技能的技能名稱。 未定義名稱的技能將在技能陣列中獲得其從 1 開始的索引的預設名稱,並以字元「#」為前綴。 |
| outputs |
技能的輸出是搜尋索引中的欄位,或可作為另一個技能輸入使用的值。 |
|
| resourceUri |
string (uri) |
Azure OpenAI 資源的資源 URI。 |
AzureOpenAIModelName
將呼叫的 Azure Open AI 模型名稱。
| 值 | Description |
|---|---|
| text-embedding-ada-002 | |
| text-embedding-3-large | |
| text-embedding-3-small | |
| gpt-4o | |
| gpt-4o-mini | |
| gpt-4.1 | |
| gpt-4.1-mini | |
| gpt-4.1-nano |
AzureOpenAIParameters
指定連線到 Azure OpenAI 資源的參數。
| 名稱 | 類型 | Description |
|---|---|---|
| apiKey |
string |
指定 Azure OpenAI 資源的 API 金鑰。 |
| authIdentity | SearchIndexerDataIdentity: |
用於輸出連線的使用者指派受控識別。 |
| deploymentId |
string |
指定資源上 Azure OpenAI 模型部署的識別碼。 |
| modelName |
部署在提供的 deploymentId 路徑上的內嵌模型名稱。 |
|
| resourceUri |
string (uri) |
Azure OpenAI 資源的資源 URI。 |
AzureOpenAIVectorizer
指定用來向量化查詢字串的 Azure OpenAI 資源。
| 名稱 | 類型 | Description |
|---|---|---|
| azureOpenAIParameters | AzureOpenAIParameters: |
包含 Azure OpenAI 內嵌向量化的特定參數。 |
| kind |
string:
azure |
要設定為與向量搜尋搭配使用的向量化方法類型的名稱。 |
| name |
string |
要與此特定向量化方法相關聯的名稱。 |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| info |
object |
其他資訊。 |
| type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細數據。
| 名稱 | 類型 | Description |
|---|---|---|
| additionalInfo |
錯誤其他資訊。 |
|
| code |
string |
錯誤碼。 |
| details |
錯誤詳細資料。 |
|
| message |
string |
錯誤訊息。 |
| target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
| 名稱 | 類型 | Description |
|---|---|---|
| error |
error 物件。 |
IndexingSchedule
代表索引子執行的排程。
| 名稱 | 類型 | Description |
|---|---|---|
| interval |
string (duration) |
索引子執行之間的時間間隔。 |
| startTime |
string (date-time) |
索引子應該開始執行的時間。 |
InputFieldMappingEntry
技能的輸入欄位對應。
| 名稱 | 類型 | Description |
|---|---|---|
| inputs |
建立複雜類型時使用的遞迴輸入。 |
|
| name |
string |
輸入的名稱。 |
| source |
string |
輸入的來源。 |
| sourceContext |
string |
用於選取遞迴輸入的來源內容。 |
KnowledgeAgentAzureOpenAIModel
指定用來執行查詢規劃的 Azure OpenAI 資源。
| 名稱 | 類型 | Description |
|---|---|---|
| azureOpenAIParameters | AzureOpenAIParameters: |
包含 Azure OpenAI 模型端點特有的參數。 |
| kind |
string:
azure |
AI 模型的類型。 |
KnowledgeAgentModelKind
要用於查詢規劃的 AI 模型。
| 值 | Description |
|---|---|
| azureOpenAI |
使用 Azure Open AI 模型進行查詢規劃。 |
KnowledgeSourceKind
知識來源的那種。
| 值 | Description |
|---|---|
| searchIndex |
從搜尋索引讀取資料的知識來源。 |
| azureBlob |
從 Azure Blob 儲存體讀取資料並將其擷取至搜尋索引的知識來源。 |
OutputFieldMappingEntry
技能的輸出欄位對應。
| 名稱 | 類型 | Description |
|---|---|---|
| name |
string |
技能所定義的輸出名稱。 |
| targetName |
string |
輸出的目標名稱。 它是選用的,預設為名稱。 |
SearchIndexerDataNoneIdentity
清除資料來源的身分識別屬性。
| 名稱 | 類型 | Description |
|---|---|---|
| @odata.type |
string:
#Microsoft. |
指定身分類型的 URI 片段。 |
SearchIndexerDataUserAssignedIdentity
指定要使用的資料來源身分識別。
| 名稱 | 類型 | Description |
|---|---|---|
| @odata.type |
string:
#Microsoft. |
指定身分類型的 URI 片段。 |
| userAssignedIdentity |
string |
使用者指派受控識別的完整 Azure 資源識別碼,通常採用「/subscriptions/12345678-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId」格式,應該已指派給搜尋服務。 |
SearchIndexKnowledgeSource
以搜尋索引為目標的知識來源。
| 名稱 | 類型 | Description |
|---|---|---|
| @odata.etag |
string |
代理程式的 ETag。 |
| description |
string |
選用的使用者定義描述。 |
| encryptionKey |
您在 Azure 金鑰保存庫中建立的加密金鑰描述。 當您想要完全保證沒有人 (甚至 Microsoft) 無法解密它們時,此金鑰可用來為您的代理程式定義提供額外的待用加密層級。 加密代理程式定義後,它將始終保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果您想要輪替加密金鑰,您可以視需要變更此屬性;您的代理定義將不受影響。 使用客戶管理的金鑰進行加密不適用於免費搜尋服務,且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
|
| kind |
string:
search |
知識來源的類型。 |
| name |
string |
知識來源的名稱。 |
| searchIndexParameters |
知識來源的參數。 |
SearchIndexKnowledgeSourceParameters
搜尋索引知識來源的參數。
| 名稱 | 類型 | Description |
|---|---|---|
| searchIndexName |
string |
搜尋索引的名稱。 |
| sourceDataSelect |
string |
用於請求參考來源資料的其他欄位。 |
SearchResourceEncryptionKey
Azure Key Vault 中的客戶管理加密金鑰。 您建立和管理的金鑰可用來加密或解密靜態資料,例如索引和同義字對映。
| 名稱 | 類型 | Description |
|---|---|---|
| accessCredentials |
用來存取 Azure 金鑰保存庫的選擇性 Azure Active Directory 認證。 如果改用受控識別,則不需要。 |
|
| identity | SearchIndexerDataIdentity: |
用於此加密金鑰的明確受控識別。 如果未指定且存取認證屬性為 Null,則會使用系統指派的受控識別。 更新資源時,如果未指定明確身分識別,則會保持不變。 如果指定 “none” ,則會清除此屬性的值。 |
| keyVaultKeyName |
string |
要用來加密待用資料的 Azure 金鑰保存庫名稱。 |
| keyVaultKeyVersion |
string |
要用來加密待用資料的 Azure 金鑰版本。 |
| keyVaultUri |
string |
Azure 金鑰保存庫的 URI,也稱為 DNS 名稱,其中包含要用來加密待用資料的金鑰。 範例 URI 可能是 |
VectorSearchVectorizerKind
查詢期間要使用的向量化方法。
| 值 | Description |
|---|---|
| azureOpenAI |
在查詢時使用 Azure OpenAI 資源產生內嵌。 |
| customWebApi |
在查詢時使用自訂 Web 端點產生內嵌。 |
| aiServicesVision |
使用 Azure AI 服務視覺向量化 API 在查詢時產生影像或文字輸入的內嵌。 |
| aml |
在查詢時使用透過 Azure AI Foundry 模型目錄部署的 Azure Machine Learning 端點產生內嵌。 |
WebApiParameters
指定連接至使用者定義向量化程式的屬性。
| 名稱 | 類型 | Description |
|---|---|---|
| authIdentity | SearchIndexerDataIdentity: |
用於輸出連線的使用者指派受控識別。 如果提供 authResourceId 且未指定,則會使用系統指派的受控識別。 在索引子更新時,如果未指定身分識別,則值會保持不變。 如果設定為 “none”,則會清除此屬性的值。 |
| authResourceId |
string |
適用於連線到 Azure 函式中外部程式碼的自訂端點,或提供轉換的其他應用程式。 此值應該是向 Azure Active Directory 註冊時針對函式或應用程式建立的應用程式識別碼。 指定時,向量化會使用搜尋服務的受控識別碼 (系統或使用者指派) 和函式或應用程式的存取權杖連線到函式或應用程式,並使用此值作為建立存取權杖範圍的資源識別碼。 |
| httpHeaders |
object |
提出 HTTP 要求所需的標頭。 |
| httpMethod |
string |
HTTP 要求的方法。 |
| timeout |
string (duration) |
要求所需的逾時。 預設值為 30 秒。 |
| uri |
string (uri) |
提供向量化器的 Web API 的 URI。 |
WebApiVectorizer
指定使用者定義的向量化器,以產生查詢字串的向量內嵌。 外部向量化器的整合是使用技能組的自訂 Web API 介面來達成。
| 名稱 | 類型 | Description |
|---|---|---|
| customWebApiParameters |
指定使用者定義向量化程式的屬性。 |
|
| kind |
string:
custom |
要設定為與向量搜尋搭配使用的向量化方法類型的名稱。 |
| name |
string |
要與此特定向量化方法相關聯的名稱。 |