Skip to content

Modify the Data Retention Duration of a Workspace



POST /api/v1/workspace/modify_rp_duration

Overview

Body Request Parameters

Parameter Type Required Description
rp string The duration of the time series RP
Example: 30d
Allow empty: False
logging string The duration of the logging RP
Example: 14d
Allow empty: False
dialtest string The duration of synthetic test data
Example: 90d
Allow empty: False
backup_log string The duration of backup logs
Example: 180d
Allow empty: False
security string The duration of security check data
Example: 90d
Allow empty: False
keyevent string The duration of the event RP
Example: 14d
Allow empty: False
tracing string The duration of tracing data
Example: 7d
Allow empty: False
profiling string The duration of profiling data
Example: 7d
Allow empty: False
rum string The duration of RUM data
Example: 7d
Allow empty: False
apm string The duration of APM data (valid when indexes are merged)
Example: 7d
Allow empty: False
storagePolicy json Long-term storage policy. For logs, this can only be enabled in workspaces where logs are stored in scopedb; pay, enterprise, and unlimited support long-term log storage. For enterprise/unlimited, the maximum logging duration is 1800d; for enterprise/unlimited, rp supports custom long-term storage durations (up to 3600d). For unlimited, when BossAccountSet is enabled, only the metric_point_total billing type is supported; when disabled, it is handled as metric_point_total. The key is a data type such as rp/logging, and the value contains longStorageEnabled and longStorageDuration
Example: {'rp': {'longStorageEnabled': True, 'longStorageDuration': '180d'}, 'logging': {'longStorageEnabled': True, 'longStorageDuration': '180d'}}
Allow empty: False

Additional Parameter Notes

Additional Parameter Notes

Available Durations for SaaS Versions

Workspace Version rp logging dialtest backup_log keyevent security tracing profiling rum apm network
Free Plan / Free Edition (free, freeEdition) 7d 7d 7d 7d 7d 7d 7d 7d 7d 7d 1d
Commercial Plan (pay) 3d / 7d / 14d / 30d / 60d / 90d / 180d / 360d 3d / 7d / 14d / 30d / 60d / 90d 3d / 7d / 14d / 30d / 60d / 90d 180d / 360d / 720d 14d / 30d / 60d 90d / 180d / 360d 3d / 7d / 14d / 30d / 60d / 90d 3d / 7d / 14d / 30d / 60d / 90d 3d / 7d / 14d / 30d / 60d / 90d 3d / 7d / 14d / 30d / 60d / 90d 2d
Enterprise Plan (enterprise) 3d / 7d / 14d / 30d / 60d / 90d / 180d / 360d 3d / 7d / 14d / 30d / 60d / 90d 3d / 7d / 14d / 30d / 60d / 90d 180d / 360d / 720d 14d / 30d / 60d 90d / 180d / 360d 3d / 7d / 14d / 30d / 60d / 90d 3d / 7d / 14d / 30d / 60d / 90d 3d / 7d / 14d / 30d / 60d / 90d 3d / 7d / 14d / 30d / 60d / 90d 2d

Deployment Plan / Unlimited Plan Notes

The available durations for the Deployment Plan (unlimited) are determined by the configuration file. The range supported by this API is subject to workspaceAllowRpSet["unlimited"] and workspaceAllowCustomRpSet["unlimited"].

Configurable Items with Split Indexes

Category Description
rp Metrics
network Network
keyevent Events
backup_log Backup Logs
dialtest Synthetic Monitoring
tracing Tracing-APM
profiling Tracing-Profiling
rum RUM
logging Logs
security Security Check

Configurable Items with Merged Indexes

Category Description
rp Metrics
network Network
keyevent Events
backup_log Backup Logs
logging Logs / CI Monitoring / Synthetic Monitoring / Security Check
apm RUM / APM (trace, profiling)

How to Distinguish Whether a Workspace Has Merged Indexes

You can distinguish this using the esIndexMerged parameter in the response of the Get Current Workspace Information API. If esIndexMerged=1, the indexes have been merged; otherwise, the indexes have not been merged.

Request Example

curl 'https://openapi.guance.com/api/v1/workspace/modify_rp_duration' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-raw '{"rp":"3d"}' \
--compressed 

Response

{
    "code": 200,
    "content": {
        "rp": {
            "new": "3d",
            "old": "7d"
        }
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "1f7911xxxxx"
} 

Feedback

Is this page helpful?