Method: projects.locations.files.asyncBatchAnnotate

針對一般檔案清單 (例如 PDF 檔案) 執行非同步圖片偵測和註解,這些檔案可能包含多個頁面,且每個頁面可能包含多個圖片。您可以透過 google.longrunning.Operations 介面擷取進度和結果。Operation.metadata 包含 OperationMetadata (中繼資料)。Operation.response 包含 AsyncBatchAnnotateFilesResponse (結果)。

HTTP 要求

POST https://vision.googleapis.com/v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
parent

string

(非必要) 要呼叫的目標專案和位置。

格式:projects/{project-id}/locations/{location-id}

如果未指定父項,系統會自動選擇區域。

支援的位置 ID:us:僅限美國,asia:日本、臺灣等東亞地區,eu:歐盟。

範例:projects/project-A/locations/eu

要求主體

要求主體包含下列結構的資料:

JSON 表示法
{
  "requests": [
    {
      object (AsyncAnnotateFileRequest)
    }
  ]
}
欄位
requests[]

object (AsyncAnnotateFileRequest)

這是必要旗標,此批次的個別非同步檔案註解要求。

回應主體

如果成功,回應主體會包含 Operation 的執行個體。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-vision

詳情請參閱驗證總覽一文。