Skip to main content
POST
/
api
/
custom-rules
Create Custom Rule
curl --request POST \
  --url https://api.example.com/api/custom-rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "pattern": "<string>",
  "description": "<string>",
  "enabled": true,
  "flags": [],
  "priority": 123,
  "score": 123,
  "scope_type": "global",
  "scope_id": "<string>"
}
'
{
  "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

Cookies

antidote_session
string | null

Body

application/json
name
string
required
pattern
string
required
description
string | null
enabled
boolean
default:true
flags
string[]
priority
integer | null
score
number | null
scope_type
enum<string>
default:global
Available options:
global,
project,
dataset
scope_id
string | 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