Skip to content

Code Insight REST API Documentation (v1)

The Code Insight REST APIs provide a standardized interface for interacting with the application.

An authorization JWT token must be included in the HTTP Authorization header using the Bearer schema. The token can be obtained from the Code Insight Web UI under the Preferences menu. To set the token, click the Authorize button below on the right, enter the JWT token in the Value field, then click Authorize and close the dialog. Once authorized, the token will be automatically included in the HTTP Authorization header for all API requests made through the Swagger UI.

Note: If accessing the REST APIs through external tools such as curl or Postman, include the token manually in the HTTP header using the following format: Authorization: Bearer JWT_TOKEN. "Bearer" must precede the actual JWT token value.

Download OpenAPI description
Languages
Servers
Mock server
https://codeinsightapi.redocly.app/_mock/swagger
Code Insight REST API Server
https://codeinsightapi.redocly.app/codeinsight/api

Email Templates

Internal API for fetching custom email templates and images from core server

Operations

CodebaseFolder

Operations

Deprecated APIs

Operations

Component

Operations

Files

Operations

Folder

Operations

Project API

Operations

Inventory API

Operations

inventoryWorkflow

Operations

Jobs

Operations

ldap

Operations

license

Operations

License Lookup

Request

Returns id, name, priority, url, description, text, shortName and spdxIdentifier for a given license ID or license Name.

Security
bearerAuth
Query
licenseIdinteger(int64)

ID of the license (Example: 1)

licenseNamestring

Full name of the license (Example: Apache License 1.1)

curl -i -X GET \
  'https://codeinsightapi.redocly.app/_mock/swagger/license/lookup?licenseId=0&licenseName=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Bodyapplication/json
string
Response
application/json
"string"

Create a custom license

Request

Creates a custom license

Security
bearerAuth
Bodyapplication/jsonrequired

To create a custom license the name, shortName and licenseText is required.
Only users with Library Manager permission can create custom licenses.
Allowable values for familyName(Optional) are:
GNU LGPL 2.1 Style | Artistic License 1.0 Style | Proprietary Style | BSD 3-Clause Style | Apache 1.1 Style | CPL 1.0 Style | MIT Style | Public Domain Style | MPL 1.1 Style | MPL 1.0 Style | Academic Free License Style | Apache 2.0 Style | Sleepycat Style | EPL 1.0 Style | CDDL 1.0 Style | Commercial Style | GNU GPL 3 Style | GNU LGPL 2.0 Style | GNU LGPL 3.0 Style | GNU AGPL 3.0 Style | Ambiguous License Style | GNU GPL 2 Style | Artistic License 2.0 Style | BSD 2-Clause Style | GNU GPL 2 w/CPE Style | CDDL 1.1 Style | Apache 1.0 Style | BSD 4-Clause Style | GNU GPL 2+ Style | GNU GPL 3+ Style | GNU LGPL 2.1+ Style | GNU LGPL 3.0+ Style | GNU LGPL 2.0+ Style | MirOS Style | zlib Style | GNU GPL Style | GNU LGPL Style | GNU AGPL 3.0+ Style

namestring[ 0 .. 127 ] characters

name

Example: "General Public License"
shortNamestring[ 0 .. 255 ] characters

shortName

Example: "GPL"
licenseTextstring[ 0 .. 16777215 ] characters

licenseText

Example: "License Text"
prioritystringP1|P2|P3

priority

Enum"P1""P2""P3"
Example: "E.g. P1 | P2 | P3 | default: P3"
urlstring[ 0 .. 2400 ] characters(^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2...

url

Example: "https://abc.xyz"
descriptionstring[ 0 .. 65535 ] characters

description

Example: "License description"
familyNamestring

familyName

Example: "License family"
externalIdstring

externalId

Example: "External License Id Eg: 156"
curl -i -X POST \
  https://codeinsightapi.redocly.app/_mock/swagger/licenses \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "General Public License",
    "shortName": "GPL",
    "licenseText": "License Text",
    "priority": "E.g. P1 | P2 | P3 | default: P3",
    "url": "https://abc.xyz",
    "description": "License description",
    "familyName": "License family",
    "externalId": "External License Id Eg: 156"
  }'

Responses

Created

Edit Custom License

Request

Only users with Library Manager permission can edit a custom license.

Security
bearerAuth
Path
licenseIdinteger(int64)required

ID of License

Example: 1
Bodyapplication/jsonrequired
namestring[ 0 .. 127 ] characters

name

Example: "General Public License"
shortNamestring[ 0 .. 255 ] characters

shortName

Example: "GPL"
licenseTextstring[ 0 .. 16777215 ] characters

licenseText

Example: "License Text"
prioritystringP1|P2|P3

priority

Enum"P1""P2""P3"
Example: "E.g. P1 | P2 | P3 | default: P3"
urlstring[ 0 .. 2400 ] characters(^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2...

url

Example: "https://abc.xyz"
descriptionstring[ 0 .. 65535 ] characters

description

Example: "License description"
familyNamestring

familyName

Example: "License family"
externalIdstring

externalId

Example: "External License Id Eg: 156"
curl -i -X PUT \
  https://codeinsightapi.redocly.app/_mock/swagger/licenses/1 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "General Public License",
    "shortName": "GPL",
    "licenseText": "License Text",
    "priority": "E.g. P1 | P2 | P3 | default: P3",
    "url": "https://abc.xyz",
    "description": "License description",
    "familyName": "License family",
    "externalId": "External License Id Eg: 156"
  }'

Responses

OK

Delete a custom license

Request

Delete a custom license using the license ID. All existing inventory that uses this license will have its license changed to Unknown. You must have the Library Manager permission to delete a custom license.

Security
bearerAuth
Path
licenseIdinteger(int64)required

ID of the License

Example: 1
curl -i -X DELETE \
  https://codeinsightapi.redocly.app/_mock/swagger/licenses/1 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Update Licenses External Id

Request

Update Licenses External Id. Only users with Library Manager permission can update the External Id of a license. The licenseId should be a valid license id and the externalId should not exceed 255 characters.

Security
bearerAuth
Path
licenseIdinteger(int64)required

ID of the license

Example: 1
Bodyapplication/json
externalIdstring

externalId

Example: "External License Id Eg:156"
curl -i -X PATCH \
  https://codeinsightapi.redocly.app/_mock/swagger/licenses/1 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "externalId": "External License Id Eg:156"
  }'

Responses

OK

Get All Licenses

Request

Returns all license details. If onlyCustom is true, returns only custom licenses. Supports pagination with page and size parameters.

Security
bearerAuth
Query
onlyCustomboolean

If true, returns only custom licenses

Default false
pageinteger(int64)

Page Number. Index of the page to start with(starts from 1)

Default 1
sizeinteger(int64)

Page Size. Number Of Records to fetch per page

Default 25
curl -i -X GET \
  'https://codeinsightapi.redocly.app/_mock/swagger/licenses/listAll?onlyCustom=false&page=1&size=25' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

License lookup based on short name

Request

Returns id, name, priority, url, description, text and spdxIdentifier for a given shortName.

Security
bearerAuth
Path
shortNamestringrequired

Short name of the license

curl -i -X GET \
  'https://codeinsightapi.redocly.app/_mock/swagger/licenses/{shortName}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

sourceCodeManagement

Operations

Reports

Operations

Rules

Operations

Scan profiles

Operations

Task

Operations

Scan API

Operations

User API

Operations

vulnerability

Operations