POST
/
api
/
v2
/
rules
/
update
Update custom rule
curl --request POST \
  --url https://zeropath.com/api/v2/rules/update \
  --header 'Content-Type: application/json' \
  --header 'X-ZeroPath-API-Token-Id: <api-key>' \
  --header 'X-ZeroPath-API-Token-Secret: <api-key>' \
  --data '{
  "organizationId": "<string>",
  "ruleId": "<string>",
  "name": "<string>",
  "rule": "<string>",
  "globPattern": "<string>",
  "sourceTypes": [
    "HTTP_HANDLER"
  ],
  "repositoryIds": [
    "<string>"
  ]
}'
{
  "id": "<string>",
  "name": "<string>",
  "rule": "<string>",
  "globPattern": "<string>",
  "sourceTypes": [
    "HTTP_HANDLER"
  ],
  "repositoryIds": [
    "<string>"
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

X-ZeroPath-API-Token-Id
string
header
required
X-ZeroPath-API-Token-Secret
string
header
required

Body

application/json
ruleId
string
required
organizationId
string
name
string
rule
string

Natural language description of the security rule

globPattern
string

Glob pattern for files this rule applies to

sourceTypes
enum<string>[]
repositoryIds
string[]

Response

Rule updated successfully

id
string
required
name
string
required
rule
string
required

Natural language description of the security rule

globPattern
string
required
sourceTypes
enum<string>[]
required
repositoryIds
string[]
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required