Get started with LangWatch Skills in seconds: Set up evals, scenario tests, and tracing just by asking your AI coding assistant.
import requests
url = "https://app.langwatch.ai/api/gateway/v1/cache-rules"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"cache_rule": {
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"priority": 123,
"enabled": true,
"matchers": {},
"action": {
"ttl": 123,
"salt": "<string>"
},
"archived_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
}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.
import requests
url = "https://app.langwatch.ai/api/gateway/v1/cache-rules"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"cache_rule": {
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"priority": 123,
"enabled": true,
"matchers": {},
"action": {
"ttl": 123,
"salt": "<string>"
},
"archived_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
}Documentation Index
Fetch the complete documentation index at: https://langwatch.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Was this page helpful?