Knowledge Sources - Get File Ingestion Operation
取得檔案擷取作業的狀態,並在成功時取得結果。
GET {endpoint}/knowledgesources('{sourceName}')/files/operations/{operationId}?api-version=2026-11-01-preview
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
搜尋服務的端點 URL。 |
|
operation
|
path | True |
string |
接受匯入時回傳的伺服器產生識別碼。 |
|
source
|
path | True |
string |
知識來源的名稱。 |
|
api-version
|
query | True |
string minLength: 1 |
用於此作業的 API 版本。 |
要求標頭
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| x-ms-client-request-id |
string (uuid) |
要求不透明、全域唯一、用戶端產生的字串標識碼。 |
|
| Accept |
Accept 標頭。 |
回覆
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
要求已成功。 標題 Retry-After: integer |
|
| 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 |
範例
SearchServiceGetKnowledgeSourceFileIngestionOperation
範例要求
GET https://typespecpreviewexampleservice.search.windows.net/knowledgesources('hr-files')/files/operations/00000000-0000-0000-0000-000000000001?api-version=2026-11-01-preview
範例回覆
{
"id": "00000000-0000-0000-0000-000000000001",
"kind": "knowledgeSourceFileIngestion",
"status": "Succeeded",
"result": {
"fileId": "file-00000000000000000000000000000001",
"fileName": "handbook.txt",
"fileSizeBytes": 18,
"createdAt": "2026-01-01T00:00:00Z",
"lastUpdatedAt": "2026-01-02T00:00:00Z"
}
}
定義
| 名稱 | Description |
|---|---|
| Accept |
Accept 標頭。 |
|
Blob |
代表從 Azure Blob 資料來源編製索引的剖析模式。 |
|
Error |
資源管理錯誤其他資訊。 |
|
Error |
錯誤詳細資料。 |
|
Error |
所有 Azure Resource Manager API 的常見錯誤回應,用於回傳失敗操作的錯誤細節。 (這也遵循 OData 錯誤回應格式。)。 |
|
File |
擷取作業是針對單一檔案進行的。 「最小」(預設)使用內建擷取功能;「標準」則使用內容理解(Content Understanding)。 |
|
Knowledge |
上傳到檔案知識來源的檔案元資料。 |
|
Knowledge |
檔案擷取失敗所傳回的錯誤。 |
|
Knowledge |
追蹤知識來源中檔案的非同步上傳或替換。 |
|
Operation |
目前的狀態。 輪詢直到操作成功或失敗為止。 |
Accept
Accept 標頭。
| 值 | Description |
|---|---|
| application/json;odata.metadata=minimal |
BlobIndexerParsingMode
代表從 Azure Blob 資料來源編製索引的剖析模式。
| 值 | Description |
|---|---|
| default |
針對一般檔案處理,設定為預設值。 |
| text |
設定為文字,以改善 Blob 記憶體中純文字檔案的索引編製效能。 |
| delimitedText |
當 Blob 是純 CSV 檔案時,設定為 delimitedText。 |
| json |
設定為 json,以從 JSON 檔案擷取結構化內容。 |
| jsonArray |
設定為 jsonArray 以將 JSON 陣列的個別專案擷取為個別檔。 |
| jsonLines |
設定為 jsonLines 以擷取個別 JSON 實體,並以新行分隔為個別檔。 |
| markdown |
設定為 markdown 以從 markdown 檔案擷取內容。 |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| info |
其他資訊。 |
|
| type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細資料。
| 名稱 | 類型 | Description |
|---|---|---|
| additionalInfo |
錯誤的其他資訊。 |
|
| code |
string |
錯誤碼。 |
| details |
錯誤詳情 |
|
| message |
string |
錯誤訊息。 |
| target |
string |
錯誤目標。 |
ErrorResponse
所有 Azure Resource Manager API 的常見錯誤回應,用於回傳失敗操作的錯誤細節。 (這也遵循 OData 錯誤回應格式。)。
| 名稱 | 類型 | Description |
|---|---|---|
| error |
error 物件。 |
FileKnowledgeSourceExtractionMode
擷取作業是針對單一檔案進行的。 「最小」(預設)使用內建擷取功能;「標準」則使用內容理解(Content Understanding)。
| 值 | Description |
|---|---|
| minimal |
內建擷取功能。 |
| standard |
進行了內容理解擷取。 |
KnowledgeSourceFile
上傳到檔案知識來源的檔案元資料。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
檔案建立的時間戳。 |
| errorMessage |
string |
如果檔案處理失敗,則顯示錯誤訊息,否則為 null。 |
| extractionMode |
解壓模式套用到檔案上。 |
|
| fileId |
string |
檔案的唯一識別碼。 |
| fileName |
string |
原始檔案名稱。 |
| fileSizeBytes |
integer (int64) |
以位元組為單位的檔案大小。 |
| lastUpdatedAt |
string (date-time) |
檔案最後更新的時間戳。 |
| metadata |
object |
隨檔案儲存的自訂鍵值元資料。 已退回,但無法搜尋或篩選。 |
| parsingMode |
解析模式套用在檔案上(自動從檔案偵測)。 |
|
| prefix |
string |
前綴(類目錄路徑)源自完整檔案名稱。 |
KnowledgeSourceFileIngestionError
檔案擷取失敗所傳回的錯誤。
| 名稱 | 類型 | Description |
|---|---|---|
| code |
string |
計算機可讀取的錯誤碼。 |
| message |
string |
失敗的描述。 |
KnowledgeSourceFileIngestionOperation
追蹤知識來源中檔案的非同步上傳或替換。
| 名稱 | 類型 | Description |
|---|---|---|
| error |
失敗細節,僅在導入失敗時顯示。 |
|
| id |
string |
伺服器產生的操作識別碼。 |
| kind |
enum:
knowledge |
那種手術。 |
| result |
檔案元資料,僅在擷取成功時顯示。 |
|
| status |
目前的狀態。 輪詢直到操作成功或失敗為止。 |
OperationState
目前的狀態。 輪詢直到操作成功或失敗為止。
| 值 | Description |
|---|---|
| NotStarted |
作業尚未開始。 |
| Running |
作業正在進行中。 |
| Succeeded |
作業已順利完成。 |
| Failed |
作業失敗。 |
| Canceled |
使用者已取消作業。 |