Method: projects.locations.userEvents.import

大量匯入使用者事件。要求處理作業可能是同步的。系統會略過已存在的活動。使用這個方法回填歷來的使用者事件。

Operation.response 的類型為 ImportResponse。請注意,部分項目可能已成功插入。Operation.metadata 的類型為 ImportMetadata。

HTTP 要求

POST https://discoveryengine.googleapis.com/v1/{parent=projects/*/locations/*}/userEvents:import

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

路徑參數

參數
parent

string

這是必要旗標,父項資料儲存庫資源名稱,格式為 projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}

要求主體

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

JSON 表示法
{
  "errorConfig": {
    object (ImportErrorConfig)
  },

  // Union field source can be only one of the following:
  "inlineSource": {
    object (InlineSource)
  },
  "gcsSource": {
    object (GcsSource)
  },
  "bigquerySource": {
    object (BigQuerySource)
  }
  // End of list of possible types for union field source.
}
欄位
errorConfig

object (ImportErrorConfig)

匯入期間發生錯誤的所需位置。無法為內嵌使用者事件匯入作業設定。

聯集欄位 source。必要 - 使用者事件資料的所需輸入來源。source 只能是下列其中一項:
inlineSource

object (InlineSource)

UserEvents 輸入內容的內嵌來源。

gcsSource

object (GcsSource)

輸入內容的 Cloud Storage 位置。

bigquerySource

object (BigQuerySource)

BigQuery 輸入來源。

回應主體

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

授權範圍

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

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite

詳情請參閱Authentication Overview

IAM 權限

需要 parent 資源的下列 IAM 權限:

  • discoveryengine.userEvents.import

詳情請參閱 IAM 說明文件