# Rules ## Get Rules - [GET /rules](https://codeinsightapi.redocly.app/swagger/rules/getrules.md): Get existing custom rules ## Update Rule - [PUT /rules](https://codeinsightapi.redocly.app/swagger/rules/updaterule.md): Update existing rule. Note: Value for detectionCriteria is an array of string Eg. detectionCriteria: ["filepath1 or folderpath1","filepath2 or folderpath2"]. Parameters fileInfo and ruleInfo are mutually exclusive. Only users with Library Manager role can update rules. ## Create Rule - [POST /rules](https://codeinsightapi.redocly.app/swagger/rules/createrule.md): Add new rule with either file info or rule info. Note: Value for detectionCriteria is an array of string Eg. detectionCriteria: ["filepath1 or folderpath1","filepath2 or folderpath2"]. Parameters fileInfo and ruleInfo are mutually exclusive. Only users with Library Manager role can create rules. ## Get Rule By Id - [GET /rules/{ruleId}](https://codeinsightapi.redocly.app/swagger/rules/getrule.md): Get existing rule by ruleId ## Delete Rule - [DELETE /rules/{ruleId}](https://codeinsightapi.redocly.app/swagger/rules/deleterule.md): Delete existing rule. Only users with Library Manager role can delete rules. ## Disable Rules - [PUT /rules/disable](https://codeinsightapi.redocly.app/swagger/rules/disablerules.md): Disable multiple rules by their IDs. Disabled rules will not be applied during project scanning. Only users with Library Manager role can disable rules. ## Enable Rules - [PUT /rules/enable](https://codeinsightapi.redocly.app/swagger/rules/enablerules.md): Enable multiple rules. Enabled rules will be applied during project scanning. Only users with Library Manager role can enable rules.