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. Only users with Library Manager role can create rules.

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.

asFoundLicenseText
string

asFoundLicenseText

auditNotes
string

auditNotes

componentId
required
integer <int64> >= 1

componentId

description
string

description

Array of objects (FileInfo)

fileInfo

inventoryName
string

inventoryName

licenseId
required
integer <int64> >= 1

licenseId

noticesText
string

noticesText

Array of objects (RuleInfo)

ruleInfo

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

url

versionId
required
integer <int64> >= 1

versionId

Responses
201

Created

400

Bad Request

401

Unauthorized

500

Internal Server Error

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

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.

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.

asFoundLicenseText
string

asFoundLicenseText

auditNotes
string

auditNotes

componentId
required
integer <int64> >= 1

componentId

description
string

description

Array of objects (FileInfo)

fileInfo

id
integer <int64>

id

inventoryName
string

inventoryName

licenseId
required
integer <int64> >= 1

licenseId

noticesText
string

noticesText

Array of objects (RuleInfo)

ruleInfo

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

url

versionId
required
integer <int64> >= 1

versionId

Responses
200

OK

400

Bad Request

401

Unauthorized

500

Internal Server Error

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

Delete Rule

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

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}

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}