Skip to main content

Create New Exception for Enforcement Rule

POST 

/code/api/v1/enforcement-rules

This API is used in order to add exception rule for a specific set of repositories

Request

Body

required
    codeCategories objectrequired
    IAC objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    IMAGES objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    OPEN_SOURCE objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    SECRETS objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    SUPPLY_CHAIN objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    name stringrequired
    repositories object[]required
  • Array [
  • accountId stringrequired
    accountName stringrequired
  • ]

Responses

Add rule

Schema

    string

Loading...