Skip to main content
PATCH
/
v1
/
failure-rules
/
{id}
Update a failure detection rule (partial update)
curl --request PATCH \
  --url https://api.trulayer.ai/v1/failure-rules/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "metric": "error_rate",
  "operator": "gt",
  "threshold": 123,
  "window_secs": 123,
  "severity": "low",
  "enabled": true
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "metric": "error_rate",
  "operator": "gt",
  "threshold": 123,
  "window_secs": 300,
  "severity": "medium",
  "enabled": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.trulayer.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

SDK API key (tl_...) or Clerk session JWT

Path Parameters

id
string<uuid>
required

Body

application/json
name
string | null
metric
enum<string> | null
Available options:
error_rate,
latency_p99,
latency_p95,
score
operator
enum<string> | null
Available options:
gt,
gte,
lt,
lte
threshold
number | null
window_secs
integer | null
severity
enum<string> | null
Available options:
low,
medium,
high,
critical
enabled
boolean | null

Response

Failure rule updated

id
string<uuid>
required
tenant_id
string<uuid>
required
name
string
required
metric
enum<string>
required
Available options:
error_rate,
latency_p99,
latency_p95,
score
operator
enum<string>
required
Available options:
gt,
gte,
lt,
lte
threshold
number
required
window_secs
integer
default:300
required
severity
enum<string>
default:medium
required
Available options:
low,
medium,
high,
critical
enabled
boolean
default:true
required
created_at
string<date-time>
required
updated_at
string<date-time>
required