Update warm tier retention
PUT/v1/account-management/time-based-accounts/:accountId/retention-details
Sets the warm tier retention, in days, of one account: the main account of the API token, or one of its sub accounts. Only the warm tier retention changes; all other account settings stay as they are.
- The API token must be an admin API token of the main account. A sub account's token returns
403. - The main account must already have the warm tier enabled, and keeps at least
1day. Turning the warm tier of the main account on or off is done by Logz.io support. - A sub account can be set from
0(no warm tier) up to the main account's warm tier retention. - Lowering the warm tier retention deletes the warm tier data older than the new retention.
- To lower the main account below a sub account's warm tier retention, lower the sub account first.
Returns the hot and warm tier retention of the main account and all its sub accounts after the update.
Please ensure to change the region in the URL to match your account's region.
Request
Path Parameters
ID of the main account of the API token, or of one of its sub accounts.
- application/json
Body
required
Number of days to retain data in the warm tier. For the main account, at least 1. For a sub account, from 0 (no warm tier) up to the main account's warm tier retention.
Responses
- 200
- 400
- 403
- 404
successful operation
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
ID of the account.
Number of days that data is retained in the hot tier.
Number of days that data is retained in the warm tier. 0 or null means the account has no warm tier.
[
{
"accountId": 99999,
"retentionDays": 7,
"snapSearchRetentionDays": 14
}
]
The update was rejected. The errorCode is one of:
TimeBasedAccount/INVALID_WARM_RETENTION-snapSearchRetentionDaysis missing, below1for the main account, or not between0and the main account's warm tier retention for a sub account.TimeBasedAccount/ACCOUNT_HAS_WARM_TIER_DISABLED- the main account doesn't have the warm tier enabled.TimeBasedAccount/INVALID_PLAN- the account's plan doesn't allow the value, for example lowering the main account below a sub account's warm tier retention.TimeBasedAccount/ACCOUNT_HAS_NO_PLAN- the account has no plan.
The API token doesn't belong to a main account (TimeBasedAccount/NOT_OWNER_ACCOUNT), or isn't an admin API token.
The account isn't the main account of the API token or one of its sub accounts (TimeBasedAccount/ACCOUNT_NOT_FOUND).