Skip to main content
PATCH
/
api
/
custom-rules
/
{rule_id}
Update Custom Rule
curl --request PATCH \
  --url https://api.example.com/api/custom-rules/{rule_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "pattern": "<string>",
  "description": "<string>",
  "enabled": true,
  "flags": [
    "<string>"
  ],
  "priority": 123,
  "score": 123
}
'
{
  "id": 123,
  "name": "<string>",
  "pattern": "<string>",
  "description": "<string>",
  "enabled": true,
  "flags": [],
  "priority": 0,
  "score": 123,
  "category": "secret",
  "scope_type": "global",
  "scope_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-API-Key
string | null

Path Parameters

rule_id
integer
required

Cookies

antidote_session
string | null

Body

application/json
name
string | null
pattern
string | null
description
string | null
enabled
boolean | null
flags
string[] | null
priority
integer | null
score
number | null

Response

Successful Response

id
integer
required
name
string
required
pattern
string
required
description
string | null
enabled
boolean
default:true
flags
string[]
priority
integer
default:0
score
number | null
category
string
default:secret
scope_type
string
default:global
scope_id
string | null
created_at
string<date-time> | null
updated_at
string<date-time> | null