v1
latestOpenAPI 3.0.02026-07-141,4077,1665.2 MBAPM Retention Filters
Create a retention filter
Create a retention filter to index spans in your organization. Returns the retention filter definition when the request is successful.
Default filters with types spans-errors-sampling-processor and spans-appsec-sampling-processor cannot be created.
post/api/v2/apm/config/retention-filters
Request body
Example request
{
"data": {
"attributes": {
"enabled": true,
"filter": {
"query": "@http.status_code:200 service:my-service"
},
"filter_type": "spans-sampling-processor",
"name": "my retention filter",
"rate": 1,
"trace_rate": 1
},
"type": "apm_retention_filter"
}
}Response
OK
Example response
{
"data": {
"attributes": {
"editable": true,
"enabled": true,
"filter": {
"query": "@http.status_code:200 service:my-service"
},
"filter_type": "spans-sampling-processor",
"name": "my retention filter",
"rate": 1,
"trace_rate": 1
},
"id": "7RBOb7dLSYWI01yc3pIH8w",
"type": "apm_retention_filter"
}
}