Rules

Get Rules

Get existing custom rules

SecuritybearerAuth
Request
query Parameters
offset
integer <int64> >= 1
Default: 1

Index of the page to start with

limit
integer <int64> >= 1
Default: 25

Number Of Records to fetch

Responses
200

OK

400

Bad Request

401

Unauthorized

500

Internal Server Error

get/rules

Update Rule

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.

SecuritybearerAuth
Request
Request Body schema: application/json
required

Update existing rule.

id
integer <int64>

id

inventoryName
string

inventoryName

componentId
required
integer <int64> >= 1

componentId

versionId
required
integer <int64> >= 1

versionId

licenseId
required
integer <int64> >= 1

licenseId

description
string

description

url
string [ 0 .. 2400 ] characters (NA|^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=...

url

noticesText
string

noticesText

auditNotes
string

auditNotes

asFoundLicenseText
string

asFoundLicenseText

Array of objects (FileInfo)

fileInfo

Array of objects (RuleInfo)

ruleInfo

Responses
200

OK

400

Bad Request

401

Unauthorized

500

Internal Server Error

put/rules
Request samples
application/json
{
  • "id": 1,
  • "inventoryName": "Custom Inventory Name",
  • "componentId": 1,
  • "versionId": 1,
  • "licenseId": 1,
  • "description": "description",
  • "noticesText": "Sample Notices Text",
  • "auditNotes": "Sample Audit Notes",
  • "asFoundLicenseText": "Sample from file LICENSE.txt in file @file in the materials",
  • "fileInfo": [
    ],
  • "ruleInfo": [
    ]
}

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.

SecuritybearerAuth
Request
Request Body schema: application/json
required

Add new rule.

inventoryName
string

inventoryName

componentId
required
integer <int64> >= 1

componentId

versionId
required
integer <int64> >= 1

versionId

licenseId
required
integer <int64> >= 1

licenseId

description
string

description

url
string [ 0 .. 2400 ] characters (NA|^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=...

url

noticesText
string

noticesText

auditNotes
string

auditNotes

asFoundLicenseText
string

asFoundLicenseText

Array of objects (FileInfo)

fileInfo

Array of objects (RuleInfo)

ruleInfo

Responses
201

Created

400

Bad Request

401

Unauthorized

500

Internal Server Error

post/rules
Request samples
application/json
{
  • "inventoryName": "Custom Inventory Name",
  • "componentId": 1,
  • "versionId": 1,
  • "licenseId": 1,
  • "description": "description",
  • "noticesText": "Sample Notices Text",
  • "auditNotes": "Sample Audit Notes",
  • "asFoundLicenseText": "Sample from file LICENSE.txt in file @file in the materials",
  • "fileInfo": [
    ],
  • "ruleInfo": [
    ]
}

Get Rule By Id

Get existing rule by ruleId

SecuritybearerAuth
Request
path Parameters
ruleId
required
integer <int64>
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/rules/{ruleId}

Delete Rule

Delete existing rule. Only users with Library Manager role can delete rules.

SecuritybearerAuth
Request
path Parameters
ruleId
required
integer <int64>
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

delete/rules/{ruleId}

Disable Rules

Disable multiple rules by their IDs. Disabled rules will not be applied during project scanning. Only users with Library Manager role can disable rules.

SecuritybearerAuth
Request
Request Body schema: application/json
required

List of rule IDs to disable

Array
integer <int64>
Responses
200

Rules disabled successfully

400

Bad Request - Rule IDs cannot be empty

401

Unauthorized

403

Forbidden - Insufficient permissions

500

Internal Server Error

put/rules/disable
Request samples
application/json
[
  • 0
]

Enable Rules

Enable multiple rules. Enabled rules will be applied during project scanning. Only users with Library Manager role can enable rules.

SecuritybearerAuth
Request
Request Body schema: application/json
required

List of rules ids to enable

Array
integer <int64>
Responses
200

Rules enabled successfully

400

Bad Request - Rule data cannot be empty or invalid

401

Unauthorized

403

Forbidden - Insufficient permissions

500

Internal Server Error

put/rules/enable
Request samples
application/json
[
  • 0
]