Update sync history settings
PATCH
/sync-history/settings
const url = 'https://example.com/api/v1/sync-history/settings';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"enabled":true,"retentionDays":1,"retentionMaxEntries":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/v1/sync-history/settings \ --header 'Content-Type: application/json' \ --data '{ "enabled": true, "retentionDays": 1, "retentionMaxEntries": 1 }'Updates retention (days + max entries) and the enable flag, then reschedules or cancels the recurring cleanup job accordingly.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
enabled
boolean
retentionDays
integer
retentionMaxEntries
integer
Examplegenerated
{ "enabled": true, "retentionDays": 1, "retentionMaxEntries": 1}Responses
Section titled “Responses”Updated sync history settings
Media typeapplication/json
object
enabled
required
boolean
retentionDays
required
integer
retentionMaxEntries
required
Keep at most this many rows; 0 disables the entry cap (age-only retention).
integer
Examplegenerated
{ "enabled": true, "retentionDays": 1, "retentionMaxEntries": 1}Invalid settings payload
Media typeapplication/json
object
error
required
Error message
string
Examplegenerated
{ "error": "example"}Failed to update sync history settings
Media typeapplication/json
object
error
required
Error message
string
Examplegenerated
{ "error": "example"}