Skip to main content

Update Logs Time-to-Live (TTL) Settings

UPDATE Update Logs Time-to-Live (TTL) Settings

https://useast.api.elasticpath.com/v2/settings/logs-ttl

Parameters

Headers

NameRequiredTypeDescription
AuthorizationRequiredstringThe Bearer token required to get access to the API.

Body

NameRequiredTypeDescription
daysRequiredintegerThe number of days to retain the logs. Allowed values are between 1 and 365.
typeRequiredstringThe type of resource. You must use time_to_live.

Request Example

curl -X PUT https://useast.api.elasticpath.com/v2/settings/logs-ttl \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $ {
"data": {
"days": 10,
"type": "time_to_live"
}
}

Javascript SDK

const MoltinGateway = require('@moltin/sdk').gateway
const newTtlDays = 45
const client = MoltinGateway({
client_id: 'X'
})
client.Settings.UpdateLogsTtl(newTtlDays).then(ttlSettings => {
// Do something
})

Response Example

200 OK

{
"data": {
"days": 10,
"type": "time_to_live"
}
}