Rules

Update custom rule

Update an existing natural language security rule. Only ruleId is required — all other fields are optional and only provided fields are changed. Pass allRepositories: true to make the rule apply to all repos, or repositoryIds to scope it to specific repos. Omit both to leave scope unchanged.

post/api/v2/rules/update

Request

  • Base URL
    https://zeropath.com
  • Auth
    API key in header X-ZeroPath-API-Token-Id and API key in header X-ZeroPath-API-Token-Secret

Request body

organizationIdstring
ruleIdstring required
namestring
rulestring

Natural language description of the security rule

globPatternstring

Glob pattern for files this rule applies to

sourceTypesstring[]
repositoryIdsstring[]

Scope the rule to specific repositories. Cannot be combined with allRepositories.

allRepositoriestrue

Set to true to make the rule apply to all repositories in the organization. Cannot be combined with repositoryIds.

scope'allRepositories' | 'repositories' | 'tags'

Optional explicit scope. Use tags with tagIds to switch the rule to tag-only scope.

tagIdsstring[]

Tag IDs to associate with this rule

Response

Rule updated successfully

idstring required
namestring required
rulestring required

Natural language description of the security rule

globPatternstring required
sourceTypesstring[] required
source'USER' | 'SECURITY_COMPASS'
repositoryIdsstring[] required
scope'allRepositories' | 'repositories' | 'tags' required
createdAtstring date-time required
updatedAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.