# Create Rule 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. Endpoint: POST /rules Version: v1 Security: bearerAuth ## Request fields (application/json): - `inventoryName` (string) inventoryName Example: "Custom Inventory Name" - `componentId` (integer, required) componentId Example: 1 - `versionId` (integer, required) versionId Example: 1 - `licenseId` (integer, required) licenseId Example: 1 - `description` (string) description Example: "description" - `url` (string) url Example: "https://www.flexera.com/" - `noticesText` (string) noticesText Example: "Sample Notices Text" - `auditNotes` (string) auditNotes Example: "Sample Audit Notes" - `asFoundLicenseText` (string) asFoundLicenseText Example: "Sample from file LICENSE.txt in file @file in the materials" - `fileInfo` (array) fileInfo - `fileInfo.name` (string, required) name Example: "fileName" - `fileInfo.md5` (string, required) md5 Example: "md5" - `ruleInfo` (array) ruleInfo - `ruleInfo.detectionType` (string, required) detectionType Example: "filePath" - `ruleInfo.detectionCriteria` (array, required) detectionCriteria Example: "[filepath]" ## Response 201 fields ## Response 400 fields ## Response 401 fields ## Response 500 fields