I've imported user events for testing but I want to clear all user events and re-import new user events for another testing. I've followed the instruction to remove user events (Link). After waiting for 24hrs, operation status is completed.
This is a POST request to delete user events between 2023-03-01 to 2023-03-07
RESPONSE=$(curl -X POST \
-H "Authorization: Bearer "${ACCESS_TOKEN}"" \
-H "Content-Type: application/json; charset=utf-8" \
--data '{
"filter":"eventTime > \"2023-03-01T00:00:01.511Z\" eventTime < \"2023-03-07T00:00:01.511Z\"",
}' \
"https://retail.googleapis.com/v2/projects/${PROJECT_ID}/locations/global/catalogs/default_catalog/userEvents:purge"
)
echo $RESPONSE
This is a response of operation status
{
"name": "projects/{PROJECT_ID}/locations/global/catalogs/default_catalog/operations/purge-user-events-XXXXXXXXXX",
"done": true,
"response": {
"@type": "type.googleapis.com/google.cloud.retail.v2.PurgeUserEventsResponse",
"purgedEventsCount": "6"
}
}
I expect to see 0 events from Retail console in GCP but the number of events ingested still existed (nothing changed)
How can I remove user events under same project without deleting the entire project?
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |