{ "opencollection": "1.0.0", "info": { "name": "LangWatch Agents Cache Rules API", "version": "1.0.0" }, "request": { "auth": { "type": "apikey", "key": "X-Auth-Token", "value": "{{X-Auth-Token}}", "placement": "header" } }, "items": [ { "info": { "name": "Cache Rules", "type": "folder" }, "items": [ { "info": { "name": "List cache-control rules", "type": "http" }, "http": { "method": "GET", "url": "https://app.langwatch.ai/api/gateway/v1/cache-rules" }, "docs": "Organization-scoped operator-authored rules. Returned sorted priority DESC; archived rules excluded. Matchers and action are returned verbatim as JSON." }, { "info": { "name": "Create a cache rule", "type": "http" }, "http": { "method": "POST", "url": "https://app.langwatch.ai/api/gateway/v1/cache-rules" }, "docs": "Matchers are ANDed across non-null fields; at least one matcher is required. Mode is one of respect/force/disable. TTL is clamped to [0, 86400]. Salt is an optional cache-bust tag (max 64 chars). All writes emit a ChangeEvent so the gateway picks up the new rule within 30 s via its /changes long-poll." }, { "info": { "name": "Get a cache rule", "type": "http" }, "http": { "method": "GET", "url": "https://app.langwatch.ai/api/gateway/v1/cache-rules/:id", "params": [ { "name": "id", "value": "", "type": "path" } ] }, "docs": "Returns the rule if it belongs to the caller's organisation; 404 otherwise. Archived rules are NOT returned (use the audit log to inspect removed rules)." }, { "info": { "name": "Update a cache rule", "type": "http" }, "http": { "method": "PATCH", "url": "https://app.langwatch.ai/api/gateway/v1/cache-rules/:id", "params": [ { "name": "id", "value": "", "type": "path" } ] }, "docs": "Partial update. `matchers` and `action` REPLACE the stored value when provided (not merged field-by-field). Omitting them leaves the stored value untouched. The rule id + organisation are immutable." }, { "info": { "name": "Archive a cache rule", "type": "http" }, "http": { "method": "DELETE", "url": "https://app.langwatch.ai/api/gateway/v1/cache-rules/:id", "params": [ { "name": "id", "value": "", "type": "path" } ] }, "docs": "Soft-delete — sets archivedAt. The rule stops matching new requests. Audit log retains before/after snapshots. Returns the archived row." } ] } ], "bundled": true }