Page 1 of 1
Logsapi storage on the server
Published: August 31, 2026 - 3:28 PM
by Esberard
Hello,
Is there a mechanism in place to clean up the server's API logs at a defined interval?
We currently have 1,904,880 logs since December 13, 2023 (which is starting to be a lot).
Thank you for your feedback,
Rémy
Re: Logsapi storage on the server
Published: September 2, 2026 - 9:53 AM
by htouvet
Hello Rémy,
No, indeed, there's no automatic purge other than deleting everything via the console interface, which is perhaps a bit too drastic
Until a better solution is found, the SQL query is the solution
Purge of everything older than one year:
Code: Select all
delete from logsapi l where l.created_on < current_date - 365;
(In WAPT 2.7, there is an index on this created_on field)
But in version 2.6, it can be added manually:
Code: Select all
CREATE INDEX IF NOT EXISTS logsapi_created_on ON LogsAPI USING btree(created_on, endpoint);
)
I'm going to add a daily automatic purge task to run 365 days by default in version 2.7
Re: Logsapi storage on the server
Published: September 2, 2026 - 9:58 AM
by Esberard
Hi Hubert,
Thanks a lot for your feedback, noted. Have
a good day,
Rémy