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 for Time Series RP
Example: 30d
Allow empty: False
logging string Duration for Log RP
Example: 14d
Allow empty: False
dialtest string Duration for Synthetic Tests data
Example: 90d
Allow empty: False
backup_log string Duration for backup logs
Example: 180d
Allow empty: False
security string Duration for Security Check data
Example: 90d
Allow empty: False
keyevent string Duration for Event RP
Example: 14d
Allow empty: False
tracing string Duration for tracing
Example: 7d
Allow empty: False
profiling string Duration for profiling
Example: 7d
Allow empty: False
rum string Duration for rum
Example: 7d
Allow empty: False
apm string Duration for apm (valid when indexes are merged)
Example: 7d
Allow empty: False
storagePolicy json Long-term storage policy, only available for workspaces with scopedb storage for logs; not supported in unlimited version; enterprise version supports custom long-term storage duration, logging max 1800d, rp max 3600d; key is data type like rp/logging, value includes longStorageEnabled and longStorageDuration
Example: {'rp': {'longStorageEnabled': True, 'longStorageDuration': '180d'}, 'logging': {'longStorageEnabled': True, 'longStorageDuration': '180d'}}
Allow empty: False

Parameter Supplementary Explanation

Parameter Supplementary Explanation

SaaS Version Optional Days Explanation

Workspace Version rp logging dialtest backup_log keyevent security tracing profiling rum apm network
Free Plan (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 Explanation

The optional days for the Deployment Plan (unlimited) are determined by the configuration file. The range currently supported by this interface is based on workspaceAllowRpSet["unlimited"] and workspaceAllowCustomRpSet["unlimited"].

Optional Configuration Items Under Split Index Scenario

Category Description
rp Metrics
network NETWORK
keyevent Incident
backup_log Backup logs
dialtest Synthetic Tests
tracing APM
profiling APM-profiling
rum RUM
logging LOG
security Security Check

Optional Configuration Items Under Merged Index Scenario

Category Description
rp Metrics
network NETWORK
keyevent Incident
backup_log Backup logs
logging LOG / CI Monitoring / Synthetic Tests / Security Check
apm RUM / APM (trace, profiling)

How to Determine if Workspace Indexes are Merged

It can be distinguished by the esIndexMerged parameter in the response of the "Get Current Workspace Information" interface. If esIndexMerged=1, it indicates 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? ×