Set Logs Time-to-live (TTL)
In Commerce, logs are kept in the system for a limited time. You can configure the retention period using the respective API. The default retention period is 365 days for production store types and 7 days for other store types.
Before You Begin
Ensure that you are signed into the store with appropriate permissions. Only sellers with Seller Admins and IT roles have write access to the API. Support users have read access.
Procedure
- Call the
logs-ttl
PUT endpoint and specify thedays
andtype
in the filter. See Update Logs Time-to-Live (TTL) Settings for more information. - Call the
logs-ttl
GET endpoint and make sure that thedays
field in the response is the same as the one you specified in the previous step. See Get Logs Time-to-live (TTL) for more information.