Skip to content

Modify Data Retention Duration for Workspace



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
backup_log string Duration for Backup Log
Example: 180d
Allow Empty: False
security string Duration for Inspection 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 in case of merged index)
Example: 7d
Allow Empty: False

Additional Parameter Notes

Additional Parameter Notes

Standard Optional RP Value Range:

Optional Value Description
1d 1 day
3d 3 days
7d 7 days
14d 14 days
30d 1 month
60d 2 months
90d 3 months
180d 6 months
360d 1 year
720d 2 years
1095d 3 years

Optional Configuration Items in Case of Split Index

Category Description
rp Metrics
network Network
keyevent Event
backup_log Backup Log
tracing APM
profiling Profiling
rum RUM
logging Log
security Security Check

Optional Configuration Items in Case of Merged Index

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

How to Determine if Workspace is Merged

You can determine if the index is merged by checking the esIndexMerged parameter in the response of the "Get Current Workspace Information" interface. If esIndexMerged=1, it indicates that the index is merged; otherwise, it is 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? ×