Skip to content

Modify Workspace Data Retention Duration



POST /api/v1/workspace/modify_rp_duration

Overview


Body Request Parameters

Parameter Name Type Required Description
rp string Duration of the time series RP
Example: 30d
Allow empty: False
logging string Duration of the log RP
Example: 14d
Allow empty: False
dialtest string Duration of synthetic test data
Example: 90d
Allow empty: False
backup_log string Duration of backup logs
Example: 180d
Allow empty: False
security string Duration of security check data
Example: 90d
Allow empty: False
keyevent string Duration of the event RP
Example: 14d
Allow empty: False
tracing string Duration of tracing
Example: 7d
Allow empty: False
profiling string Duration of profiling
Example: 7d
Allow empty: False
rum string Duration of RUM
Example: 7d
Allow empty: False
apm string Duration of APM (valid when merged index)
Example: 7d
Allow empty: False
storagePolicy json Long-term storage policy. Only workspaces with scopedb storage for logs can enable it; pay, enterprise, unlimited support long-term log storage, enterprise/unlimited logging max 1800d; enterprise/unlimited rp supports custom long-term storage duration (max 3600d), unlimited supports only when BossAccountSet is enabled for metric_point_total billing type, otherwise processed as metric_point_total; key is data type like rp/logging, value contains longStorageEnabled and longStorageDuration
Example: {'rp': {'longStorageEnabled': True, 'longStorageDuration': '180d'}, 'logging': {'longStorageEnabled': True, 'longStorageDuration': '180d'}}
Allow empty: False

Parameter Supplementary Notes

Parameter Supplementary Notes

Optional Days 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 Edition (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 Edition Notes

For the Deployment Plan (unlimited), the optional days are determined by the configuration file. The current interface supports a range based on workspaceAllowRpSet["unlimited"] and workspaceAllowCustomRpSet["unlimited"].

Optional Configuration Items When Indexes Are Split

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

Optional Configuration Items When Indexes Are Merged

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

How to Determine if the Workspace Has Merged Indexes

You can distinguish by the esIndexMerged parameter in the response of the "Get Current Workspace Information" API. If esIndexMerged=1, it indicates that the indexes are merged; otherwise, they are not 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?