Knowledge Sources - Create Or Update
建立新的知識來源或更新知識來源 (如果已存在)。
PUT {endpoint}/knowledgesources('{sourceName}')?api-version=2025-11-01-preview
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
搜尋服務的端點 URL。 |
|
source
|
path | True |
string |
知識來源的名稱。 |
|
api-version
|
query | True |
string minLength: 1 |
用於此作業的 API 版本。 |
要求標頭
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| Accept |
接受標頭。 |
||
| If-Match |
string |
定義 If-Match 條件。 只有在伺服器上的 ETag 符合此值時,才會執行作業。 |
|
| If-None-Match |
string |
定義 If-None-Match 條件。 只有在伺服器上的 ETag 不符合此值時,才會執行作業。 |
|
| Prefer | True |
針對 HTTP PUT 要求,指示服務在成功時傳回建立/更新的資源。 |
|
| x-ms-client-request-id |
string (uuid) |
要求不透明、全域唯一、用戶端產生的字串標識碼。 |
要求本文
要求主體可以是下列其中一項:
| 名稱 | Description |
|---|---|
|
Azure |
Azure Blob 儲存體知識來源的設定。 |
|
Indexed |
OneLake 知識來源的設定。 |
|
Indexed |
SharePoint 知識來源的設定。 |
|
Remote |
遠端 SharePoint 知識來源的設定。 |
|
Search |
以搜尋索引為目標的知識來源。 |
|
Web |
以網頁結果為目標的知識來源。 |
AzureBlobKnowledgeSource
Azure Blob 儲存體知識來源的設定。
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| azureBlobParameters | True |
知識來源的類型。 |
|
| kind | True |
string:
azure |
知識來源的類型。 |
| name | True |
string |
知識來源的名稱。 |
| @odata.etag |
string |
知識來源的ETag。 |
|
| description |
string |
選用的使用者定義描述。 |
|
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
IndexedOneLakeKnowledgeSource
OneLake 知識來源的設定。
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| indexedOneLakeParameters | True |
知識來源的參數。 |
|
| kind | True |
string:
indexed |
知識來源的類型。 |
| name | True |
string |
知識來源的名稱。 |
| @odata.etag |
string |
知識來源的ETag。 |
|
| description |
string |
選用的使用者定義描述。 |
|
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
IndexedSharePointKnowledgeSource
SharePoint 知識來源的設定。
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| indexedSharePointParameters | True |
知識來源的參數。 |
|
| kind | True |
string:
indexed |
知識來源的類型。 |
| name | True |
string |
知識來源的名稱。 |
| @odata.etag |
string |
知識來源的ETag。 |
|
| description |
string |
選用的使用者定義描述。 |
|
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
RemoteSharePointKnowledgeSource
遠端 SharePoint 知識來源的設定。
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| kind | True |
string:
remote |
知識來源的類型。 |
| name | True |
string |
知識來源的名稱。 |
| @odata.etag |
string |
知識來源的ETag。 |
|
| description |
string |
選用的使用者定義描述。 |
|
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
||
| remoteSharePointParameters |
遠端 SharePoint 知識來源的參數。 |
SearchIndexKnowledgeSource
以搜尋索引為目標的知識來源。
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| kind | True |
string:
search |
知識來源的類型。 |
| name | True |
string |
知識來源的名稱。 |
| searchIndexParameters | True |
知識來源的參數。 |
|
| @odata.etag |
string |
知識來源的ETag。 |
|
| description |
string |
選用的使用者定義描述。 |
|
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
WebKnowledgeSource
以網頁結果為目標的知識來源。
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| kind | True |
string:
web |
知識來源的類型。 |
| name | True |
string |
知識來源的名稱。 |
| @odata.etag |
string |
知識來源的ETag。 |
|
| description |
string |
選用的使用者定義描述。 |
|
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
||
| webParameters |
Web 知識來源的參數。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK | KnowledgeSource: |
要求已成功。 |
| 201 Created | KnowledgeSource: |
要求已成功,因此已建立新的資源。 |
| Other Status Codes |
未預期的錯誤回應。 |
安全性
api-key
類型:
apiKey
位於:
header
OAuth2Auth
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍
| 名稱 | Description |
|---|---|
| https://search.azure.com/.default |
範例
SearchServiceCreateOrUpdateKnowledgeSourceAzureBlob
範例要求
PUT https://previewexampleservice.search.windows.net/knowledgesources('ks-preview-test')?api-version=2025-11-01-preview
{
"azureBlobParameters": {
"connectionString": "DefaultEndpointsProtocol=https;AccountName=myAccountName;AccountKey=myAccountKey;EndpointSuffix=core.windows.net ",
"containerName": "test-container",
"folderPath": "test-path",
"isADLSGen2": false,
"ingestionParameters": {
"identity": {
"userAssignedIdentity": "/my/userassigned/id",
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity"
},
"embeddingModel": {
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "model",
"apiKey": "api-key",
"modelName": "text-embedding-3-large"
},
"kind": "azureOpenAI"
},
"chatCompletionModel": {
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "myDeployment",
"apiKey": "api-key",
"modelName": "gpt-4o-mini"
},
"kind": "azureOpenAI"
},
"disableImageVerbalization": false,
"ingestionSchedule": {
"interval": "P1D",
"startTime": "2025-01-07T19:30:00Z"
},
"ingestionPermissionOptions": [
"userIds",
"groupIds",
"rbacScope"
],
"contentExtractionMode": "standard",
"aiServices": {
"uri": "https://my-ai-service.azure.com/",
"apiKey": "api-key"
}
}
},
"name": "ks-preview-test",
"description": "Description of the knowledge source.",
"kind": "azureBlob",
"@odata.etag": "0x1234568AE7E58A1",
"encryptionKey": {
"keyVaultKeyName": "myUserManagedEncryptionKey-createdinAzureKeyVault",
"keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString",
"keyVaultUri": "https://myKeyVault.vault.azure.net",
"accessCredentials": {
"applicationId": "00000000-0000-0000-0000-000000000000",
"applicationSecret": "<applicationSecret>"
}
}
}
範例回覆
{
"@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",
"isADLSGen2": false,
"ingestionParameters": {
"disableImageVerbalization": false,
"ingestionPermissionOptions": [
"userIds",
"groupIds",
"rbacScope"
],
"contentExtractionMode": "standard",
"identity": {
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
"userAssignedIdentity": "/my/userassigned/id"
},
"embeddingModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "model",
"apiKey": "api-key",
"modelName": "text-embedding-3-large"
}
},
"chatCompletionModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "myDeployment",
"apiKey": "api-key",
"modelName": "gpt-4o-mini"
}
},
"ingestionSchedule": {
"interval": "P1D",
"startTime": "2024-06-06T00:01:50.265Z"
},
"aiServices": {
"uri": "https://my-ai-service.azure.com/",
"apiKey": "api-key"
}
},
"createdResources": {
"dataSourceConnection": "ks-preview-test-datasource",
"indexer": "ks-preview-test-indexer",
"skillset": "ks-preview-test-skillset",
"index": "ks-preview-test-index"
}
}
}
{
"@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",
"isADLSGen2": false,
"ingestionParameters": {
"disableImageVerbalization": false,
"ingestionPermissionOptions": [
"userIds",
"groupIds",
"rbacScope"
],
"contentExtractionMode": "standard",
"identity": {
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
"userAssignedIdentity": "/my/userassigned/id"
},
"embeddingModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "model",
"apiKey": "api-key",
"modelName": "text-embedding-3-large"
}
},
"chatCompletionModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "myDeployment",
"apiKey": "api-key",
"modelName": "gpt-4o-mini"
}
},
"ingestionSchedule": {
"interval": "P1D",
"startTime": "2024-06-06T00:01:50.265Z"
},
"aiServices": {
"uri": "https://my-ai-service.azure.com/",
"apiKey": "api-key"
}
},
"createdResources": {
"dataSourceConnection": "ks-preview-test-datasource",
"indexer": "ks-preview-test-indexer",
"skillset": "ks-preview-test-skillset",
"index": "ks-preview-test-index"
}
}
}
SearchServiceCreateOrUpdateKnowledgeSourceIndexedOneLake
範例要求
PUT https://previewexampleservice.search.windows.net/knowledgesources('ks-preview-test')?api-version=2025-11-01-preview
{
"indexedOneLakeParameters": {
"fabricWorkspaceId": "ResourceId=fakeWorkspaceId",
"lakehouseId": "fakeLakehouseId",
"targetPath": "testfolder",
"ingestionParameters": {
"identity": {
"userAssignedIdentity": "/my/userassigned/id",
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity"
},
"embeddingModel": {
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "model",
"apiKey": "api-key",
"modelName": "text-embedding-3-large"
},
"kind": "azureOpenAI"
},
"chatCompletionModel": {
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "myDeployment",
"apiKey": "api-key",
"modelName": "gpt-4o-mini"
},
"kind": "azureOpenAI"
},
"disableImageVerbalization": false,
"ingestionSchedule": {
"interval": "P1D",
"startTime": "2025-01-07T19:30:00Z"
},
"ingestionPermissionOptions": [
"userIds",
"groupIds",
"rbacScope"
],
"contentExtractionMode": "standard",
"aiServices": {
"uri": "https://my-ai-service.azure.com/",
"apiKey": "api-key"
}
}
},
"name": "ks-preview-test",
"description": "Description of the OneLake knowledge source.",
"kind": "indexedOneLake",
"@odata.etag": "0x1234568AE7E58A1",
"encryptionKey": {
"keyVaultKeyName": "myUserManagedEncryptionKey-createdinAzureKeyVault",
"keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString",
"keyVaultUri": "https://myKeyVault.vault.azure.net",
"accessCredentials": {
"applicationId": "00000000-0000-0000-0000-000000000000",
"applicationSecret": "<applicationSecret>"
}
}
}
範例回覆
{
"@odata.etag": "0x1234568AE7E58A1",
"name": "ks-preview-test",
"kind": "indexedOneLake",
"description": "Description of the OneLake knowledge source.",
"encryptionKey": {
"keyVaultKeyName": "myUserManagedEncryptionKey-createdinAzureKeyVault",
"keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString",
"keyVaultUri": "https://myKeyVault.vault.azure.net",
"accessCredentials": {
"applicationId": "00000000-0000-0000-0000-000000000000",
"applicationSecret": "<applicationSecret>"
}
},
"indexedOneLakeParameters": {
"fabricWorkspaceId": "ResourceId=fakeWorkspaceId",
"lakehouseId": "fakeLakehouseId",
"targetPath": "testfolder",
"ingestionParameters": {
"disableImageVerbalization": false,
"ingestionPermissionOptions": [
"userIds",
"groupIds",
"rbacScope"
],
"contentExtractionMode": "standard",
"identity": {
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
"userAssignedIdentity": "/my/userassigned/id"
},
"embeddingModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "model",
"apiKey": "api-key",
"modelName": "text-embedding-3-large"
}
},
"chatCompletionModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "myDeployment",
"apiKey": "api-key",
"modelName": "gpt-4o-mini"
}
},
"ingestionSchedule": {
"interval": "P1D",
"startTime": "2024-06-06T00:01:50.265Z"
},
"aiServices": {
"uri": "https://my-ai-service.azure.com/",
"apiKey": "api-key"
}
}
}
}
{
"@odata.etag": "0x1234568AE7E58A1",
"name": "ks-preview-test",
"kind": "indexedOneLake",
"description": "Description of the OneLake knowledge source.",
"encryptionKey": {
"keyVaultKeyName": "myUserManagedEncryptionKey-createdinAzureKeyVault",
"keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString",
"keyVaultUri": "https://myKeyVault.vault.azure.net",
"accessCredentials": {
"applicationId": "00000000-0000-0000-0000-000000000000",
"applicationSecret": "<applicationSecret>"
}
},
"indexedOneLakeParameters": {
"fabricWorkspaceId": "ResourceId=fakeWorkspaceId",
"lakehouseId": "fakeLakehouseId",
"targetPath": "testfolder",
"ingestionParameters": {
"disableImageVerbalization": false,
"ingestionPermissionOptions": [
"userIds",
"groupIds",
"rbacScope"
],
"contentExtractionMode": "standard",
"identity": {
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
"userAssignedIdentity": "/my/userassigned/id"
},
"embeddingModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "model",
"apiKey": "api-key",
"modelName": "text-embedding-3-large"
}
},
"chatCompletionModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "myDeployment",
"apiKey": "api-key",
"modelName": "gpt-4o-mini"
}
},
"ingestionSchedule": {
"interval": "P1D",
"startTime": "2024-06-06T00:01:50.265Z"
},
"aiServices": {
"uri": "https://my-ai-service.azure.com/",
"apiKey": "api-key"
}
}
}
}
SearchServiceCreateOrUpdateKnowledgeSourceIndexedSharePoint
範例要求
PUT https://previewexampleservice.search.windows.net/knowledgesources('ks-preview-test')?api-version=2025-11-01-preview
{
"indexedSharePointParameters": {
"connectionString": "DefaultEndpointsProtocol=https;AccountName=myAccountName;AccountKey=myAccountKey;EndpointSuffix=core.windows.net ",
"containerName": "defaultSiteLibrary",
"query": "*.docx OR *.pdf",
"ingestionParameters": {
"identity": {
"userAssignedIdentity": "/my/userassigned/id",
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity"
},
"embeddingModel": {
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "model",
"apiKey": "api-key",
"modelName": "text-embedding-3-large"
},
"kind": "azureOpenAI"
},
"chatCompletionModel": {
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "myDeployment",
"apiKey": "api-key",
"modelName": "gpt-4o-mini"
},
"kind": "azureOpenAI"
},
"disableImageVerbalization": false,
"ingestionSchedule": {
"interval": "P1D",
"startTime": "2025-01-07T19:30:00Z"
},
"ingestionPermissionOptions": [
"userIds",
"groupIds",
"rbacScope"
],
"contentExtractionMode": "standard",
"aiServices": {
"uri": "https://my-ai-service.azure.com/",
"apiKey": "api-key"
}
}
},
"name": "ks-preview-test",
"description": "Description of the SharePoint knowledge source.",
"kind": "indexedSharePoint",
"@odata.etag": "0x1234568AE7E58A1",
"encryptionKey": {
"keyVaultKeyName": "myUserManagedEncryptionKey-createdinAzureKeyVault",
"keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString",
"keyVaultUri": "https://myKeyVault.vault.azure.net",
"accessCredentials": {
"applicationId": "00000000-0000-0000-0000-000000000000",
"applicationSecret": "<applicationSecret>"
}
}
}
範例回覆
{
"@odata.etag": "0x1234568AE7E58A1",
"name": "ks-preview-test",
"kind": "indexedSharePoint",
"description": "Description of the SharePoint knowledge source.",
"encryptionKey": {
"keyVaultKeyName": "myUserManagedEncryptionKey-createdinAzureKeyVault",
"keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString",
"keyVaultUri": "https://myKeyVault.vault.azure.net",
"accessCredentials": {
"applicationId": "00000000-0000-0000-0000-000000000000",
"applicationSecret": "<applicationSecret>"
}
},
"indexedSharePointParameters": {
"connectionString": "DefaultEndpointsProtocol=https;AccountName=myAccountName;AccountKey=myAccountKey;EndpointSuffix=core.windows.net ",
"containerName": "defaultSiteLibrary",
"query": "*.docx OR *.pdf",
"ingestionParameters": {
"disableImageVerbalization": false,
"ingestionPermissionOptions": [
"userIds",
"groupIds",
"rbacScope"
],
"contentExtractionMode": "standard",
"identity": {
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
"userAssignedIdentity": "/my/userassigned/id"
},
"embeddingModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "model",
"apiKey": "api-key",
"modelName": "text-embedding-3-large"
}
},
"chatCompletionModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "myDeployment",
"apiKey": "api-key",
"modelName": "gpt-4o-mini"
}
},
"ingestionSchedule": {
"interval": "P1D",
"startTime": "2024-06-06T00:01:50.265Z"
},
"aiServices": {
"uri": "https://my-ai-service.azure.com/",
"apiKey": "api-key"
}
}
}
}
{
"@odata.etag": "0x1234568AE7E58A1",
"name": "ks-preview-test",
"kind": "indexedSharePoint",
"description": "Description of the SharePoint knowledge source.",
"encryptionKey": {
"keyVaultKeyName": "myUserManagedEncryptionKey-createdinAzureKeyVault",
"keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString",
"keyVaultUri": "https://myKeyVault.vault.azure.net",
"accessCredentials": {
"applicationId": "00000000-0000-0000-0000-000000000000",
"applicationSecret": "<applicationSecret>"
}
},
"indexedSharePointParameters": {
"connectionString": "DefaultEndpointsProtocol=https;AccountName=myAccountName;AccountKey=myAccountKey;EndpointSuffix=core.windows.net ",
"containerName": "defaultSiteLibrary",
"query": "*.docx OR *.pdf",
"ingestionParameters": {
"disableImageVerbalization": false,
"ingestionPermissionOptions": [
"userIds",
"groupIds",
"rbacScope"
],
"contentExtractionMode": "standard",
"identity": {
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
"userAssignedIdentity": "/my/userassigned/id"
},
"embeddingModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "model",
"apiKey": "api-key",
"modelName": "text-embedding-3-large"
}
},
"chatCompletionModel": {
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://test-sample.openai.azure.com/",
"deploymentId": "myDeployment",
"apiKey": "api-key",
"modelName": "gpt-4o-mini"
}
},
"ingestionSchedule": {
"interval": "P1D",
"startTime": "2024-06-06T00:01:50.265Z"
},
"aiServices": {
"uri": "https://my-ai-service.azure.com/",
"apiKey": "api-key"
}
}
}
}
SearchServiceCreateOrUpdateKnowledgeSourceWeb
範例要求
PUT https://previewexampleservice.search.windows.net/knowledgesources('ks-preview-test')?api-version=2025-11-01-preview
{
"webParameters": {
"domains": {
"allowedDomains": [
{
"address": "example.com",
"includeSubpages": true
},
{
"address": "another-example.com"
}
],
"blockedDomains": [
{
"address": "blocked.com"
},
{
"address": "spam.com",
"includeSubpages": true
}
]
}
},
"name": "ks-preview-test",
"description": "Description of the knowledge source.",
"kind": "web",
"@odata.etag": "0x1234568AE7E58A1",
"encryptionKey": {
"keyVaultKeyName": "myUserManagedEncryptionKey-createdinAzureKeyVault",
"keyVaultKeyVersion": "myKeyVersion-32charAlphaNumericString",
"keyVaultUri": "https://myKeyVault.vault.azure.net",
"accessCredentials": {
"applicationId": "00000000-0000-0000-0000-000000000000",
"applicationSecret": "<applicationSecret>"
}
}
}
範例回覆
{
"@odata.etag": "0x1234568AE7E58A1",
"name": "ks-preview-test",
"kind": "web",
"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>"
}
},
"webParameters": {
"domains": {
"allowedDomains": [
{
"address": "example.com",
"includeSubpages": true
},
{
"address": "another-example.com"
}
],
"blockedDomains": [
{
"address": "blocked.com"
},
{
"address": "spam.com",
"includeSubpages": true
}
]
}
}
}
{
"@odata.etag": "0x1234568AE7E58A1",
"name": "ks-preview-test",
"kind": "web",
"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>"
}
},
"webParameters": {
"domains": {
"allowedDomains": [
{
"address": "example.com",
"includeSubpages": true
},
{
"address": "another-example.com"
}
],
"blockedDomains": [
{
"address": "blocked.com"
},
{
"address": "spam.com",
"includeSubpages": true
}
]
}
}
}
定義
Accept
接受標頭。
| 值 | Description |
|---|---|
| application/json;odata.metadata=minimal |
AIServices
AI 服務的參數。
| 名稱 | 類型 | Description |
|---|---|---|
| apiKey |
string |
用於存取 AI 服務的 API 金鑰。 |
| uri |
string (uri) |
AI 服務端點的 URI。 |
AzureBlobKnowledgeSource
Azure Blob 儲存體知識來源的設定。
| 名稱 | 類型 | Description |
|---|---|---|
| @odata.etag |
string |
知識來源的ETag。 |
| azureBlobParameters |
知識來源的類型。 |
|
| description |
string |
選用的使用者定義描述。 |
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
|
| kind |
string:
azure |
知識來源的類型。 |
| name |
string |
知識來源的名稱。 |
AzureBlobKnowledgeSourceParameters
Azure Blob 儲存體知識來源的參數。
| 名稱 | 類型 | 預設值 | Description |
|---|---|---|---|
| connectionString |
string |
金鑰型連接字串或 ResourceId 格式 (如果使用受控識別)。 |
|
| containerName |
string |
Blob 儲存體容器的名稱。 |
|
| createdResources |
object |
由知識來源建立的資源。 |
|
| folderPath |
string |
容器內的選用資料夾路徑。 |
|
| ingestionParameters |
合併所有一般擷取設定。 |
||
| isADLSGen2 |
boolean |
False |
如果連線到 ADLS Gen2 儲存體帳戶,請設定為 true。 預設值為 false。 |
AzureOpenAIModelName
將呼叫的 Azure Open AI 模型名稱。
| 值 | Description |
|---|---|
| text-embedding-ada-002 |
TextEmbeddingAda002 模型。 |
| text-embedding-3-large |
TextEmbedding3Large 模型。 |
| text-embedding-3-small |
TextEmbedding3小型模型。 |
| gpt-4o |
Gpt4o 模型。 |
| gpt-4o-mini |
Gpt4oMini 型號。 |
| gpt-4.1 |
GPT41 型號。 |
| gpt-4.1-mini |
Gpt41Mini 型號。 |
| gpt-4.1-nano |
Gpt41Nano 模型。 |
| gpt-5 |
GPT5 型號。 |
| gpt-5-mini |
Gpt5Mini 型號。 |
| gpt-5-nano |
Gpt5Nano 模型。 |
AzureOpenAIVectorizerParameters
指定連線到 Azure OpenAI 資源的參數。
| 名稱 | 類型 | Description |
|---|---|---|
| apiKey |
string |
所指定 Azure OpenAI 資源的 API 金鑰。 |
| authIdentity | SearchIndexerDataIdentity: |
用於輸出連線的使用者指派受控識別。 |
| deploymentId |
string |
指定資源上 Azure OpenAI 模型部署的識別碼。 |
| modelName |
在提供的 deploymentId 路徑上部署的內嵌模型名稱。 |
|
| resourceUri |
string (uri) |
Azure OpenAI 資源的資源 URI。 |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| info |
附加資訊。 |
|
| type |
string |
其他資訊類型。 |
ErrorDetail
錯誤詳細數據。
| 名稱 | 類型 | Description |
|---|---|---|
| additionalInfo |
錯誤附加資訊。 |
|
| code |
string |
錯誤碼。 |
| details |
錯誤詳細數據。 |
|
| message |
string |
錯誤訊息。 |
| target |
string |
錯誤目標。 |
ErrorResponse
所有 Azure Resource Manager API 的常見錯誤回應,以傳回失敗作業的錯誤詳細數據。 (這也遵循 OData 錯誤回應格式。)。
| 名稱 | 類型 | Description |
|---|---|---|
| error |
錯誤物件。 |
IndexedOneLakeKnowledgeSource
OneLake 知識來源的設定。
| 名稱 | 類型 | Description |
|---|---|---|
| @odata.etag |
string |
知識來源的ETag。 |
| description |
string |
選用的使用者定義描述。 |
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
|
| indexedOneLakeParameters |
知識來源的參數。 |
|
| kind |
string:
indexed |
知識來源的類型。 |
| name |
string |
知識來源的名稱。 |
IndexedOneLakeKnowledgeSourceParameters
OneLake 知識來源的參數。
| 名稱 | 類型 | Description |
|---|---|---|
| createdResources |
object |
由知識來源建立的資源。 |
| fabricWorkspaceId |
string |
OneLake 工作區識別碼。 |
| ingestionParameters |
合併所有一般擷取設定。 |
|
| lakehouseId |
string |
指定要存取的 OneLake Lakehouse。 |
| targetPath |
string |
選擇性的 OneLakehouse 資料夾或捷徑,以篩選 OneLake 內容。 |
IndexedSharePointContainerName
指定要存取的 SharePoint 文件庫。
| 值 | Description |
|---|---|
| defaultSiteLibrary |
從網站的預設文件庫中編製內容索引。 |
| allSiteLibraries |
為網站中每個文件庫的內容編製索引。 |
| useQuery |
使用查詢來篩選 SharePoint 內容。 |
IndexedSharePointKnowledgeSource
SharePoint 知識來源的設定。
| 名稱 | 類型 | Description |
|---|---|---|
| @odata.etag |
string |
知識來源的ETag。 |
| description |
string |
選用的使用者定義描述。 |
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
|
| indexedSharePointParameters |
知識來源的參數。 |
|
| kind |
string:
indexed |
知識來源的類型。 |
| name |
string |
知識來源的名稱。 |
IndexedSharePointKnowledgeSourceParameters
SharePoint 知識來源的參數。
| 名稱 | 類型 | Description |
|---|---|---|
| connectionString |
string |
格式為 SharePoint 連接字串:SharePointOnlineEndpoint=[SharePoint 網站 URL];ApplicationId=[Azure AD 應用程式識別碼];ApplicationSecret=[Azure AD 應用程式用戶端密碼];TenantId=[SharePoint 網站租用戶識別碼] |
| containerName |
指定要存取的 SharePoint 文件庫。 |
|
| createdResources |
object |
由知識來源建立的資源。 |
| ingestionParameters |
合併所有一般擷取設定。 |
|
| query |
string |
篩選 SharePoint 內容的選擇性查詢。 |
IndexingSchedule
表示索引器執行的排程。
| 名稱 | 類型 | Description |
|---|---|---|
| interval |
string (duration) |
索引子執行之間的時間間隔。 |
| startTime |
string (date-time) |
索引子應該開始執行的時間。 |
KnowledgeBaseAzureOpenAIModel
指定用來執行查詢規劃的 Azure OpenAI 資源。
| 名稱 | 類型 | Description |
|---|---|---|
| azureOpenAIParameters |
Azure OpenAI 參數。 |
|
| kind |
string:
azure |
要用於查詢規劃的 AI 模型。 |
KnowledgeBaseModelKind
要用於查詢規劃的 AI 模型。
| 值 | Description |
|---|---|
| azureOpenAI |
使用 Azure Open AI 模型進行查詢規劃。 |
KnowledgeSourceAzureOpenAIVectorizer
指定用來向量化查詢字串的 Azure OpenAI 資源。
| 名稱 | 類型 | Description |
|---|---|---|
| azureOpenAIParameters |
包含 Azure OpenAI 內嵌向量化的特定參數。 |
|
| kind |
string:
azure |
要設定為與向量搜尋搭配使用的向量化方法類型的名稱。 |
KnowledgeSourceIngestionParameters
合併知識來源的所有一般擷取設定。
| 名稱 | 類型 | 預設值 | Description |
|---|---|---|---|
| aiServices |
用於內容處理的選用 AI 服務設定。 |
||
| chatCompletionModel | KnowledgeBaseModel: |
可選的聊天完成模型,用於圖像語言化或上下文提取。 |
|
| contentExtractionMode |
enum:
|
minimal |
可選的內容擷取模式。 預設值為「最小」。 |
| disableImageVerbalization |
boolean |
False |
指出是否應該停用影像語言化。 預設值為 false。 |
| embeddingModel | KnowledgeSourceVectorizer: |
用於向量化內容的可選向量化器配置。 |
|
| identity | SearchIndexerDataIdentity: |
用於此知識來源的明確身分識別。 |
|
| ingestionPermissionOptions |
可選的權限類型清單,可與文件內容一起擷取。 如果指定,它會設定資料來源的索引子許可權選項。 |
||
| ingestionSchedule |
資料擷取的選用排程。 |
KnowledgeSourceIngestionPermissionOption
文件內容可同時擷取權限類型。
| 值 | Description |
|---|---|
| userIds |
擷取明確的使用者識別碼以及文件內容。 |
| groupIds |
擷取群組識別碼以及文件內容。 |
| rbacScope |
內嵌 RBAC 範圍資訊以及文件內容。 |
KnowledgeSourceKind
知識來源的那種。
| 值 | Description |
|---|---|
| searchIndex |
從搜尋索引讀取資料的知識來源。 |
| azureBlob |
從 Azure Blob 儲存體讀取資料並將其擷取至搜尋索引的知識來源。 |
| indexedSharePoint |
一個讀取索引 SharePoint 資料的知識來源。 |
| indexedOneLake |
一個讀取索引 OneLake 資料的知識來源。 |
| web |
一個能從網路讀取資料的知識來源。 |
| remoteSharePoint |
一個能從遠端 SharePoint 讀取資料的知識來源。 |
Prefer
針對 HTTP PUT 要求,指示服務在成功時傳回建立/更新的資源。
| 值 | Description |
|---|---|
| return=representation |
RemoteSharePointKnowledgeSource
遠端 SharePoint 知識來源的設定。
| 名稱 | 類型 | Description |
|---|---|---|
| @odata.etag |
string |
知識來源的ETag。 |
| description |
string |
選用的使用者定義描述。 |
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
|
| kind |
string:
remote |
知識來源的類型。 |
| name |
string |
知識來源的名稱。 |
| remoteSharePointParameters |
遠端 SharePoint 知識來源的參數。 |
RemoteSharePointKnowledgeSourceParameters
遠端 SharePoint 知識來源的參數。
| 名稱 | 類型 | Description |
|---|---|---|
| containerTypeId |
string |
SharePoint Embedded 連線的容器識別碼。 當此值為 Null 時,它會使用 SharePoint Online。 |
| filterExpression |
string |
關鍵字查詢語言 (KQL) 運算式,其中包含可查詢的 SharePoint 屬性和屬性,可在查詢執行之前設定擷取範圍。 |
| resourceMetadata |
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」格式,應該已指派給搜尋服務。 |
SearchIndexFieldReference
搜尋索引的欄位參考。
| 名稱 | 類型 | Description |
|---|---|---|
| name |
string |
欄位的名稱。 |
SearchIndexKnowledgeSource
以搜尋索引為目標的知識來源。
| 名稱 | 類型 | Description |
|---|---|---|
| @odata.etag |
string |
知識來源的ETag。 |
| description |
string |
選用的使用者定義描述。 |
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
|
| kind |
string:
search |
知識來源的類型。 |
| name |
string |
知識來源的名稱。 |
| searchIndexParameters |
知識來源的參數。 |
SearchIndexKnowledgeSourceParameters
搜尋索引知識來源的參數。
| 名稱 | 類型 | Description |
|---|---|---|
| searchFields |
用來限制要在搜尋索引上搜尋的欄位。 |
|
| searchIndexName |
string |
搜尋索引的名稱。 |
| semanticConfigurationName |
string |
用來在目標搜尋索引上指定預設索引以外的不同語意配置。 |
| sourceDataFields |
用於請求參考來源資料的其他欄位。 |
SearchResourceEncryptionKey
Azure Key Vault 中客戶管理的加密密鑰。 您建立和管理的金鑰可用來加密或解密靜態資料,例如索引和同義字對映。
| 名稱 | 類型 | Description |
|---|---|---|
| accessCredentials.applicationId |
string |
AAD 應用程式識別碼,已將待用數據加密時要使用的 Azure Key Vault 所需訪問許可權授與。 應用程式標識碼不應與 AAD 應用程式的物件標識元混淆。 |
| accessCredentials.applicationSecret |
string |
指定 AAD 應用程式的驗證金鑰。 |
| identity | SearchIndexerDataIdentity: |
要用於此加密金鑰的明確受控識別。 如果未指定,且存取認證屬性為 Null,則會使用系統指派的受控識別。 更新資源時,如果未指定明確識別,則會維持不變。 如果指定了 「none」 ,則會清除此屬性的值。 |
| keyVaultKeyName |
string |
要用來加密待用數據的 Azure Key Vault 金鑰名稱。 |
| keyVaultKeyVersion |
string |
要用來加密待用數據的 Azure Key Vault 金鑰版本。 |
| keyVaultUri |
string |
Azure Key Vault 的 URI,也稱為 DNS 名稱,其中包含用來加密待用數據的密鑰。 範例 URI 可能會 |
VectorSearchVectorizerKind
查詢期間要使用的向量化方法。
| 值 | Description |
|---|---|
| azureOpenAI |
在查詢時使用 Azure OpenAI 資源產生內嵌。 |
| customWebApi |
在查詢時使用自定義 Web 端點產生內嵌。 |
| aiServicesVision |
使用 Azure AI 服務視覺向量化 API,在查詢時產生影像或文字輸入的內嵌。 |
| aml |
在查詢時使用透過 Azure AI Foundry 模型目錄部署的 Azure Machine Learning 端點產生內嵌。 |
WebKnowledgeSource
以網頁結果為目標的知識來源。
| 名稱 | 類型 | Description |
|---|---|---|
| @odata.etag |
string |
知識來源的ETag。 |
| description |
string |
選用的使用者定義描述。 |
| encryptionKey |
您在 Azure Key Vault 中建立的加密金鑰描述。 當你想要完全確定沒有人,甚至不包括 Microsoft,能解密這些資料時,這個金鑰用來為你的知識來源定義提供額外的靜態加密層級。 一旦你加密了你的知識來源定義,它就會一直保持加密狀態。 搜尋服務會忽略嘗試將此屬性設定為 Null。 如果你想輪換加密金鑰,可以根據需要更改這個屬性;你的知識來源定義不會受到影響。 使用客戶管理的金鑰加密不適用於免費搜尋服務,而且僅適用於 2019 年 1 月 1 日或之後建立的付費服務。 |
|
| kind |
string:
web |
知識來源的類型。 |
| name |
string |
知識來源的名稱。 |
| webParameters |
Web 知識來源的參數。 |
WebKnowledgeSourceDomain
Web 知識來源網域的設定。
| 名稱 | 類型 | Description |
|---|---|---|
| address |
string |
網域的位址。 |
| includeSubpages |
boolean |
是否包含此網域的子頁面。 |
WebKnowledgeSourceDomains
Web 知識來源的網域允許/封鎖設定。
| 名稱 | 類型 | Description |
|---|---|---|
| allowedDomains |
允許使用網路結果的網域。 |
|
| blockedDomains |
被網路搜尋結果封鎖的網域。 |
WebKnowledgeSourceParameters
Web 知識來源的參數。
| 名稱 | 類型 | Description |
|---|---|---|
| domains |
網頁結果的網域允許/封鎖設定。 |