Method: projects.locations.userEvents.import
Stay organized with collections
Save and categorize content based on your preferences.
Bulk import of user events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events.
Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.
HTTP request
POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*}/userEvents:import
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
parent |
string
Required. Parent DataStore resource name, of the form projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
|
Request body
The request body contains data with the following structure:
JSON representation |
{
"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 .
} |
Fields |
errorConfig |
object (ImportErrorConfig )
The desired location of errors incurred during the Import. Cannot be set for inline user event imports.
|
Union field source . Required - The desired input source of the user event data. source can be only one of the following: |
inlineSource |
object (InlineSource )
The Inline source for the input content for UserEvents.
|
gcsSource |
object (GcsSource )
Cloud Storage location for the input content.
|
bigquerySource |
object (BigQuerySource )
BigQuery input source.
|
Response body
If successful, the response body contains an instance of Operation
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the parent
resource:
discoveryengine.userEvents.import
For more information, see the IAM documentation.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-03 UTC."],[[["This endpoint supports the bulk import of user events, which may be processed synchronously, skipping events that already exist, and is recommended for backfilling historical data."],["The HTTP request for importing user events is a POST request to a specific URL, using gRPC Transcoding syntax, with a required `parent` path parameter specifying the DataStore resource."],["The request body allows specifying the input source for user event data, which can be inline, from Google Cloud Storage (GCS), or from BigQuery, and an optional error configuration."],["Successful import operations return a response body containing an `Operation` instance, with the potential for partial success in inserting items, and it provides metadata on the operation."],["Authorization to use this endpoint requires the `https://www.googleapis.com/auth/cloud-platform` OAuth scope and the `discoveryengine.userEvents.import` IAM permission on the `parent` resource."]]],[]]