Rules

Get Rules

Get existing custom rules

Request
query Parameters
offset
integer <int32>
Default: 1

Index of the page to start with

Example: offset=E.g. 1 | default: 1
limit
integer <int32>
Default: 25

Number Of Records to fetch

Example: limit=E.g. 25 | default: 25
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Responses
200

OK

400

Bad Request

401

Unauthorized

500

Internal Server Error

get/rules

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.

Request
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
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": [
    ]
}

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.

Request
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
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": [
    ]
}

Get Rule By Id

Get existing rule by ruleId

Request
path Parameters
ruleId
required
integer <int64>
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/rules/{ruleId}

Delete Rule

Delete existing rule

Request
path Parameters
ruleId
required
integer <int64>
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

delete/rules/{ruleId}