Method: projects.locations.dataStores.userEvents.import

ייבוא בכמות גדולה של אירועים שקשורים למשתמשים. יכול להיות שעיבוד הבקשה יהיה סינכרוני. המערכת מדלגת על אירועים שכבר קיימים. אפשר להשתמש בשיטה הזו כדי למלא נתונים חסרים של אירועים היסטוריים שקשורים למשתמשים.

התגובה של הפעולה היא מסוג ImportResponse. חשוב לזכור שיכול להיות שרק חלק מהפריטים יוכנסו בהצלחה. ‫Operation.metadata הוא מסוג ImportMetadata.

בקשת HTTP

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

כתובת ה-URL כתובה בתחביר של gRPC Transcoding.

פרמטרים של נתיב

פרמטרים
parent

string

חובה. שם משאב DataStore של ההורה, בפורמט projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}

גוף הבקשה

גוף הבקשה מכיל נתונים במבנה הבא:

ייצוג JSON
{
  "errorConfig": {
    object (ImportErrorConfig)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "inlineSource": {
    object (InlineSource)
  },
  "gcsSource": {
    object (GcsSource)
  },
  "bigquerySource": {
    object (BigQuerySource)
  }
  // End of mutually exclusive fields.
}
שדות
errorConfig

object (ImportErrorConfig)

המיקום הרצוי של השגיאות שמתרחשות במהלך הייבוא. אי אפשר להגדיר את האפשרות הזו לייבוא מוטבע של אירועים שקשורים למשתמשים.

חובה – מקור הקלט הרצוי של נתוני אירועי המשתמש. בהמשך מפורטת רשימה של שדות שאי אפשר להשתמש בהם בו-זמנית. רק אחד מהשדות הבאים יוגדר בתשובה:
inlineSource

object (InlineSource)

מקור מוטבע של תוכן הקלט לאירועי משתמש.

gcsSource

object (GcsSource)

מיקום ב-Cloud Storage של תוכן הקלט.

bigquerySource

object (BigQuerySource)

מקור קלט ב-BigQuery.

סוף השדות הבלעדיים.

גוף התשובה

אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל מופע של Operation.

היקפי הרשאות

נדרש אחד מהיקפי ההרשאות הבאים של OAuth:

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

ניתן למצוא מידע נוסף כאן: Authentication Overview.

הרשאות IAM

נדרשת הרשאת IAM הבאה במשאב parent:

  • discoveryengine.userEvents.import

מידע נוסף מופיע במאמרי העזרה בנושא IAM.