Method: projects.locations.dataStores.userEvents.import

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


The URL uses gRPC Transcoding syntax.

Path parameters



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.

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:

object (InlineSource)

The Inline source for the input content for UserEvents.


object (GcsSource)

Cloud Storage location for the input content.


object (BigQuerySource)

BigQuery input source.

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires the following OAuth scope:


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.