Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: projects/{project}/locations/{location}.
Query parameters
Parameters
writeAsync
boolean
If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.
Request body
The request body contains an instance of UserEvent.
Response body
If successful, the response body contains an instance of UserEvent.
[[["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-06-27 UTC."],[[["\u003cp\u003eThis webpage details the process of writing a single user event using the Discovery Engine API via an HTTP POST request to a specific URL.\u003c/p\u003e\n"],["\u003cp\u003eThe request URL requires a \u003ccode\u003eparent\u003c/code\u003e path parameter, which specifies the location and DataStore or just the location where the user event is being written.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ewriteAsync\u003c/code\u003e query parameter allows for asynchronous writing of the user event, meaning the API responds without waiting for the write to complete.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain a \u003ccode\u003eUserEvent\u003c/code\u003e instance, and upon success, the response body will also include a \u003ccode\u003eUserEvent\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003eWriting a user event requires OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e and the IAM permission \u003ccode\u003ediscoveryengine.userEvents.create\u003c/code\u003e on the parent resource.\u003c/p\u003e\n"]]],[],null,[]]