How can I delete events under the Events tab in organize space

We recently completed a clean up project in our Tridion Docs 15.1 environment and now have more than 6 million items under the "View All Events". We would like to empty out the queue, we have tried API2.5, but it only allows me to delete one item at at time based on progress id. Is there an ISHRemote query to directly delete them from the database. Here is the query I am currently running to delete them.

eventClient.DeleteByProgressId(progressid, true, false);

TIA

emoji
  • Hello  ,
    There is an automatic cleanup process for Events that is done by a maintenance database job dbo.ISHCore_TrisoftInfoShareJob
    The default values are
    @RemoveEventsInDays int = 7, - default for successful events
    @RemoveBusyEventsInDays int = 28, - default for busy events
    @RemoveFailedEventsInDays int = 28, - default for failed events

    You can execute the job manually using SQL Management Studio and modify the parameters

    -- This step removes all successful events older than 1 day
    exec dbo.ISHCore_RemoveEvents 1,'N','Y','N'
    -- This step removes all busy events older than x days
    exec dbo.ISHCore_RemoveEvents @RemoveBusyEventsInDays,'Y','N','N'
    -- This step removes all failed events older than 14 days
    exec dbo.ISHCore_RemoveEvents 14,'N','Y','Y'


    Regarding API 2.5 you can use RetrieveEventOverview https://docs.rws.com/en-US/tridion-docs-main-documentation-1165616/eventmonitor-2.5-retrieveeventoverview-69241 
    and pass progressIDs to the DeleteByProgressId in the loop

    Or even better, to use OpenAPI methods for this

    POST /v3/Events/Overview/Get

    with request body

    {
      "eventTypes": [],
      "statusFilter": "all",
      "modifiedSince": "2025-08-20T00:00:00+03:00",
      "userFilter": "all"
    }

    to get the overview of Events
    And in the loop, delete them using DELETE /v3/Events/ByProgressId/{ProgressId}


    emoji
  • In case you are using an autogenerated client for Tridion Docs OpenAPI
    Then you can use a code snippet like this

    var filterToReturnEvents = new GetEventOverview
    {
        EventTypes = new List<string> { "SYNCHRONIZEMETRICS", "CLEANUPMETRICS" }, //remove this line in case you want all event types
        StatusFilter = ProgressStatusFilter.All
    };
    var eventProgressList = await tridionDocsClient.GetEventOverviewAsync(filterToReturnEvents);
    foreach (var eventProgress in eventProgressList)
    {
        var filterToDeleteEvents = new DeleteEvent
        {
            DeleteBusyEvents = false,
            DeleteFailedEvents = false
        };
        await tridionDocsClient.DeleteEventAsync(eventProgress.ProgressId, filterToDeleteEvents);
    }


    It will remove Events with type "SYNCHRONIZEMETRICS", "CLEANUPMETRICS" that have status success and warning.

    You can see instructions on how to generate the client in this blog Tridion Docs OpenAPI: How to make the first call  or use an example app from it. 
    Hope this helps 

    emoji