REST API
Redaction
On this page
Workspace-scoped regex rules applied to captured text at ingestion, before
storage. Redaction is the companion control to
capture-text: capture the text you need, then strip the parts
you must not store.
List redaction rules
HTTP
GET /v1/observ/orgs/{org}/workspaces/{ws}/redaction-rules
Auth: API key or JWT · Role: viewer
Examples
rules = evigauge.get("/v1/observ/orgs/{org}/workspaces/{ws}/redaction-rules")
print(rules)
const rules = await evigauge.get("/v1/observ/orgs/{org}/workspaces/{ws}/redaction-rules");
console.log(rules);
Create a redaction rule
HTTP
POST /v1/observ/orgs/{org}/workspaces/{ws}/redaction-rules
Auth: API key or JWT · Role: admin
Request body — RedactionRuleCreate
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | ✅ | — | Human-readable rule name |
pattern | string | ✅ | — | Regular expression to match |
replacement | string | ➖ | [REDACTED:CUSTOM] | Text substituted for each match |
Examples
evigauge.post("/v1/observ/orgs/{org}/workspaces/{ws}/redaction-rules", json={
"name": "customer-email",
"pattern": r"[\w.+-]+@[\w-]+\.[\w.]+",
"replacement": "[REDACTED:EMAIL]",
})
await evigauge.post("/v1/observ/orgs/{org}/workspaces/{ws}/redaction-rules", {
name: "customer-email",
pattern: "[\\w.+-]+@[\\w-]+\\.[\\w.]+",
replacement: "[REDACTED:EMAIL]",
});
Rules apply to newly ingested spans only — they are not retroactive. Test the pattern before creating it: an over-broad regex silently destroys content you may need, and the original is never stored.